Skip to content

Commit e66b7bf

Browse files
committed
chore: add dependabot and security audit hardening
1 parent 3796738 commit e66b7bf

2 files changed

Lines changed: 80 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "cargo"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
day: "monday"
8+
open-pull-requests-limit: 10
9+
labels:
10+
- "dependencies"
11+
groups:
12+
cargo-dependencies:
13+
patterns:
14+
- "*"
15+
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
18+
schedule:
19+
interval: "weekly"
20+
day: "monday"
21+
labels:
22+
- "dependencies"
23+
- "github-actions"
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "Security Audit"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
paths:
7+
- "**/Cargo.toml"
8+
- "**/Cargo.lock"
9+
pull_request:
10+
branches: [ "main" ]
11+
paths:
12+
- "**/Cargo.toml"
13+
- "**/Cargo.lock"
14+
schedule:
15+
- cron: "30 2 * * 1"
16+
17+
jobs:
18+
audit:
19+
name: Cargo Security Audit
20+
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
23+
security-events: write
24+
steps:
25+
- name: Checkout repository
26+
uses: actions/checkout@v4
27+
28+
- name: Install Rust toolchain
29+
uses: dtolnay/rust-toolchain@stable
30+
31+
- name: Cache cargo registry
32+
uses: actions/cache@v4
33+
with:
34+
path: |
35+
~/.cargo/registry
36+
~/.cargo/git
37+
key: ${{ runner.os }}-cargo-audit-${{ hashFiles('**/Cargo.lock') }}
38+
39+
- name: Install cargo-audit
40+
run: cargo install cargo-audit
41+
42+
- name: Run security audit
43+
run: cargo audit
44+
45+
deny:
46+
name: Cargo Deny
47+
runs-on: ubuntu-latest
48+
permissions:
49+
contents: read
50+
steps:
51+
- name: Checkout repository
52+
uses: actions/checkout@v4
53+
54+
- name: Check licenses and bans
55+
uses: EmbarkStudios/cargo-deny-action@v1
56+
with:
57+
command: check advisories licenses bans

0 commit comments

Comments
 (0)