-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.11 KB
/
security-audit.yml
File metadata and controls
47 lines (38 loc) · 1.11 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
name: Security Audit
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- master
schedule:
# Run security audit daily at 00:00 UTC
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
cargo-audit:
name: Dependency Security Audit
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
ref: ${{ github.sha }}
fetch-depth: 1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo-audit
uses: actions/cache@v5
with:
path: ~/.cargo/bin/cargo-audit
key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.lock') }}
- name: Install cargo-audit
run: which cargo-audit || cargo install cargo-audit --locked
- name: Run cargo audit
run: cargo audit
- name: Report status
if: success()
run: echo "✅ No known vulnerabilities found in dependencies"