Skip to content

Commit 71a20dc

Browse files
authored
Prep release (#444)
* Update CHANGELOG * Update crates
1 parent 0fafcea commit 71a20dc

File tree

6 files changed

+64
-38
lines changed

6 files changed

+64
-38
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
<!-- next-header -->
1010
## [Unreleased] - ReleaseDate
11+
### Added
12+
- [PR#431](https://github.com/EmbarkStudios/cargo-deny/pull/432) resolved [#19](https://github.com/EmbarkStudios/cargo-deny/issues/19) by adding support for an allow list for build scripts, allowing a project to opt in (or deny completely) build scripts on a case by case basis rather than blanket allowing all build scripts. See the [`bans.allow-build-scripts`](https://embarkstudios.github.io/cargo-deny/checks/bans/cfg.html#the-allow-build-scripts-field-optional) config option for more details. Thanks [@Stupremee](https://github.com/Stupremee)!
13+
14+
### Fixed
15+
- [PR#430](https://github.com/EmbarkStudios/cargo-deny/pull/430) fixed an issue where local/git crates could be flagged as "yanked" if they shared a name and version with a crates.io crate that was yanked from the registry, resolving [#441](https://github.com/EmbarkStudios/cargo-deny/issues/441) before it was even opened. Thanks [@khuey](https://github.com/khuey)!
16+
- [PR#440](https://github.com/EmbarkStudios/cargo-deny/pull/440) fixed [#438](https://github.com/EmbarkStudios/cargo-deny/issues/438) by ensuring git cli output was piped properly rather than polluting the output of cargo-deny itself.
17+
- [PR#443](https://github.com/EmbarkStudios/cargo-deny/pull/443) fixed [#442](https://github.com/EmbarkStudios/cargo-deny/issues/442) by removing the signature check on the HEAD commit an advisory databases. This check didn't add meaningful security and could cause spurious failures if an unsigned commit was pushed to an advisory database.
18+
19+
### Changed
20+
- [PR#431](https://github.com/EmbarkStudios/cargo-deny/pull/431) updated clap to 3.2. Thanks [@epage](https://github.com/epage)!
21+
1122
## [0.12.1] - 2022-05-19
1223
### Fixed
1324
- [PR#426](https://github.com/EmbarkStudios/cargo-deny/pull/426) fixed an oversight in [PR#422](https://github.com/EmbarkStudios/cargo-deny/pull/422), fully resolving [#412](https://github.com/EmbarkStudios/cargo-deny/issues/412) by allowing both `https` and `ssh` URLs for advisory databases. Thanks [@jbg](https://github.com/jbg)!

Cargo.lock

Lines changed: 29 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@ path = "src/cargo-deny/main.rs"
2828
default = ["vendored-openssl"]
2929
# Allows the use of a vendored version openssl when compiling libgit, which allows
3030
# us to compile static executables (eg musl) and avoid system dependencies
31-
vendored-openssl = ["cargo?/vendored-openssl", "crates-index/vendored-openssl", "git2/vendored-openssl"]
31+
vendored-openssl = [
32+
"cargo?/vendored-openssl",
33+
"crates-index/vendored-openssl",
34+
"git2/vendored-openssl",
35+
]
3236
# Allows embedding cargo as a library so that we can run in minimal (eg container)
3337
# environments that don't need to have cargo/rust installed on them for cargo-deny
3438
# to still function
@@ -46,7 +50,7 @@ atty = "0.2"
4650
# Used to track various things during check runs
4751
bitvec = { version = "1.0", features = ["alloc"] }
4852
# Allows us to do eg cargo metadata operations without relying on an external cargo
49-
cargo = { version = "0.61", optional = true }
53+
cargo = { version = "0.63", optional = true }
5054
# Argument parsing
5155
clap = { version = "3.2.1", features = ["derive", "env"] }
5256
# Used for diagnostic reporting
@@ -65,20 +69,20 @@ git2 = "0.14"
6569
# We need to figure out HOME/CARGO_HOME in some cases
6670
home = "0.5"
6771
# Provides graphs on top of cargo_metadata
68-
krates = { version = "0.10", features = ["targets"] }
72+
krates = { version = "0.11", features = ["targets"] }
6973
# Log macros
7074
log = "0.4"
7175
# Moar brrrr
7276
rayon = "1.4"
7377
# Used for interacting with advisory databases
74-
rustsec = { version = "0.25", default-features = false }
78+
rustsec = { version = "0.26", default-features = false }
7579
# Parsing and checking of versions/version requirements
7680
semver = "1.0"
7781
# Gee what could it be
7882
serde = { version = "1.0", features = ["derive"] }
7983
serde_json = "1.0"
8084
# Avoid some heap allocations when we likely won't need them
81-
smallvec = "1.6"
85+
smallvec = "1.9"
8286
# Used for parsing and checking SPDX license expressions
8387
spdx = "0.8"
8488
# Timestamp emission

src/advisories/helpers.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::{Krate, Krates};
22
use anyhow::{Context, Error};
33
use log::{debug, info};
4-
pub use rustsec::{advisory::Id, lockfile::Lockfile, Database, Vulnerability};
4+
pub use rustsec::{advisory::Id, Database, Lockfile, Vulnerability};
55
use std::path::{Path, PathBuf};
66
use url::Url;
77

@@ -659,7 +659,7 @@ pub(crate) fn krate_for_pkg<'a>(
659659
.map(|(ind, krate)| (ind, &krate.krate))
660660
}
661661

662-
pub use rustsec::warning::{Kind, Warning};
662+
pub use rustsec::{Warning, WarningKind};
663663

664664
pub struct Report {
665665
pub vulnerabilities: Vec<Vulnerability>,
@@ -685,7 +685,6 @@ impl Report {
685685
// any here
686686
target_arch: None,
687687
target_os: None,
688-
package_scope: None,
689688
// We handle the severity ourselves
690689
severity: None,
691690
// We handle the ignoring of particular advisory ids ourselves
@@ -728,9 +727,9 @@ impl Report {
728727
}
729728

730729
match kind {
731-
Kind::Notice => notices.append(&mut wi),
732-
Kind::Unmaintained => unmaintained.append(&mut wi),
733-
Kind::Unsound => unsound.append(&mut wi),
730+
WarningKind::Notice => notices.append(&mut wi),
731+
WarningKind::Unmaintained => unmaintained.append(&mut wi),
732+
WarningKind::Unsound => unsound.append(&mut wi),
734733
_ => unreachable!(),
735734
}
736735
}
@@ -745,12 +744,16 @@ impl Report {
745744
}
746745
}
747746

748-
pub fn iter_warnings(&self) -> impl Iterator<Item = (Kind, &Warning)> {
747+
pub fn iter_warnings(&self) -> impl Iterator<Item = (WarningKind, &Warning)> {
749748
self.notices
750749
.iter()
751-
.map(|wi| (Kind::Notice, wi))
752-
.chain(self.unmaintained.iter().map(|wi| (Kind::Unmaintained, wi)))
753-
.chain(self.unsound.iter().map(|wi| (Kind::Unsound, wi)))
750+
.map(|wi| (WarningKind::Notice, wi))
751+
.chain(
752+
self.unmaintained
753+
.iter()
754+
.map(|wi| (WarningKind::Unmaintained, wi)),
755+
)
756+
.chain(self.unsound.iter().map(|wi| (WarningKind::Unsound, wi)))
754757
}
755758
}
756759

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ pub mod sources;
9494
pub use cfg::{Spanned, UnvalidatedConfig};
9595
use krates::cm;
9696
pub use krates::{DepKind, Kid, Utf8PathBuf};
97-
pub use rustsec::package::source::SourceId;
97+
pub use rustsec::package::SourceId;
9898

9999
/// The possible lint levels for the various lints. These function similarly
100100
/// to the standard [Rust lint levels](https://doc.rust-lang.org/rustc/lints/levels.html)

src/sources.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn check(ctx: crate::CheckCtx<'_, ValidConfig>, mut sink: ErrorSink) {
7171
} else if source.is_git() {
7272
// Ensure the git source has at least the minimum specification
7373
if let Some((min, cfg_coord)) = &min_git_spec {
74-
pub use rustsec::package::source::GitReference;
74+
pub use rustsec::package::GitReference;
7575

7676
let spec = source
7777
.git_reference()

0 commit comments

Comments
 (0)