Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: trivy

on:
pull_request:
branches:
- develop
- main
push:
branches:
- develop
- main

permissions:
contents: read
security-events: write

jobs:
trivy-fs-scan:
name: trivy-fs-scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Run Trivy filesystem scan
uses: aquasecurity/trivy-action@57a97c7e7821a5776cebc9bb87c984fa69cba8f1 # v0.35.0
with:
scan-type: fs
scan-ref: .
format: sarif
output: trivy-results.sarif
severity: CRITICAL,HIGH
Comment thread
coderabbitai[bot] marked this conversation as resolved.
limit-severities-for-sarif: true
exit-code: '1'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v4.34.1
if: always()
with:
sarif_file: trivy-results.sarif
1 change: 1 addition & 0 deletions docs/security/code-security.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ BandScope treats GitHub Code Security as part of bootstrap governance.
## Required controls

- CodeQL or equivalent code scanning workflow
- Trivy filesystem vulnerability scan
- dependency review on pull requests
- security audit workflow for npm, Python, and Rust dependencies in scope
- Dependabot alerts and security updates
Expand Down
2 changes: 2 additions & 0 deletions docs/security/github-required-checks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ These are the merge-gate status checks that should be required on protected bran
- `dependency-review`
- `security-audit`
- `CodeQL`
- `trivy-fs-scan`
- `sbom`
- `release-preflight`
- `gate / build / windows`
Expand All @@ -24,6 +25,7 @@ These are the merge-gate status checks that should be required on protected bran
- `dependency-review`
- `security-audit`
- `CodeQL`
- `trivy-fs-scan`
- `sbom`
- `release-preflight`
- `gate / build / windows`
Expand Down
Loading