Skip to content

Commit 993906e

Browse files
ci: Adding trivy image scans and building on schedule to the 1st of every month to update the image and resolve vulnerabilities in the latest build
1 parent 003a36c commit 993906e

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

.github/workflows/docker-publish.yml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
name: Publish Docker image
1111

1212
on:
13+
schedule:
14+
- cron: "0 0 1 * *"
15+
1316
release:
1417
types: [published]
1518

@@ -54,4 +57,24 @@ jobs:
5457
repository: georgedavisibexlabs/publish-sarif-to-jira
5558
short-description: Publish SARIF data to JIRA
5659
readme-filepath: ./DOCKER.md
57-
enable-url-completion: true
60+
enable-url-completion: true
61+
62+
- name: Run Trivy Image scanner
63+
uses: aquasecurity/trivy-action@0.24.0
64+
with:
65+
scan-type: 'image'
66+
image-ref: 'georgedavisibexlabs/publish-sarif-to-jira'
67+
limit-severities-for-sarif: true
68+
trivy-config: .github/config/trivy-sarif.yaml
69+
70+
- name: Upload Trivy Image scan results
71+
uses: actions/upload-artifact@v4.3.6
72+
with:
73+
name: trivy-image-scan-results
74+
path: trivy-image-scan-results.sarif
75+
retention-days: 30
76+
77+
- name: Upload Trivy scan results to GitHub Security tab
78+
uses: github/codeql-action/upload-sarif@v3
79+
with:
80+
sarif_file: 'trivy-image-scan-results.sarif'

0 commit comments

Comments
 (0)