Update Trivy-secrete-scan.yaml #27
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: Code Scanning | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| actions: read | |
| security-events: write | |
| jobs: | |
| code-scanning: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Run Trivy | |
| env: | |
| TRIVY_IGNORE_UNFIXED: true | |
| TRIVY_SEVERITY: CRITICAL | |
| TRIVY_FORMAT: sarif | |
| TRIVY_OUTPUT: trivy-results.sarif | |
| run: | | |
| trivy fs --ignore-unfixed --severity CRITICAL --format sarif --output trivy-results.sarif . | |
| - name: Upload SARIF | |
| uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: trivy-results.sarif | |
| token: ${{ secrets.GITHUB_TOKEN }} |