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/clusters/input-os-safety.md
View on GitHub---
name: cluster-input-os-safety
kind: cluster
consolidated: false
covers:
- path-traversal-join # PATHJOIN
- toctou # TOCTOU
---
# Cluster: Input & OS-interaction safety
Safe-code bugs at the boundary with untrusted input and the OS that the compiler cannot catch: path handling, filesystem races.
ID prefixes: `PATHJOIN`, `TOCTOU`.
## Phase A
```
rg seed: "\.join\(|\.push\(|PathBuf"
rg seed: "\.exists\(\)|\.metadata\(|symlink_metadata"
rg seed: "File::(open|create)"
```
Run finders in declared order.
## Deconfliction
- `PATHJOIN` vs `TOCTOU`: an attacker-controlled path component that escapes the intended directory (an absolute component replacing the base, `..` traversal) is `PATHJOIN`. A race between a filesystem check (`exists` / `metadata` / `symlink_metadata`) and a later use of the *same* path is `TOCTOU`. When a single sink (e.g. `File::open(base.join(user_input))` after an `exists()` check) matches both greps, file `PATHJOIN` for the directory escape and `TOCTOU` only when a distinct check→use window is independently exploitable.
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: 471k | 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: 471k | 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: 471k | 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 |