diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml new file mode 100644 index 00000000..020d1686 --- /dev/null +++ b/.github/workflows/audit.yml @@ -0,0 +1,33 @@ +name: audit + +on: + push: + branches: [main] + paths: + - "**/Cargo.toml" + - "Cargo.lock" + - ".github/workflows/audit.yml" + pull_request: + paths: + - "**/Cargo.toml" + - "Cargo.lock" + - ".github/workflows/audit.yml" + schedule: + # Daily: the advisory database is deliberately fetched live each run, so + # newly published RustSec advisories flag here without any code change. + - cron: "23 6 * * *" + workflow_dispatch: + +permissions: + contents: read + checks: write + +jobs: + audit: + name: cargo audit (RustSec advisories) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: rustsec/audit-check@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }}