Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/_trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Trivy vulnerability scan

on:
workflow_call:

jobs:
scan_container:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v7

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

- name: Build and export to Docker local cache
uses: docker/build-push-action@v7
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: .
load: true
tags: tag_for_scanning

- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@v0.36.0
with:
image-ref: "tag_for_scanning"
version: "latest"
exit-code: "1"
ignore-unfixed: true
vuln-type: "os,library"
severity: "CRITICAL,HIGH"
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ jobs:
contents: read
packages: write

trivy:
uses: ./.github/workflows/_trivy.yml

helm:
# The chart's default image is the one container pushes for the same tag
needs: [test, container]
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Periodic

on:
workflow_dispatch:
schedule:
- cron: "0 8 * * WED"

jobs:
trivy:
uses: ./.github/workflows/_trivy.yml
Loading