-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (45 loc) · 1.29 KB
/
scan-image.yml
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
50
51
---
name: Scan Image
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions: {}
jobs:
scan-image:
name: Scan Image
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: Checkout
id: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Build Image
id: build_image
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
with:
push: false
load: true
tags: ingestion-notify
- name: Scan Image (Produce SARIF)
id: scan_image
uses: aquasecurity/trivy-action@915b19bbe73b92a6cf82a1bc12b087c9a19a5fe2 # v0.28.0
env:
TRIVY_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-db:2
TRIVY_JAVA_DB_REPOSITORY: public.ecr.aws/aquasecurity/trivy-java-db:1
with:
image-ref: ingestion-notify
format: sarif
output: trivy-results.sarif
trivyignores: .trivyignore.yaml
- name: Upload SARIF
if: always()
id: upload_sarif
uses: github/codeql-action/upload-sarif@662472033e021d55d94146f66f6058822b0b39fd # v2.2.7
with:
sarif_file: trivy-results.sarif