cid-cfn.yml: Add validation on CFN parameter S3 bucket path #271
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Security Scan | |
on: | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
python-scan: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- {python-version: '3.7' } | |
- {python-version: '3.10' } | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Python Modules | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U bandit pip-audit setuptools . | |
- name: Install cid-cmd | |
run: | | |
pip install -U . | |
- name: Bandit Scan | |
run: | | |
bandit -r . | |
- name: Pip Audit | |
run: | | |
pip-audit | |
cfn-scan-cid: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
- name: Install CFN tools | |
run: | | |
gem install cfn-nag | |
- name: CFN Nag scan | |
run: | | |
cfn_nag_scan --input-path ./cfn-templates/cid-cfn.yml | |
- name: Install cfn-lint | |
run: | | |
pip install cfn-lint | |
- name: CFN Lint | |
run: | | |
cfn-lint ./cfn-templates/cid-cfn.yml | |
cfn-scan-cid-admin-policies: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.1' | |
- name: Install CFN tools | |
run: | | |
gem install cfn-nag | |
- name: CFN Nag scan | |
run: | | |
cfn_nag_scan --input-path ./cfn-templates/cid-admin-policies.yaml | |
- name: Install cfn-lint | |
run: | | |
pip install cfn-lint | |
- name: CFN Lint | |
run: | | |
cfn-lint ./cfn-templates/cid-admin-policies.yaml | |
terraform-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Install checkov | |
run: | | |
pip install checkov | |
- name: Checkov scan | |
run: | | |
checkov --directory ./terraform-modules |