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/bufwriter-unflushed-finder.md
View on GitHub---
name: bufwriter-unflushed-finder
description: Detects BufWriter (and other buffered writers) dropped without an explicit flush, silently swallowing write errors
---
**Finding ID Prefix:** `BUFFLUSH`.
**Bug shape:** A `BufWriter` (or other buffered writer) is dropped without an explicit `flush()`. The implicit flush in `Drop` ignores its error, so write failures (disk full, broken pipe) are silently swallowed and buffered data may be lost — corrupting output or hiding a failure the caller needed to see.
**Gates:**
1. A `BufWriter` (or buffered writer) goes out of scope (dropped) without an explicit `flush()` or `into_inner()`.
2. Write success matters (persisted file, protocol output, integrity-relevant data).
**FPs:**
- Explicit `flush()` (or `into_inner()`) with the error handled before drop.
- Output is best-effort/cosmetic with no correctness requirement.
**Patch:** call `flush()` (or `into_inner()`) explicitly and propagate the error before the writer is dropped.
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 |