Skip to content

Merge pull request #213 from sainijit/benchmark-fix #279

Merge pull request #213 from sainijit/benchmark-fix

Merge pull request #213 from sainijit/benchmark-fix #279

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: trivy_image_scan
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
jobs:
trivy_image_scan_platform:
permissions:
contents: read # for actions/checkout to fetch code
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
name: trivy_image_scan
runs-on: "ubuntu-latest"
steps:
- name: Checkout code
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2
with:
ref: main
- name: Build an image from Dockerfile
run: |
echo "running make build platform benchmark"
cd docker && make build-benchmark
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2
with:
image-ref: 'benchmark:latest'
format: 'table'
severity: 'CRITICAL,HIGH'
output: 'trivy-performance-tools-results.txt'
- name: Upload Trivy scan results
uses: actions/upload-artifact@v4
with:
name: trivy-performance-tools-html-report
path: trivy-performance-tools-results.txt