Skip to content

Commit 43308fe

Browse files
authored
Add security workflow and Dependabot configuration (#7)
- Add GitHub Actions workflow for security auditing - Include cargo-audit for vulnerability scanning - Include cargo-deny for supply chain security checks - Add Dependabot configuration for automated dependency updates - Monitor both Cargo dependencies and GitHub Actions - Schedule weekly security scans and dependency checks
1 parent 675ce03 commit 43308fe

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
3+
updates:
4+
# Cargo dependencies
5+
- package-ecosystem: "cargo"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
day: "monday"
10+
time: "06:00"
11+
open-pull-requests-limit: 10
12+
reviewers:
13+
- "douglaz"
14+
assignees:
15+
- "douglaz"
16+
commit-message:
17+
prefix: "cargo"
18+
include: "scope"
19+
labels:
20+
- "dependencies"
21+
- "rust"
22+
23+
# GitHub Actions
24+
- package-ecosystem: "github-actions"
25+
directory: "/"
26+
schedule:
27+
interval: "weekly"
28+
day: "monday"
29+
time: "06:00"
30+
open-pull-requests-limit: 5
31+
reviewers:
32+
- "douglaz"
33+
assignees:
34+
- "douglaz"
35+
commit-message:
36+
prefix: "ci"
37+
include: "scope"
38+
labels:
39+
- "dependencies"
40+
- "github-actions"

.github/workflows/security.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Security
2+
3+
on:
4+
push:
5+
branches: [ main, master, develop ]
6+
pull_request:
7+
branches: [ main, master, develop ]
8+
schedule:
9+
# Run security audit weekly on Sundays at 6 AM UTC
10+
- cron: '0 6 * * 0'
11+
12+
env:
13+
CARGO_TERM_COLOR: always
14+
15+
jobs:
16+
security-audit:
17+
name: Security Audit
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v5
23+
24+
- name: Install Rust toolchain
25+
uses: dtolnay/rust-toolchain@stable
26+
27+
- name: Cache cargo dependencies
28+
uses: actions/cache@v4
29+
with:
30+
path: |
31+
~/.cargo/registry
32+
~/.cargo/git
33+
key: audit-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
34+
35+
- name: Install cargo-audit
36+
run: cargo install cargo-audit
37+
38+
- name: Run cargo audit
39+
run: cargo audit
40+
41+
- name: Run cargo audit (JSON output)
42+
run: cargo audit --json > audit-results.json
43+
continue-on-error: true
44+
45+
- name: Upload audit results
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: security-audit-results
49+
path: audit-results.json
50+
retention-days: 30
51+
52+
supply-chain-security:
53+
name: Supply Chain Security
54+
runs-on: ubuntu-latest
55+
56+
steps:
57+
- name: Checkout code
58+
uses: actions/checkout@v5
59+
60+
- name: Install Rust toolchain
61+
uses: dtolnay/rust-toolchain@stable
62+
63+
- name: Cache cargo dependencies
64+
uses: actions/cache@v4
65+
with:
66+
path: |
67+
~/.cargo/registry
68+
~/.cargo/git
69+
key: supply-chain-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
70+
71+
- name: Install cargo-deny
72+
run: cargo install cargo-deny
73+
74+
- name: Run cargo deny
75+
run: cargo deny check

0 commit comments

Comments
 (0)