Skip to content

Commit 7ead103

Browse files
Merge pull request #110 from githubexporter/trivy-scanning
Add daily Trivy scan workflow
2 parents d667f9a + 06cb2c4 commit 7ead103

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Container Scan
2+
on:
3+
schedule:
4+
- cron: "0 9 * * *"
5+
workflow_dispatch:
6+
7+
jobs:
8+
container-scan:
9+
name: Container Scan
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Get Current Version
16+
id: get-current-version
17+
run: |
18+
echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
19+
20+
- name: Run Trivy
21+
uses: aquasecurity/trivy-action@master
22+
with:
23+
image-ref: 'githubexporter/github-exporter:${{ steps.get-current-version.outputs.version }}'
24+
format: 'sarif'
25+
output: 'trivy-results.sarif'
26+
27+
- name: Upload Trivy scan results to GitHub Security tab
28+
uses: github/codeql-action/upload-sarif@v2
29+
with:
30+
sarif_file: 'trivy-results.sarif'

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.1.0
1+
1.1.0

0 commit comments

Comments
 (0)