name: security-audit
on:
push:
branches:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/security-audit.yml"
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- ".github/workflows/security-audit.yml"
schedule:
# Daily at 06:00 UTC — catches advisories filed against pinned deps.
- cron: "0 6 * * *"
workflow_dispatch:
permissions:
contents: read
issues: write
checks: write
jobs:
audit:
name: cargo audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: rustsec/audit-check@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}