diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..b3a1a88c --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: Automated Security Gates + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build-and-scan: + runs-on: ubuntu-latest + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Automated Vulnerability Scan (Trivy) + uses: aquasecurity/trivy-action@0.33.1 + with: + scan-type: 'fs' + ignore-unfixed: true + format: 'sarif' + output: 'trivy-results.sarif' + exit-code: '1' + + - name: Upload SARIF results to GitHub Code Scanning + uses: github/code-scanning-action/upload-sarif@v2 + with: + sarif_file: 'trivy-results.sarif' + + - name: Upload Trivy SARIF artifact + uses: actions/upload-artifact@v4 + with: + name: trivy-sarif + path: trivy-results.sarif