Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit ceba7a7

Browse files
authored
Setup cargo-deny
1 parent 894dcc6 commit ceba7a7

File tree

10 files changed

+37
-8
lines changed

10 files changed

+37
-8
lines changed

.devcontainer/install-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ set -eux
55
# Note that this script runs as user 'vscode' during devcontainer setup.
66

77
# Rust global tools, needed to run CI scripts
8-
"$HOME/.cargo/bin/cargo" install cargo-audit [email protected] cargo-llvm-cov
8+
"$HOME/.cargo/bin/cargo" install cargo-audit [email protected] cargo-llvm-cov cargo-deny
99
"$HOME/.cargo/bin/rustup" component add llvm-tools-preview
1010

1111
# NPM global tools

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ env:
1818
CARGO_TERM_COLOR: always
1919
SCCACHE_DIR: ${{github.workspace}}/sccache/
2020
SCCACHE_CACHE_SIZE: 1G
21-
ACTIONS_CACHE_KEY_DATE: 2022-10-28-01
21+
ACTIONS_CACHE_KEY_DATE: 2022-11-21-01
2222
CI: true
2323
DOTNET_VERSION: 7.0.x
2424

src/agent/dynamic-library/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
name = "dynamic-library"
33
version = "0.1.0"
44
edition = "2021"
5+
license = "MIT"
56

67
[dependencies]
78
anyhow = "1.0"
@@ -26,7 +27,7 @@ features = [
2627
"shellapi",
2728
"werapi",
2829
"winbase",
29-
"winerror"
30+
"winerror",
3031
]
3132

3233
[[bin]]

src/agent/onefuzz-agent/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ version = "0.1.0"
44
authors = ["[email protected]"]
55
edition = "2018"
66
publish = false
7+
license = "MIT"
78

89
[dependencies]
910
anyhow = { version = "1.0", features = ["backtrace"] }
@@ -13,7 +14,11 @@ env_logger = "0.9"
1314
futures = "0.3"
1415
log = "0.4"
1516
onefuzz = { path = "../onefuzz" }
16-
reqwest = { version = "0.11", features = ["json", "stream", "native-tls-vendored"], default-features = false}
17+
reqwest = { version = "0.11", features = [
18+
"json",
19+
"stream",
20+
"native-tls-vendored",
21+
], default-features = false }
1722
serde = { version = "1.0", features = ["derive"] }
1823
serde_json = "1.0"
1924
storage-queue = { path = "../storage-queue" }

src/agent/stacktrace-parser/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name = "stacktrace-parser"
33
version = "0.1.0"
44
authors = ["<[email protected]>"]
55
edition = "2018"
6+
license = "MIT"
67

78
[dependencies]
89
anyhow = "1.0"

src/ci/agent.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ cargo fmt -- --check
5151
# RUSTSEC-2022-0048: xml-rs is unmaintained
5252
# RUSTSEC-2021-0139: ansi_term is unmaintained
5353
cargo audit --deny warnings --deny unmaintained --deny unsound --deny yanked --ignore RUSTSEC-2022-0048 --ignore RUSTSEC-2021-0139
54+
cargo deny -L error check
5455
cargo license -j > data/licenses.json
5556
cargo build --release --locked
5657
cargo clippy --release --locked --all-targets -- -D warnings

src/ci/proxy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ cargo clippy --release --all-targets -- -D warnings
1515
# RUSTSEC-2022-0048: xml-rs is unmaintained
1616
# RUSTSEC-2021-0139: ansi_term is unmaintained
1717
cargo audit --deny warnings --deny unmaintained --deny unsound --deny yanked --ignore RUSTSEC-2022-0048 --ignore RUSTSEC-2021-0139
18+
cargo deny -L error check
1819
cargo license -j > data/licenses.json
1920
cargo build --release --locked
2021
# export RUST_LOG=trace
2122
export RUST_BACKTRACE=full
22-
cargo test --release
23+
cargo test --release --locked
2324

2425
cp target/release/onefuzz-proxy-manager ../../artifacts/proxy

src/ci/rust-prereqs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fi
1111
# sccache --start-server
1212
# export RUSTC_WRAPPER=$(which sccache)
1313

14-
cargo install cargo-audit cargo-llvm-cov
14+
cargo install cargo-audit cargo-llvm-cov cargo-deny
1515

1616
if ! cargo license --help; then
1717
cargo install [email protected]

src/deny.toml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[licenses]
2+
allow = [
3+
"Apache-2.0 WITH LLVM-exception",
4+
"Apache-2.0",
5+
"BSD-3-Clause",
6+
"CC0-1.0",
7+
"ISC",
8+
"MIT",
9+
"Zlib",
10+
]
11+
12+
[bans]
13+
14+
# disallow rustls; we must use OpenSSL
15+
[[bans.deny]]
16+
name = "rustls"
17+
18+
# disallow ring; unapproved crypto
19+
[[bans.deny]]
20+
name = "ring"

src/proxy-manager/Cargo.lock

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

0 commit comments

Comments
 (0)