Skip to content

Commit 5d58f86

Browse files
RanelkinRanel Karimov
andauthored
[SEC-3.a] cargo-audit CI job (#105)
* feat(SEC-3.a): add cargo-audit CI job + audit.toml allowlist (#39) Adds a security-rust job that runs cargo-audit against the Rust backend on every push and PR. The allowlist lives at src-tauri/audit.toml and is auto-discovered when the job runs in working-directory src-tauri. Note: master had previously removed all GitHub Actions workflows (commit bbc9929). This PR re-introduces .github/workflows/ci.yml, containing only the new security-rust job per the scope of #39. The previous frontend / backend jobs are intentionally not restored here; restoring them is out of scope and should be a separate change. Closes #39 * fix(SEC-3.a): move audit.toml to .cargo/, allowlist current advisories cargo-audit 0.22.1 auto-discovers .cargo/audit.toml (under cwd's .cargo/ subdir), not bare audit.toml in cwd. Move src-tauri/audit.toml to src-tauri/.cargo/audit.toml so the working-directory: src-tauri job step picks it up automatically. Also expand the allowlist to cover the 22 advisories currently flagged against the dep tree, each with a one-line justification: - 4 vulnerabilities with no upstream fix yet (rsa Marvin, 3x rustls-webpki reachable via the AWS SDK / hyper-rustls chain). - 16 unmaintained warnings (gtk-rs GTK3 family, proc-macro-error, unic-*). - 2 unsound warnings (glib VariantStrIter, lru IterMut). This lets `cargo audit --deny warnings` pass on a clean tree today and turns the job into a real gate against any NEW advisory landing in the dep tree. --------- Co-authored-by: Ranel Karimov <ranel.karimov@logscale-it.com>
1 parent 68df7b1 commit 5d58f86

2 files changed

Lines changed: 97 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
concurrency:
10+
group: ci-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
security-rust:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v6
18+
- uses: dtolnay/rust-toolchain@stable
19+
- uses: actions/cache@v5
20+
with:
21+
path: ~/.cargo/bin/cargo-audit
22+
key: cargo-audit-${{ runner.os }}
23+
restore-keys: cargo-audit-
24+
- name: Install cargo-audit
25+
run: cargo install --locked cargo-audit
26+
- name: Generate Cargo.lock
27+
run: cargo generate-lockfile --manifest-path src-tauri/Cargo.toml
28+
- name: Run cargo audit
29+
working-directory: src-tauri
30+
# cargo-audit auto-discovers .cargo/audit.toml relative to cwd, so
31+
# the project-local allowlist (src-tauri/.cargo/audit.toml) is
32+
# picked up here.
33+
run: cargo audit --deny warnings

src-tauri/.cargo/audit.toml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# cargo-audit allowlist for the bookie Rust crate.
2+
#
3+
# cargo-audit auto-discovers .cargo/audit.toml relative to its working
4+
# directory, so the CI job (`working-directory: src-tauri`) picks this file
5+
# up automatically.
6+
#
7+
# Add an entry under [advisories].ignore when an upstream advisory has no
8+
# patched version available AND the impact has been triaged. Each entry
9+
# MUST carry a short justification and, where relevant, a re-evaluation
10+
# trigger (e.g. "remove when aws-sdk-s3 bumps rustls"). Keep this list
11+
# small and review it regularly.
12+
#
13+
# Reference: https://github.com/rustsec/rustsec/tree/main/cargo-audit
14+
15+
[advisories]
16+
ignore = [
17+
# --- Vulnerabilities (no upstream fix as of 2026-05-09) ---
18+
# rsa Marvin Attack timing sidechannel. No fixed release of `rsa` available.
19+
# Pulled in transitively by sqlx-mysql (we do not use MySQL at runtime; the
20+
# crate is dragged in by the sqlx feature surface). Track upstream rsa fix.
21+
"RUSTSEC-2023-0071",
22+
# rustls-webpki name-constraint URI mishandling. Reaches us via an old
23+
# rustls 0.21 inside the AWS SDK / hyper-rustls stack. Remove once
24+
# aws-sdk-s3 / aws-smithy-runtime bump to a newer rustls / rustls-webpki.
25+
"RUSTSEC-2026-0098",
26+
# rustls-webpki name-constraint wildcard mishandling. Same upstream chain
27+
# as RUSTSEC-2026-0098; remove together when aws-sdk-s3 bumps.
28+
"RUSTSEC-2026-0099",
29+
# rustls-webpki reachable panic in CRL parsing. Same upstream chain as
30+
# RUSTSEC-2026-0098; remove together when aws-sdk-s3 bumps.
31+
"RUSTSEC-2026-0104",
32+
33+
# --- Unmaintained crates (transitive, no action available) ---
34+
# gtk-rs GTK3 bindings, all unmaintained. Pulled in by Tauri/wry on Linux.
35+
# Remove once Tauri migrates to GTK4 bindings.
36+
"RUSTSEC-2024-0411", # gdkwayland-sys
37+
"RUSTSEC-2024-0412", # gdk
38+
"RUSTSEC-2024-0413", # atk
39+
"RUSTSEC-2024-0414", # gdkx11-sys
40+
"RUSTSEC-2024-0415", # gtk
41+
"RUSTSEC-2024-0416", # atk-sys
42+
"RUSTSEC-2024-0417", # gdkx11
43+
"RUSTSEC-2024-0418", # gdk-sys
44+
"RUSTSEC-2024-0419", # gtk3-macros
45+
"RUSTSEC-2024-0420", # gtk-sys
46+
# proc-macro-error unmaintained; pulled in by older proc-macro consumers.
47+
# Remove once all consumers migrate to proc-macro-error2 / syn 2.
48+
"RUSTSEC-2024-0370",
49+
# unic-* family unmaintained; transitive via idna / sqlx text handling.
50+
# Remove once idna replaces unic-ucd with the in-tree icu_normalizer path.
51+
"RUSTSEC-2025-0075", # unic-char-range
52+
"RUSTSEC-2025-0080", # unic-common
53+
"RUSTSEC-2025-0081", # unic-char-property
54+
"RUSTSEC-2025-0098", # unic-ucd-version
55+
"RUSTSEC-2025-0100", # unic-ucd-ident
56+
57+
# --- Unsound (no upstream fix on the pulled-in versions) ---
58+
# glib VariantStrIter unsoundness. Pulled in via the GTK3 stack (same
59+
# rationale as the gtk-rs unmaintained set); remove with the GTK4 migration.
60+
"RUSTSEC-2024-0429",
61+
# lru IterMut unsoundness. Reaches us only as a transitive dep of
62+
# aws-sdk-s3. Remove once aws-sdk-s3 bumps lru.
63+
"RUSTSEC-2026-0002",
64+
]

0 commit comments

Comments
 (0)