From e95bf721dc83f4dca9fd8ee1b07528737307f4c9 Mon Sep 17 00:00:00 2001 From: Tpt Date: Thu, 9 Dec 2021 18:39:50 +0100 Subject: [PATCH] Adds Cargo Deny --- .github/workflows/build.yml | 6 ++++++ deny.toml | 43 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 deny.toml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 78c60e9b..7aec6edd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,12 @@ jobs: - run: rustup update && rustup component add clippy - run: cargo clippy --all-targets --all-features + deny: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: EmbarkStudios/cargo-deny-action@v1 + test_linux: runs-on: ubuntu-latest steps: diff --git a/deny.toml b/deny.toml new file mode 100644 index 00000000..45cee58f --- /dev/null +++ b/deny.toml @@ -0,0 +1,43 @@ +[advisories] +vulnerability = "deny" +unmaintained = "warn" +yanked = "warn" +notice = "warn" +ignore = [] + +[licenses] +unlicensed = "deny" +allow = [ + "MIT", + "Apache-2.0", + "Apache-2.0 WITH LLVM-exception", + "CECILL-B" +] +copyleft = "deny" +allow-osi-fsf-free = "either" +default = "deny" +confidence-threshold = 0.8 +exceptions = [ + # Optional dependency (from sophia_api) + { allow = ["MPL-2.0"], name = "resiter", version = "*" } + +] + +[[licenses.clarify]] +name = "ring" +version = "*" +expression = "MIT AND ISC AND OpenSSL" +license-files = [ + { path = "LICENSE", hash = 0xbd0eed23 } +] + +[bans] +multiple-versions = "warn" +wildcards = "deny" +highlight = "all" + +[sources] +unknown-registry = "deny" +unknown-git = "deny" +allow-registry = ["https://github.com/rust-lang/crates.io-index"] +