ci(security): add cargo-deny checks for advisories, licenses, bans, sources
This commit is contained in:
@@ -20,3 +20,15 @@ jobs:
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
|
||||
cargo-deny:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
checks: [advisories, bans, licenses, sources]
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- uses: embarkstudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
|
||||
with:
|
||||
command: check ${{ matrix.checks }}
|
||||
log-level: warn
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
# cargo-deny configuration — https://embarkstud.io.github.io/cargo-deny/
|
||||
|
||||
[advisories]
|
||||
version = 2
|
||||
yanked = "deny"
|
||||
|
||||
[licenses]
|
||||
version = 2
|
||||
allow = [
|
||||
"MIT",
|
||||
"Apache-2.0",
|
||||
"Apache-2.0 WITH LLVM-exception",
|
||||
"BSD-2-Clause",
|
||||
"BSD-3-Clause",
|
||||
"ISC",
|
||||
"Unicode-3.0",
|
||||
"Zlib",
|
||||
"CDLA-Permissive-2.0",
|
||||
# via option-ext ← dirs-sys ← dirs
|
||||
"MPL-2.0",
|
||||
]
|
||||
|
||||
[bans]
|
||||
multiple-versions = "warn"
|
||||
|
||||
[sources]
|
||||
unknown-registry = "warn"
|
||||
Reference in New Issue
Block a user