Skip to content

Commit

Permalink
Feat: Add container scanning workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Anoop Gopalakrishnan <[email protected]>
  • Loading branch information
anoop2811 committed Jan 16, 2024
1 parent 5f36afd commit 373d460
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/trivy-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Trivy Scan"

on:
pull_request:
branches: [ main ]

permissions:
contents: read

jobs:
images:
name: Image Scan
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build Fern image from Dockerfile
run: |
docker build -t docker.io/anoop2811/fern-reporter:${{ github.sha }} .
- name: Run Trivy vulnerability scanner for vela core
uses: aquasecurity/trivy-action@master
with:
image-ref: 'docker.io/anoop2811/fern-reporter:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: 'trivy-results.sarif'

0 comments on commit 373d460

Please sign in to comment.