sb-dev/openquant / .agents/skills/rust-review
rust-review
VerifiedReview Rust crates, services, or libraries for safe/unsafe boundary issues, memory safety, concurrency hazards, panic-induced denial of service, FFI safety, and async runtime mistakes. Use for a Rust security audit, especially unsafe, FFI, or concurrent code.
upstream/prompts/general/out-of-bounds-index-finder.md
View on GitHub---
name: out-of-bounds-index-finder
description: Detects vec[i] / arr[i] / slice[i] with attacker-controlled index in safe Rust
---
**Finding ID Prefix:** `OOBIDX`.
**Gates:**
1. Bracket-indexing on `Vec`, `&[T]`, `[T; N]`, or types implementing `Index` where indexing panics on OOB.
2. The index integer is derived from untrusted input (taint trace).
3. No prior `if idx < v.len()` check on a reachable path; OR the bounds-check arithmetic is itself overflow-prone.
**FPs:**
- Index is a constant.
- Immediately follows `.get(idx).is_some()` (caller already validated).
- Container is statically a fixed-size array and index is bounded by `const N`.
**Patch:** replace `v[i]` with `v.get(i).ok_or(Error::OutOfRange)?`.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |