Skip to content

fixed group again

fixed group again #8

name: "Container Security Scan"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
scan:
name: Container Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build image
run: |
docker build -t my-image-labeling-app:${{ github.sha }} .
- name: Scan image with Trivy (Clair alternative)
uses: aquasecurity/trivy-action@master
with:
image-ref: 'my-image-labeling-app:${{ github.sha }}'
format: 'sarif'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'