Undocumented unsafe block
Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.
What it detects
An unsafe block has no `// SAFETY:` comment within a couple of lines documenting the invariant that makes it sound, contrary to the standard Rust convention (and Clippy’s undocumented_unsafe_blocks lint).
Why it matters
An unsafe block turns off the borrow checker and the other guarantees that make Rust memory-safe, so the one thing left protecting the program is whoever wrote that block getting the invariant right by hand. Without a comment recording what was checked and why it is sound, the next person to touch that code (including the original author, months later) has to re-derive the reasoning from scratch or trust it blindly. That is how a refactor quietly breaks an assumption an unsafe block depended on.
How to fix it
Add a comment directly above the block, or as its first line, starting with "// SAFETY:" that states the specific invariant this call site relies on (pointer non-null and aligned, index in bounds, lifetime still valid, and so on) and why it holds here. This is the convention used throughout the Rust standard library and enforced by Clippy's undocumented_unsafe_blocks lint, so tooling can help keep it honest going forward.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo