-
Notifications
You must be signed in to change notification settings - Fork 4
49 lines (42 loc) · 1.44 KB
/
trivyimagescan.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# 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_dlstreamer:
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@v4
with:
ref: main
- name: Build an image from Dockerfile
run: |
echo "running make build benchmark"
make build
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.28.0
with:
image-ref: 'dlstreamer:dev'
format: 'template'
template: '@/contrib/sarif.tpl'
output: 'trivy-results.sarif'
severity: 'CRITICAL,HIGH'
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3.27.3
with:
sarif_file: 'trivy-results.sarif'