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
35 changes: 35 additions & 0 deletions .github/workflows/_trivy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
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: 'v0.74.0'
format: 'table'
exit-code: '1'
ignore-unfixed: true
vuln-type: 'os,library'
severity: 'CRITICAL,HIGH'
3 changes: 3 additions & 0 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@ jobs:
uses: ./.github/workflows/_tox.yml
with:
tox: docs -- -b linkcheck

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