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:
paths:
# Re-run on any dependency or audit-config change.
- Cargo.toml
- Cargo.lock
- "**/Cargo.toml"
- deny.toml
- .cargo/audit.toml
- .github/workflows/audit.yml
pull_request:
# Roda em todo PR sem filtro de paths: é required check no ruleset da
# master, e um filtro de paths deixaria o check "pending" pra sempre em
# PRs que não tocam deps, travando o merge.
schedule:
# Run daily at 06:00 UTC so advisories published overnight are caught
# before the workday begins.
- cron: "0 6 * * *"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
deny:
name: cargo-deny (licenses + bans + advisories)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Run cargo-deny
uses: EmbarkStudios/cargo-deny-action@v2
with:
# Check all four categories in one pass.
command: check licenses bans advisories sources
# Use the deny.toml at the workspace root.
manifest-path: Cargo.toml
audit:
name: cargo-audit (RustSec)
runs-on: ubuntu-latest
permissions:
contents: read
# audit-check cria um check-run pra reportar advisories encontradas.
checks: write
steps:
- uses: actions/checkout@v7
- name: Run cargo-audit
uses: rustsec/audit-check@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}