Skip to content

Commit ab24457

Browse files
Merge pull request krustlet#641 from stackabletech/iss640_securityaudit
Add github actions to run cargo-audit on pull requests and daily
2 parents e6e3178 + 992caf3 commit ab24457

3 files changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,18 @@ jobs:
169169
with:
170170
name: e2e-logs
171171
path: oneclick-logs/
172+
173+
cargo-deny:
174+
name: Run cargo deny
175+
runs-on: ubuntu-latest
176+
strategy:
177+
matrix:
178+
checks:
179+
- advisories
180+
- bans licenses sources
181+
182+
steps:
183+
- uses: actions/checkout@v2
184+
- uses: EmbarkStudios/cargo-deny-action@v1
185+
with:
186+
command: check ${{ matrix.checks }}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Security audit
2+
on:
3+
schedule:
4+
- cron: '0 0 * * *'
5+
workflow_dispatch:
6+
7+
jobs:
8+
audit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2.3.4
12+
- uses: actions-rs/audit-check@v1.2.0
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}

deny.toml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[licenses]
2+
3+
confidence-threshold = 1.0
4+
copyleft = "deny"
5+
6+
unlicensed = "deny"
7+
8+
# List of explictly allowed licenses
9+
# See https://spdx.org/licenses/ for list of possible licenses
10+
# [possible values: any SPDX 3.11 short identifier (+ optional exception)].
11+
allow = [
12+
"Apache-2.0",
13+
"Apache-2.0 WITH LLVM-exception",
14+
"BSD-3-Clause",
15+
"CC0-1.0",
16+
"ISC",
17+
"LicenseRef-ring",
18+
"LicenseRef-webpki",
19+
"MIT",
20+
"Zlib"
21+
]
22+
23+
deny = [
24+
"AGPL-3.0"
25+
]
26+
27+
[[licenses.clarify]]
28+
name = "ring"
29+
expression = "LicenseRef-ring"
30+
license-files = [
31+
{ path = "LICENSE", hash = 0xbd0eed23 },
32+
]
33+
34+
[[licenses.clarify]]
35+
name = "webpki"
36+
expression = "LicenseRef-webpki"
37+
license-files = [
38+
{ path = "LICENSE", hash = 0x001c7e6c },
39+
]

0 commit comments

Comments
 (0)