Skip to content

Security Audit

Security Audit #178

name: Security Audit
on:
pull_request:
schedule:
- cron: '0 0 * * 0' # Weekly on Sunday at midnight UTC
jobs:
audit:
name: Cargo Audit & Deny
runs-on: ubuntu-latest
strategy:
matrix:
manifest: [Cargo.toml, metrics/Cargo.toml, api-server/Cargo.toml]
steps:
- uses: actions/checkout@v4
- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
- name: Cache
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Install cargo-deny
run: cargo install cargo-deny
- name: Run cargo audit
run: cargo audit --file $(dirname ${{ matrix.manifest }})/Cargo.lock
- name: Run cargo deny
run: cargo deny check --manifest-path ${{ matrix.manifest }}