name: Security audit
on:
push:
branches:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
pull_request:
branches:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
schedule:
- cron: '0 0 * * 6' # Run every Saturday at 00:00 UTC
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-audit
run: cargo install cargo-audit --locked
- name: Generate lockfile
run: cargo generate-lockfile
- name: Run cargo audit
run: cargo audit