Skip to content
Merged
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.yaml
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'
20 changes: 20 additions & 0 deletions .github/workflows/cargo_audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Cargo lock check

on:
workflow_call:
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'

jobs:
security_audit:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v7

- name: Audit Cargo.lock for security advisories
uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/periodic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Periodic

on:
workflow_dispatch:
schedule:
# Run weekly to check for new vulnerabilities
- cron: "0 8 * * WED"

jobs:

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

cargo_audit:
uses: ./.github/workflows/cargo_audit.yml
permissions:
issues: write
checks: write
Loading