Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .cargo/audit.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ ignore = [
"RUSTSEC-2025-0057",
# RUSTSEC-2025-0134: rustls-pemfile unmaintained - dev-only via bollard/testcontainers
# Waiting for upstream bollard fix
"RUSTSEC-2025-0134"
"RUSTSEC-2025-0134",
# RUSTSEC-2026-0066: astral-tokio-tar pax extension validation - dev-only via testcontainers
# Waiting for upstream testcontainers fix
"RUSTSEC-2026-0066"
]
# Warn about unmaintained crates but don't fail
informational_warnings = ["unmaintained"]
5 changes: 5 additions & 0 deletions .jules/sentinel.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@
**Vulnerability:** A `constant_time_eq` implementation iterated `max(a.len(), b.len())` times, exposing a DoS vector where a large input would cause excessive CPU usage.
**Learning:** Attempts to "avoid leaking length" by checking all bytes can inadvertently introduce algorithmic complexity vulnerabilities. Standard practice is to check length first (leaking length but preventing DoS) and then compare in constant time.
**Prevention:** Prefer `subtle` crate or idiomatic constant-time comparisons that explicitly handle length checks to bound execution time.

## 2025-03-29 - Compiler Optimization Vulnerabilities in Constant-Time Comparisons
**Vulnerability:** The custom `constant_time_eq` implementation used a `fold` operation over bytes with `x ^ y`. While seemingly constant-time, modern compilers (like LLVM) can aggressively auto-vectorize or short-circuit such manual loops, potentially re-introducing timing side-channels.
**Learning:** Writing truly constant-time code in high-level languages requires explicit compiler directives (e.g., black boxes or inline assembly) to prevent optimizations.
**Prevention:** Never write manual constant-time comparison loops. Always use the `subtle` crate's `ConstantTimeEq` trait, which is specifically designed to guarantee constant-time evaluation against aggressive compiler optimizations.
Loading
Loading