-
Notifications
You must be signed in to change notification settings - Fork 102
76 lines (59 loc) · 1.51 KB
/
Copy pathsecurity.yml
File metadata and controls
76 lines (59 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Security
on:
# Run weekly on Sundays
schedule:
- cron: '0 0 * * 0'
# Allow manual trigger
workflow_dispatch:
# Run on dependency changes
push:
paths:
- 'Cargo.toml'
- 'Cargo.lock'
env:
CARGO_TERM_COLOR: always
jobs:
audit:
runs-on: ubuntu-latest
name: Security audit
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
key: security-audit
# Install cargo-audit with caching
- name: Install cargo-audit
uses: taiki-e/install-action@v2
with:
tool: cargo-audit
- name: Run security audit
run: cargo audit
# License compatibility check
licenses:
runs-on: ubuntu-latest
name: License check
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
key: licenses
- name: Install cargo-deny
uses: taiki-e/install-action@v2
with:
tool: cargo-deny
- name: Check licenses
run: cargo deny check licenses
continue-on-error: true
- name: Check advisories
run: cargo deny check advisories
- name: Check bans
run: cargo deny check bans
continue-on-error: true