Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/add-cargo-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@googleworkspace/cli": patch
---

Add cargo-deny configuration for license, advisory, and source auditing
49 changes: 49 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# cargo-deny configuration
Comment thread
jpoehnelt marked this conversation as resolved.
Comment thread
jpoehnelt marked this conversation as resolved.
Comment thread
jpoehnelt marked this conversation as resolved.
# https://embarkstudios.github.io/cargo-deny/

[graph]
targets = [
"x86_64-unknown-linux-gnu",
"x86_64-unknown-linux-musl",
"aarch64-unknown-linux-gnu",
"aarch64-unknown-linux-musl",
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-pc-windows-msvc",
]

# Advisories — checks for known vulnerable crate versions
[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
Comment thread
jpoehnelt marked this conversation as resolved.
Outdated
Comment thread
jpoehnelt marked this conversation as resolved.
Comment thread
jpoehnelt marked this conversation as resolved.
Comment thread
jpoehnelt marked this conversation as resolved.

# Licenses — allowlist of acceptable licenses
[licenses]
allow = [
Comment thread
jpoehnelt marked this conversation as resolved.
"Apache-2.0",
"Apache-2.0 WITH LLVM-exception",
"MIT",
"BSD-2-Clause",
"BSD-3-Clause",
"ISC",
"Unicode-3.0",
"Unicode-DFS-2016",
"Zlib",
"OpenSSL",
"MPL-2.0",
"CC0-1.0",
"BSL-1.0",
]

# Bans — reject problematic and duplicate crates
[bans]
multiple-versions = "warn"
Comment thread
jpoehnelt marked this conversation as resolved.
Comment thread
jpoehnelt marked this conversation as resolved.
Comment thread
jpoehnelt marked this conversation as resolved.
Comment thread
jpoehnelt marked this conversation as resolved.
wildcards = "deny"
deny = []

# Sources — restrict where crates can come from
[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-registry = ["https://github.com/rust-lang/crates.io-index", "https://index.crates.io/"]
allow-git = []
Loading