Repository navigation
release: publish v0.1.0a10 #284
This file contains hidden or 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 | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| - cron: "29 3 * * 3" | |
| permissions: | |
| contents: read | |
| jobs: | |
| python-security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| - name: Install package and security tooling | |
| run: pip install -e ".[dev,security]" | |
| - name: Dependency vulnerability audit | |
| run: pip-audit | |
| - name: Static security analysis | |
| run: bandit -q -r src -x tests -ll | |
| - name: Security boundary tests | |
| run: pytest -q tests/test_security_boundaries.py tests/test_task_trace.py tests/test_agent_configurator.py | |
| - name: Generate CycloneDX SBOM | |
| run: cyclonedx-py environment --output-format JSON --output-file sbom.cdx.json | |
| - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: codecortex-sbom-${{ github.sha }} | |
| path: sbom.cdx.json | |
| retention-days: 90 | |
| dependency-review: | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | |
| with: | |
| persist-credentials: false | |
| - name: Review dependency changes | |
| id: dependency-review | |
| continue-on-error: true | |
| uses: actions/dependency-review-action@2031cfc080254a8a887f58cffee85186f0e49e48 # v4 | |
| with: | |
| fail-on-severity: high | |
| - name: Explain unavailable repository security setting | |
| if: steps.dependency-review.outcome == 'failure' | |
| run: | | |
| echo '::warning::Dependency Review could not run. Enable GitHub Dependency Graph in Settings > Security & analysis; after it is enabled this action will enforce high-severity dependency changes.' | |
| echo 'Dependency Review is configured but GitHub Dependency Graph must be enabled in repository settings before it can enforce PRs.' >> "$GITHUB_STEP_SUMMARY" |