Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cargo deny to CI #263

Merged
merged 1 commit into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,28 @@ jobs:

- name: Upload Code Coverage
uses: codecov/codecov-action@v3

cargo-deny:
name: Cargo Deny
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v3

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable

- name: Install cargo-deny
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-deny

- name: Cargo Deny - Check
uses: actions-rs/cargo@v1
with:
command: deny
args: check
52 changes: 52 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

[advisories]
ignore = [
# https://rustsec.org/advisories/RUSTSEC-2021-0145
# 1. On windows, `atty` dereferences a potentially unaligned pointer.
# 2. Last release of `atty` was almost 3 years ago.
"RUSTSEC-2021-0145",

# https://rustsec.org/advisories/RUSTSEC-2021-0127
# 1. serde_cbor is unmaintained
"RUSTSEC-2021-0127"
]
notice = "deny"
unmaintained = "warn"
vulnerability = "deny"
yanked = "deny"

[licenses]
allow = [
"Apache-2.0",
"BSD-2-Clause",
"BSD-3-Clause",
"CC0-1.0",
"MIT",
"Unicode-DFS-2016",
]
default = "deny"
confidence-threshold = 1.0
unlicensed = "deny"

[bans]
allow = []
deny = []
# TODO before changing to 'deny':
# * Resolve duplicate versions of itoa (used by criterion)
# * Remove atty from criterion
# * Resolve duplicate versions of constant_time_eq (used by blake2_sid and blake3)
multiple-versions = "warn"
skip = []
skip-tree = []
wildcards = "warn"

[sources]
allow-git = []
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
unknown-git = "deny"
unknown-registry = "deny"

[sources.allow-org]
github = []
gitlab = []
bitbucket = []