feat: Add Trivy scans to images #2
Workflow file for this run
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: Security | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Build an TrustyAI operator image from Dockerfile | |
run: docker build -t quay.io/trustyai/trustyai-service-operator:${{ github.sha }} . | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/[email protected] | |
with: | |
image-ref: "quay.io/trustyai/trustyai-service-operator:${{ github.sha }}" | |
format: "github" | |
exit-code: "1" | |
ignore-unfixed: true | |
vuln-type: "os,library" | |
severity: "CRITICAL,HIGH,MEDIUM" | |
- name: Build an LM-Eval driver image from Dockerfile | |
run: docker build -f Dockerfile.driver -t quay.io/trustyai/ta-lmes-driver:${{ github.sha }} . | |
- name: Run Trivy vulnerability scanner | |
uses: aquasecurity/[email protected] | |
with: | |
image-ref: "quay.io/trustyai/ta-lmes-driver:${{ github.sha }}" | |
format: "github" | |
exit-code: "1" | |
ignore-unfixed: true | |
vuln-type: "os,library" | |
severity: "CRITICAL,HIGH,MEDIUM" |