Skip to content

Merge pull request #3 from infobloxopen/dependabot/github_actions/act… #13

Merge pull request #3 from infobloxopen/dependabot/github_actions/act…

Merge pull request #3 from infobloxopen/dependabot/github_actions/act… #13

Workflow file for this run

name: Security
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Run weekly on Mondays at 08:00 UTC
- cron: "0 8 * * 1"
permissions:
contents: read
jobs:
bandit:
name: SAST (Bandit)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install Bandit
run: pip install bandit[toml]
- name: Run Bandit
run: bandit -r src/dns_aid -c pyproject.toml -f json -o bandit-report.json
- name: Display results
if: always()
run: bandit -r src/dns_aid -c pyproject.toml
- name: Upload Bandit report
if: always()
uses: actions/upload-artifact@v6
with:
name: bandit-report
path: bandit-report.json
sbom:
name: SBOM Generation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev,cli,mcp,route53]"
pip install cyclonedx-bom
- name: Generate SBOM
run: cyclonedx-py environment -o sbom.json --output-format json
- name: Upload SBOM
uses: actions/upload-artifact@v6
with:
name: sbom
path: sbom.json
dependency-audit:
name: Dependency Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ".[dev,cli,mcp,route53]"
pip install pip-audit
- name: Run pip-audit
# dns-aid is not on PyPI yet, so --strict would fail on the lookup warning.
# Without --strict, vulnerabilities are still hard errors; only the
# "not found on PyPI" warning is downgraded. Re-enable --strict once
# dns-aid is published to PyPI.
run: pip-audit