You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+3
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8
8
9
9
<!-- next-header -->
10
10
## [Unreleased] - ReleaseDate
11
+
### Added
12
+
-[PR#753](https://github.com/EmbarkStudios/cargo-deny/pull/753) resolved [#752](https://github.com/EmbarkStudios/cargo-deny/issues/752) by adding back the `advisories.unmaintained` config option. See the [docs](https://embarkstudios.github.io/cargo-deny/checks/advisories/cfg.html#the-unmaintained-field-optional) for how it can be used. The default matches the current behavior, which is to error on any `unmaintained` advisory, but adding `unmaintained = "workspace"` to the `[advisories]` table will mean unmaintained advisories will only error if the crate is a direct dependency of your workspace.
13
+
11
14
## [0.18.1] - 2025-02-27
12
15
### Fixed
13
16
-[PR#749](https://github.com/EmbarkStudios/cargo-deny/pull/749) updated `krates` to pull in the fix for [EmbarkStudios/krates#100](https://github.com/EmbarkStudios/krates/issues/100).
Copy file name to clipboardexpand all lines: docs/src/checks/advisories/README.md
+6-1
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,12 @@ You can also use your own advisory databases instead of, or in addition to, the
14
14
15
15
## Use Case - Detecting unmaintained crates
16
16
17
-
The [advisory database](https://github.com/RustSec/advisory-db) also contains advisories for unmaintained crates, which in most cases users will want to avoid in favor of more actively maintained crates.
17
+
The [advisory database](https://github.com/RustSec/advisory-db) also contains advisories for unmaintained crates, which in most cases users will want to avoid in favor of more actively maintained crates. By default, all `unmaintained` advisories will result in an error, but by using the following config you can error only if you directly depend on an unmaintained crate from your workspace.
Copy file name to clipboardexpand all lines: docs/src/checks/advisories/cfg.md
+13-1
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,6 @@ version = 2
39
39
The version field is (at the time of this writing) no longer used, the following fields have been removed and will now emit errors.
40
40
41
41
-`vulnerability` - Removed, all vulnerability advisories now emit errors.
42
-
-`unmaintained` - Removed, all unmaintained advisories now emit errors.
43
42
-`unsound` - Removed, all unsound advisories now emit errors.
44
43
-`notice` - Removed, all notice advisories now emit errors.
45
44
-`severity-threshold` - Removed, all vulnerability advisories now emit errors.
@@ -69,6 +68,19 @@ Every advisory in the advisory database contains a unique identifier, eg. `RUSTS
69
68
70
69
In addition, yanked crate versions can be ignored by specifying a [PackageSpec](../cfg.md#package-spec) with an optional `reason`.
71
70
71
+
### The `unmaintained` field (optional)
72
+
73
+
```ini
74
+
unmaintained = 'workspace'
75
+
```
76
+
77
+
Determines if ummaintained advisories will result in an error. An unmaintained error can still be ignored specifically via the [`ignore`](#the-ignore-field-optional) option.
78
+
79
+
-`all` (default) - Any crate that matches an unmaintained advisory will fail
80
+
-`workspace` - Unmaintained advisories will only fail if they apply to a crate which is a direct dependency of one or more workspace crates.
81
+
-`transitive` - Unmaintained advisories will only fail if they apply to a crate which is **not** a direct dependency of one or more workspace crates.
82
+
-`none` - Unmaintained advisories are completely ignored.
83
+
72
84
### The `git-fetch-with-cli` field (optional)
73
85
74
86
Similar to cargo's [net.git-fetch-with-cli](https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli), this field allows you to opt-in to fetching advisory databases with the git CLI rather than using `gix`.
0 commit comments