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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Security Audit
on:
push:
branches:
pull_request:
branches:
schedule:
# Run security audit daily at 6:00 AM UTC
- cron: '0 6 * * *'
workflow_dispatch:
permissions:
contents: read
security-events: write
env:
CARGO_TERM_COLOR: always
jobs:
# ===========================================================================
# Rust Security Audit
# ===========================================================================
cargo-audit:
name: Cargo Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Run security audit
run: cargo audit --deny warnings
# ===========================================================================
# Cargo Deny (License & Vulnerability Check)
# ===========================================================================
cargo-deny:
name: Cargo Deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: EmbarkStudios/cargo-deny-action@v2
with:
log-level: warn
command: check
arguments: --all-features
# ===========================================================================
# MSRV (Minimum Supported Rust Version) Check
# ===========================================================================
msrv:
name: MSRV Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@1.89.0 # MSRV
- uses: Swatinem/rust-cache@v2
- name: Build with MSRV
run: cargo build --all-features
# ===========================================================================
# Secret Scanning
# ===========================================================================
secrets:
name: Secret Scanning
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@main
with:
path: ./
base: ""
head: ${{ github.ref_name }}
extra_args: --only-verified
# ===========================================================================
# Dependency Review (PRs only)
# ===========================================================================
dependency-review:
name: Dependency Review
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/checkout@v4
- name: Dependency Review
uses: actions/dependency-review-action@v4
with:
fail-on-severity: moderate
deny-licenses: GPL-3.0, AGPL-3.0