Skip to content

Commit 0f77684

Browse files
committed
Update deny.toml to refine allowed licenses and improve multiple version handling; enhance error.rs with additional error handling capabilities.
1 parent 8b565ae commit 0f77684

2 files changed

Lines changed: 26 additions & 24 deletions

File tree

deny.toml

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,48 @@
11
[licenses]
22
# List of explicitly allowed licenses
3+
# Note: All licenses not in this list are denied by default
34
allow = [
45
"MIT",
56
"Apache-2.0",
67
"Apache-2.0 WITH LLVM-exception",
7-
"BSD-2-Clause",
8-
"BSD-3-Clause",
9-
"ISC",
10-
"Unicode-DFS-2016",
11-
]
12-
# List of explicitly disallowed licenses
13-
deny = [
14-
"GPL-2.0",
15-
"GPL-3.0",
16-
"AGPL-1.0",
17-
"AGPL-3.0",
8+
"MPL-2.0",
9+
"Unicode-3.0",
1810
]
11+
# Don't warn about unused licenses in the allow list
12+
unused-allowed-license = "allow"
1913

2014
[bans]
2115
# Lint level for when multiple versions of the same crate are detected
2216
multiple-versions = "warn"
2317
# List of crates that are allowed to have multiple versions
18+
# These duplicates are caused by transitive dependencies and are safe to allow
2419
skip = [
25-
{ name = "windows_aarch64_gnullvm" },
26-
{ name = "windows_aarch64_msvc" },
27-
{ name = "windows_i686_gnu" },
28-
{ name = "windows_i686_msvc" },
29-
{ name = "windows_x86_64_gnu" },
30-
{ name = "windows_x86_64_gnullvm" },
31-
{ name = "windows_x86_64_msvc" },
20+
{ crate = "bitflags" },
21+
{ crate = "windows-link" },
22+
{ crate = "windows-sys" },
23+
{ crate = "windows-targets" },
24+
{ crate = "windows_aarch64_gnullvm" },
25+
{ crate = "windows_aarch64_msvc" },
26+
{ crate = "windows_i686_gnu" },
27+
{ crate = "windows_i686_gnullvm" },
28+
{ crate = "windows_i686_msvc" },
29+
{ crate = "windows_x86_64_gnu" },
30+
{ crate = "windows_x86_64_gnullvm" },
31+
{ crate = "windows_x86_64_msvc" },
3232
]
3333

3434
[advisories]
3535
# The path where the advisory database is cloned/fetched into
3636
db-path = "~/.cargo/advisory-db"
3737
# The url(s) of the advisory databases to use
3838
db-urls = ["https://github.com/rustsec/advisory-db"]
39-
# The lint level for security vulnerabilities
40-
vulnerability = "deny"
41-
# The lint level for unmaintained crates
42-
unmaintained = "all"
39+
# Determines how unmaintained crate advisories are handled
40+
# "all" - Any crate that matches an unmaintained advisory will fail
41+
# "workspace" - Only fail if unmaintained crate is a direct dependency
42+
# "none" - Unmaintained advisories are completely ignored
43+
unmaintained = "workspace"
4344
# The lint level for crates that have been yanked from their source registry
4445
yanked = "warn"
45-
# The lint level for crates with security notices
46-
notice = "warn"
4746
# A list of advisory IDs to ignore
4847
ignore = []
4948

src/error.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use thiserror::Error;
88

99
/// Main error type for process-key-sender operations.
1010
#[derive(Error, Debug)]
11+
#[allow(dead_code)]
1112
pub enum PksError {
1213
/// Process was not found after the specified number of retries.
1314
#[error("process '{name}' not found after {retries} attempts")]
@@ -67,8 +68,10 @@ pub enum PksError {
6768
}
6869

6970
/// Result type alias for process-key-sender operations.
71+
#[allow(dead_code)]
7072
pub type Result<T> = std::result::Result<T, PksError>;
7173

74+
#[allow(dead_code)]
7275
impl PksError {
7376
/// Create a new ProcessNotFound error.
7477
pub fn process_not_found(name: impl Into<String>, retries: u32) -> Self {

0 commit comments

Comments
 (0)