sota-rust — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited sota-rust (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
This skill encodes the 2026 state of the art for production Rust: the idioms, security posture, performance discipline, and CI baseline expected of an expert Rust codebase. Baseline as of mid-2026: stable Rust 1.96 (May 2026), edition 2024 (next edition expected ~2027), tokio still 1.x. It serves two modes — BUILD (write new code to this standard) and AUDIT (find where existing code falls short, with severity and evidence). The detailed rules live in rules/*.md; load only the files relevant to the task (see index below). Every rules file ends with an "Audit checklist" of grep/clippy patterns — use those verbatim in AUDIT mode.
When writing or modifying Rust code:
rules/ files fromthe index. Touching async code? Load 04. Adding a dependency or parsing network input? Load 05. Writing any unsafe? Load 03 — no exceptions.
subsystem (thiserror for libs, anyhow for apps), ownership tree before Arc<Mutex<_>>, public API minimal and borrowed (&str/&[T] params). Parse, don't validate: constructors enforce invariants.
They are defaults, not suggestions; deviations carry a written justification at the site (e.g. expect with invariant message, #[allow(lint, reason = "...")]).
[lints],deny.toml + cargo deny in CI for anything deployed, Miri job if unsafe exists, nextest, MSRV declared and tested, benches for claimed-hot paths. See rules/07 §9 for the CI shape to copy.
cargo fmt --check, `cargo clippy--all-targets --all-features -- -D warnings, cargo nextest run + cargo test --doc, and cargo doc warning-free for libraries. If you wrote unsafe: cargo +nightly miri test` over it. If you claimed performance: show the benchmark.
justified clones, cancel-safety of select! arms, SAFETY comments, channel-capacity choices, poisoning policy.
When reviewing or auditing existing Rust:
cargo metadata/workspace layout, Cargo.toml profilesand features, CI config, rg 'unsafe' --count-matches, dependency tree (cargo tree -d). This decides which rules files to load and where risk concentrates (network input? unsafe? async service?).
are ordered grep/clippy hunts with pre-calibrated severities.
lead, not a finding. Confirm reachability (is the unwrap on an attacker-influenced path?) before assigning severity.
findings over volume. Note positive observations where the code is already SOTA (prevents "fixes" that regress good decisions).
| Severity | Meaning | Examples |
|---|---|---|
| Critical | Exploitable now, or UB | reachable UB, unsound safe API, SQLi/path traversal, authn bypass, unwinding across FFI, secrets in logs+repo |
| High | Exploitable under realistic conditions, or correctness loss | attacker-reachable panic/OOM (DoS), wrapped arithmetic on untrusted lengths, cancellation data loss, deadlock (block_on in async, lock across await), unbounded channels fed by network, missing dep-audit in deployed-service CI |
| Medium | Latent defect or eroded defense | missing SAFETY comments, no Miri CI on unsafe crate, swallowed errors (.ok(), filter_map(Result::ok)) uncommented, untested MSRV, non-additive features, orphaned spawned tasks |
| Low | Hygiene, idiom, maintainability | clone-to-satisfy-borrowck, index loops, missing #[non_exhaustive], missing # Errors docs, blanket #[allow] without reason |
Severity scales with reachability (attacker-controlled > user > operator > build-time) and blast radius (process death > request failure > slow).
[SEVERITY] short title
Where: path/to/file.rs:123 (fn name / module)
What: the defect, in one or two sentences
Why: concrete consequence (exploit path, failure mode, cost)
Fix: specific change — code sketch or named pattern from rules/NN
Refs: rules/NN §M; clippy lint or RUSTSEC id if applicableGroup findings by severity, Critical first. End with: checklist coverage (which rules files were applied), what was not reviewed, and quick wins (one-line fixes with outsized value).
| File | Read this when... |
|---|---|
| rules/01-ownership-and-api-design.md | Designing structs/traits/modules/workspaces; fighting the borrow checker; deciding clone vs borrow vs Rc/Arc; newtype, typestate, builder patterns; sealed traits, coherence; exhaustive matching; iterator-chain idioms |
| rules/02-errors-and-panics.md | Choosing thiserror vs anyhow/eyre; designing error enums; unwrap/expect policy and invariant messages; context discipline; panic policy for servers and FFI; Option/Result combinator flow |
| rules/03-unsafe-discipline.md | Writing or reviewing ANY unsafe; SAFETY comment standards; UB catalog (aliasing, uninit, transmute, FFI lifetimes); Miri/sanitizers/loom in CI; cargo-geiger; soundness review protocol |
| rules/04-async-tokio.md | Anything async: tokio, spawn vs spawn_blocking, Send/Sync bound errors, select! and cancellation safety, JoinSet/TaskTracker, channel selection, locks across await, async traits, graceful shutdown |
| rules/05-security-supply-chain.md | Network-facing or deployed code; adding dependencies; cargo audit/deny/vet; integer overflow on untrusted input; panic-DoS; zeroize/constant-time for secrets; serde hardening (untagged enums, size limits); service-edge defaults |
| rules/06-performance.md | Performance work or claims: profiling (samply/perf/flamegraph, criterion/divan), allocation reduction (Cow/SmallVec/buffer reuse), accidental clones, iterator fusion, release profile (LTO, codegen-units, panic=abort), PGO |
| rules/07-tooling-ci.md | Setting up or auditing repo scaffolding: clippy policy and pedantic triage, rustfmt, nextest, MSRV declaration+testing, additive feature flags, docs.rs discipline, edition 2024 migration, CI baseline. *Test strategy — suite shape, TDD, doubles, test data, flake policy — lives in `sota-testing`; load it for any build that writes logic. This file owns Rust runner mechanics only.* |
? +context; expect("...") only with a message proving the invariant. An attacker-reachable panic is a DoS. (rules/02)
API's documented preconditions, and lives behind a sound safe abstraction. Unsafe code without Miri in CI is unaudited code. (rules/03)
#[source] chains. Applications:anyhow with .context().** Never anyhow::Error in a public lib API; never silently swallowed errors. (rules/02)
std::thread::sleep, orsustained CPU inside async fn; spawn_blocking or a compute pool. No std::sync::MutexGuard held across .await. (rules/04)
dropped at any .await; cancel-unsafe ops don't go in select! arms; invariants spanning awaits get drop guards. Spawned tasks are owned (JoinSet/TaskTracker), never orphaned. (rules/04)
checked_*/try_into on lengths (release mode wraps silently), body-size caps before parsing, no #[serde(untagged)] or uncapped with_capacity on hostile data. (rules/05)
cargo deny/cargo audit on PRs +scheduled, Cargo.lock committed, new deps vetted (cargo vet or documented review), git deps pinned by rev. (rules/05)
SecretString/Zeroizing), redacted fromDebug/logs, and compared in constant time** (ct_eq). Key material only from OS randomness. (rules/05)
only read.** &str/&[T] in signatures, split borrows, mem::take; newtypes over primitive obsession; exhaustive matches (no lazy _ => on owned enums). (rules/01)
-D warnings (triaged pedantic) + nextest +doctests + MSRV job + feature-matrix check.** Performance claims require benchmarks; release profile (LTO/codegen-units/panic strategy) is a deliberate, documented choice. (rules/06, 07)
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.