Container analysis #39
This file contains 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: Container analysis | |
on: | |
push: | |
branches: [main] | |
schedule: | |
- cron: "44 10 * * 6" | |
jobs: | |
trivy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Trivy | |
continue-on-error: true | |
uses: aquasecurity/trivy-action@0.7.1 | |
with: | |
image-ref: "ghcr.io/${{ github.repository }}:latest" | |
format: "sarif" | |
output: "trivy-results.sarif" | |
severity: "MEDIUM,HIGH,CRITICAL" | |
- name: Upload Trivy scan results to GitHub Security tab | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: "trivy-results.sarif" | |
snyk: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run Snyk | |
continue-on-error: true | |
uses: snyk/actions/docker@master | |
env: | |
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | |
with: | |
image: ghcr.io/${{ github.repository }}:latest | |
args: --file=Dockerfile --severity-threshold=medium | |
- name: Upload Snyk result to GitHub Code Scanning | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: snyk.sarif |