Skip to content

Feat: Add container scanning workflow #1

Feat: Add container scanning workflow

Feat: Add container scanning workflow #1

Workflow file for this run

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'