Skip to content

Commit 6c7d49e

Browse files
committed
ci(PR163): drop cargo-deny policy keys removed in PR #611
The previous v2 deny.toml still failed in CI because cargo-deny 0.16+ (post PR #611) REMOVED these policy keys outright instead of just renaming them: [advisories] vulnerability = "deny" [advisories] notice = "warn" [licenses] unlicensed = "deny" [licenses] copyleft = "deny" [licenses] allow-osi-fsf-free = "neither" Defaults now enforce: vulnerabilities denied, unlicensed crates denied, copyleft denied. We don't re-state them so the schema check passes. Schema-stable keys kept: [advisories] db-path, db-urls, ignore [licenses] allow, confidence-threshold [bans] multiple-versions, deny, allow, skip, skip-tree, wildcards [sources] unknown-registry, unknown-git, allow-registry, allow-git [output] feature-depth License allowlist, multi-version ban, and crates.io-source restriction remain. Unmaintained/unsound/yanked are intentionally left to cargo-deny defaults (warn).
1 parent 67c5bb1 commit 6c7d49e

1 file changed

Lines changed: 15 additions & 21 deletions

File tree

onchain/deny.toml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
# cargo-deny configuration
2-
# Schema target: cargo-deny 0.16+ (schema target: https://embarkstudios.github.io/cargo-deny/)
2+
# Schema target: cargo-deny 0.16+ (post PR #611).
3+
# https://github.com/EmbarkStudios/cargo-deny/pull/611
34
#
4-
# This file is checked in CI by:
5+
# This file is read by CI:
56
# cargo deny --locked check advisories licenses bans sources
67
# running with `working-directory: onchain`.
8+
#
9+
# Several policy-level keys were REMOVED in PR #611. Defaults are now:
10+
# - vulnerabilities always denied
11+
# - unlicensed crates denied
12+
# - copyleft denied
13+
# We don't re-state them so the schema check stays happy.
714

815
[graph]
916
# Include dev-dependencies so violations in test toolchains are caught too.
1017
exclude-dev = false
1118

1219
[advisories]
13-
# Vulnerability advisories from the RustSec advisory database.
20+
# Use the canonical RustSec advisory DB.
1421
db-path = "~/.cargo/advisory-db"
1522
db-urls = ["https://github.com/rustsec/advisory-db"]
16-
vulnerability = "deny"
17-
unmaintained = "workspace" # 'all' | 'workspace' | 'transitive' | 'none'
18-
unsound = "workspace" # 'all' | 'workspace' | 'transitive' | 'none'
19-
yanked = "warn"
20-
notice = "warn"
2123
# Ignore specific advisories by ID (use sparingly, document each in the PR).
2224
ignore = []
2325

2426
[licenses]
25-
# Deny any crate that does not have a license we explicitly allow.
26-
unlicensed = "deny"
27-
# Allow these licenses (SPDX identifiers).
27+
# Allow these SPDX identifiers. Anything else is denied by default.
2828
allow = [
2929
"MIT",
3030
"Apache-2.0",
@@ -40,24 +40,18 @@ allow = [
4040
]
4141
# Confidence threshold for license detection (0.0 – 1.0).
4242
confidence-threshold = 0.8
43-
# Keep the project MIT-friendly: deny copyleft.
44-
copyleft = "deny"
45-
allow-osi-fsf-free = "neither"
46-
# Explicit overrides per crate (SPDX expression → reason).
47-
clarify = []
48-
exceptions = []
4943

5044
[bans]
51-
# Multiple versions of the same crate are not allowed unless listed in `allow`.
45+
# Multiple versions of the same crate are not allowed unless listed.
5246
multiple-versions = "deny"
5347
# Highlight crates that are specifically banned.
5448
deny = []
55-
# Crates explicitly allowed (e.g. legacy overrides) when conflicting with bans.
49+
# Crates explicitly allowed despite conflicting with the bans rules above.
5650
allow = []
57-
# Skip certain crates or trees from the bans check.
51+
# Skip certain crates or trees from bans check.
5852
skip = []
5953
skip-tree = []
60-
# 'allow' | 'deny' | 'warn' — control `use foo::*;` wildcards (cargo-deny 0.16+).
54+
# 'allow' | 'deny' | 'warn' — disallow `use foo::*`.
6155
wildcards = "deny"
6256

6357
[sources]

0 commit comments

Comments
 (0)