-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (51 loc) · 1.48 KB
/
security.yml
File metadata and controls
55 lines (51 loc) · 1.48 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
54
55
name: Security Audit
on:
push:
branches: [master]
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "deny.toml"
- ".github/workflows/security.yml"
pull_request:
paths:
- "**/Cargo.toml"
- "**/Cargo.lock"
- "deny.toml"
- ".github/workflows/security.yml"
schedule:
# Run daily at 06:37 UTC to catch newly disclosed advisories
- cron: "37 6 * * *"
workflow_dispatch:
permissions:
contents: read
jobs:
# ── cargo-deny: licenses, bans, sources, advisories ────────────
cargo-deny:
name: cargo-deny (${{ matrix.checks }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
checks:
- advisories
- bans licenses sources
# New upstream advisories should not block PRs
continue-on-error: ${{ matrix.checks == 'advisories' }}
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check
command-arguments: ${{ matrix.checks }}
# ── cargo-audit: RustSec advisory database scan ────────────────
cargo-audit:
name: cargo-audit
# Skip on fork PRs to avoid arbitrary code execution
if: >-
github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/audit@v1