-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (48 loc) · 1.43 KB
/
Copy pathsecurity-audit.yml
File metadata and controls
53 lines (48 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Security audit
# Runs RustSec advisory-db scan on:
# - every PR that touches dependency files
# - every push to main
# - a weekly cron so we catch newly-published advisories against
# already-pinned versions (dependabot only reacts to new releases,
# not to new CVEs filed against versions already in Cargo.lock).
#
# `cargo-deny` (license / bans / sources policy) runs from ci.yml; this
# workflow is scoped to advisory scanning only.
on:
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "deny.toml"
- ".github/workflows/security-audit.yml"
push:
branches: [main]
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "deny.toml"
- ".github/workflows/security-audit.yml"
schedule:
# 03:00 UTC every Monday. Catches advisories filed against pinned
# versions between dependency-graph changes.
- cron: "0 3 * * 1"
workflow_dispatch:
permissions:
contents: read
# `rustsec/audit-check` writes inline annotations on the commit /
# PR. It needs issues:write to surface advisories in the Checks tab.
issues: write
checks: write
concurrency:
group: security-audit-${{ github.ref }}
cancel-in-progress: true
jobs:
security-audit:
name: RustSec advisory scan
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}