Skip to content

Commit

Permalink
Merge pull request #110 from githubexporter/trivy-scanning
Browse files Browse the repository at this point in the history
Add daily Trivy scan workflow
  • Loading branch information
henrymcconville authored Apr 30, 2024
2 parents d667f9a + 06cb2c4 commit 7ead103
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
30 changes: 30 additions & 0 deletions .github/workflows/container-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Container Scan
on:
schedule:
- cron: "0 9 * * *"
workflow_dispatch:

jobs:
container-scan:
name: Container Scan
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Get Current Version
id: get-current-version
run: |
echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT
- name: Run Trivy
uses: aquasecurity/trivy-action@master
with:
image-ref: 'githubexporter/github-exporter:${{ steps.get-current-version.outputs.version }}'
format: 'sarif'
output: 'trivy-results.sarif'

- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: 'trivy-results.sarif'
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.0
1.1.0

0 comments on commit 7ead103

Please sign in to comment.