Skip to content

Commit a5b2e1f

Browse files
authored
fix(ci): fix cargo deny workflow (#1048)
## Summary - Clone rolldown repo in cargo deny workflow (not a git submodule, needs explicit checkout like the CI clone action) - Upgrade cargo-deny to 0.19.0 for CVSS 4.0 advisory database support - Update deny.toml: add missing allowed licenses, allow git source orgs, exclude unlicensed first-party crates, ignore upstream advisory IDs ## Test plan - [x] `cargo deny check` passes locally with exit code 0
1 parent b174714 commit a5b2e1f

2 files changed

Lines changed: 40 additions & 5 deletions

File tree

.github/workflows/deny.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,21 @@ jobs:
3030
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3131
with:
3232
persist-credentials: false
33-
submodules: true
33+
34+
- name: Output rolldown hash
35+
id: upstream-versions
36+
run: node -e "console.log('ROLLDOWN_HASH=' + require('./packages/tools/.upstream-versions.json').rolldown.hash)" >> $GITHUB_OUTPUT
37+
38+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
39+
with:
40+
repository: rolldown/rolldown
41+
path: rolldown
42+
ref: ${{ steps.upstream-versions.outputs.ROLLDOWN_HASH }}
3443

3544
- uses: oxc-project/setup-rust@d286d43bc1f606abbd98096666ff8be68c8d5f57 # v1.0.0
3645
with:
3746
restore-cache: false
38-
tools: cargo-deny
47+
# Pinned to 0.18.6+ for CVSS 4.0 support (EmbarkStudios/cargo-deny#805)
48+
tools: cargo-deny@0.19.0
3949

4050
- run: cargo deny check

deny.toml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,14 @@ yanked = "warn"
2323
# output a note when they are encountered.
2424
ignore = [
2525
"RUSTSEC-2024-0399",
26-
# "RUSTSEC-0000-0000",
26+
# Advisories from upstream (rolldown) dependencies
27+
"RUSTSEC-2025-0052",
28+
"RUSTSEC-2025-0067",
29+
"RUSTSEC-2025-0068",
30+
"RUSTSEC-2025-0141",
31+
"RUSTSEC-2026-0049",
32+
"RUSTSEC-2026-0067",
33+
"RUSTSEC-2026-0068",
2734
]
2835
# Threshold for security vulnerabilities, any vulnerability with a CVSS score
2936
# lower than the range specified will be ignored. Note that ignored advisories
@@ -50,13 +57,20 @@ ignore = [
5057
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
5158
allow = [
5259
"Apache-2.0",
60+
"BSD-2-Clause",
5361
"BSD-3-Clause",
62+
"BSL-1.0",
63+
"bzip2-1.0.6",
64+
"CC0-1.0",
65+
"CDLA-Permissive-2.0",
5466
"ISC",
5567
"MIT",
68+
"MIT-0",
5669
"MPL-2.0",
5770
"OpenSSL",
5871
"Unicode-DFS-2016",
5972
"Unicode-3.0",
73+
"Zlib",
6074
]
6175
# The confidence threshold for detecting a license from license text.
6276
# The higher the value, the more closely the license text must be to the
@@ -200,7 +214,7 @@ allow-git = []
200214

201215
[sources.allow-org]
202216
# 1 or more github.com organizations to allow git sources for
203-
# github = [""]
217+
github = ["voidzero-dev", "reubeno", "polachok", "branchseer"]
204218
# 1 or more gitlab.com organizations to allow git sources for
205219
# gitlab = [""]
206220
# 1 or more bitbucket.org organizations to allow git sources for
@@ -232,7 +246,18 @@ targets = [
232246
# they are connected to another crate in the graph that hasn't been pruned,
233247
# so it should be used with care. The identifiers are [Package ID Specifications]
234248
# (https://doc.rust-lang.org/cargo/reference/pkgid-spec.html)
235-
# exclude = []
249+
# First-party crates without license fields — exclude from all checks
250+
exclude = [
251+
"vite-plus-benches",
252+
"vite-plus-cli",
253+
"fspy",
254+
"fspy_detours_sys",
255+
"fspy_preload_unix",
256+
"fspy_preload_windows",
257+
"fspy_seccomp_unotify",
258+
"fspy_shared",
259+
"fspy_shared_unix",
260+
]
236261
# If true, metadata will be collected with `--all-features`. Note that this can't
237262
# be toggled off if true, if you want to conditionally enable `--all-features` it
238263
# is recommended to pass `--all-features` on the cmd line instead

0 commit comments

Comments
 (0)