Skip to content

Commit

Permalink
adds cargo deny
Browse files Browse the repository at this point in the history
  • Loading branch information
montekki committed May 2, 2024
1 parent 33d7d7a commit 5ecddd7
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/cargo-deny.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Cargo Deny

on:
push:
branches:
- main
pull_request:
merge_group:

env:
CARGO_TERM_COLOR: always

jobs:
cargo_deny:
runs-on: [matterlabs-ci-runner]
strategy:
matrix:
checks:
- advisories
- bans licenses sources

# Prevent sudden announcement of a new advisory from failing ci:
continue-on-error: ${{ matrix.checks == 'advisories' }}

steps:
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
- uses: EmbarkStudios/cargo-deny-action@v1
with:
command: check ${{ matrix.checks }}
70 changes: 70 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
targets = []
all-features = false
no-default-features = false
feature-depth = 1

[advisories]
db-path = "~/.cargo/advisory-db"
db-urls = ["https://github.com/rustsec/advisory-db"]
vulnerability = "deny"
unmaintained = "warn"
yanked = "warn"
notice = "warn"
ignore = [
"RUSTSEC-2023-0052"
]

[licenses]
unlicensed = "deny"
copyleft = "deny"
allow = [
"MIT",
"Apache-2.0",
"ISC",
"Unlicense",
"MPL-2.0",
"Unicode-DFS-2016",
"CC0-1.0",
"BSD-2-Clause",
"BSD-3-Clause",
"OpenSSL",
]
deny = []
allow-osi-fsf-free = "neither"
default = "deny"
confidence-threshold = 0.8
exceptions = []

[[licenses.clarify]]
name = "ring"
version = "*"
expression = "MIT AND ISC AND OpenSSL"
license-files = [
{ path = "LICENSE", hash = 0xbd0eed23 }
]

[licenses.private]
ignore = false
registries = []

[bans]
multiple-versions = "warn"
wildcards = "allow"
highlight = "all"
workspace-default-features = "allow"
external-default-features = "allow"
allow = []
deny = []
skip = []
skip-tree = []

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

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

0 comments on commit 5ecddd7

Please sign in to comment.