0801f0a908
* add trivy image scanning * implement as partial workflow * support both the frontend and backend Dockerfiles for scanning * fix docker build context location
31 lines
758 B
YAML
31 lines
758 B
YAML
name: Trivy Frontend Container Scanning
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and Scan Frontend Container
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: true
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Build Dockerfile
|
|
run: |
|
|
docker build -t mealie ./frontend/
|
|
|
|
- name: Run Trivy vulnerability scanner
|
|
uses: aquasecurity/trivy-action@master
|
|
with:
|
|
ignore-unfixed: true
|
|
image-ref: "mealie"
|
|
format: "sarif"
|
|
output: "trivy-results.sarif"
|
|
|
|
- name: Upload Trivy scan results to GitHub Security tab
|
|
uses: github/codeql-action/upload-sarif@v2
|
|
with:
|
|
sarif_file: "trivy-results.sarif"
|