Skip to content

Commit 4e1b7c8

Browse files
framefilterclaude
andcommitted
ci: appease rustfmt; ignore RUSTSEC-2023-0071 with justification
Two fixes for the failed checks on the merge commit: - cargo fmt --check flagged a line wrap in the new import --qr error path; reformatted. - cargo audit fails on RUSTSEC-2023-0071 (Marvin timing attack in the rsa crate, no fixed release). keyroost-rsakey uses the crate only for host-side key generation and PKCS#1/PKCS#8 serialization during OpenPGP import — it never decrypts attacker-supplied ciphertexts, so the vulnerable path is unreachable. Ignored in .cargo/audit.toml with the reasoning recorded; the audit workflow now also re-runs when that config changes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent bffc05a commit 4e1b7c8

3 files changed

Lines changed: 15 additions & 4 deletions

File tree

.cargo/audit.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# cargo-audit configuration — advisory ignores need a written justification.
2+
3+
[advisories]
4+
ignore = [
5+
# Marvin Attack: timing side-channel in RSA PKCS#1 v1.5 *decryption*
6+
# (`rsa` crate, no fixed release). keyroost-rsakey uses the crate only
7+
# for host-side key generation and PKCS#1/PKCS#8 serialization during
8+
# OpenPGP import — it never decrypts attacker-supplied ciphertexts, so
9+
# the vulnerable code path is unreachable. Revisit when a fixed `rsa`
10+
# version ships.
11+
"RUSTSEC-2023-0071",
12+
]

.github/workflows/audit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ name: Security audit
66
on:
77
push:
88
branches: [main]
9-
paths: ['Cargo.lock', 'Cargo.toml', 'crates/**/Cargo.toml']
9+
paths: ['Cargo.lock', 'Cargo.toml', 'crates/**/Cargo.toml', '.cargo/audit.toml']
1010
pull_request:
11-
paths: ['Cargo.lock', 'Cargo.toml', 'crates/**/Cargo.toml']
11+
paths: ['Cargo.lock', 'Cargo.toml', 'crates/**/Cargo.toml', '.cargo/audit.toml']
1212
schedule:
1313
- cron: '17 6 * * 1' # Mondays 06:17 UTC
1414
workflow_dispatch:

crates/keyroostctl/src/main.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,8 +1363,7 @@ fn run() -> Result<(), Box<dyn std::error::Error>> {
13631363
match import.entries.len() {
13641364
0 => {
13651365
return Err(
1366-
"QR decoded, but no account could be imported (see skips above)"
1367-
.into(),
1366+
"QR decoded, but no account could be imported (see skips above)".into(),
13681367
)
13691368
}
13701369
1 => import.entries.into_iter().next().unwrap(),

0 commit comments

Comments
 (0)