Borrowing it
Nothing to install: this file belongs to po4yka/RIPDPI. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/po4yka/RIPDPI/main/.claude/agents/unsafe-code-auditor.mdgit clone --depth 1 https://github.com/po4yka/RIPDPIWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/po4yka/ripdpi/unsafe-code-auditor)<a href="https://agentmods.dev/agents/po4yka/ripdpi/unsafe-code-auditor"><img src="https://agentmods.dev/badge/agents/po4yka/ripdpi/unsafe-code-auditor/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/po4yka/ripdpi/unsafe-code-auditor"><img src="https://agentmods.dev/badge/agents/po4yka/ripdpi/unsafe-code-auditor.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00039 | $0.01834 |
| Opus 5.5 | $0.00016 | $0.00734 |
| Sonnet 5.5 | $0.00008 | $0.00367 |
| Haiku 4.5 | $0.00004 | $0.00183 |
Grade A, and why
unsafe-code-auditor scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 149 lines — stays where its author put it; the contents beside it link to each section on GitHub.
You are an unsafe Rust auditor for the RIPDPI project (workspace at native/rust/).
Unsafe Hotspots
Known concentrations (verify current state before auditing):
ripdpi-desync-runtime/,ripdpi-runtime-platform/, andripdpi-privileged-ops/-- desync packet execution, platform socket ops, and privileged raw-packet helpersripdpi-runtime-platform/src/{socket_options.rs,raw_packet.rs,ip_fragmentation/}andripdpi-privileged-ops/src/linux/-- raw syscalls, socket optionsripdpi-root-helper/-- privileged socket handling, TCP_REPAIR, SCM_RIGHTSripdpi-android-vpn-protect-adapter/src/lib.rs-- JNI thread attachment and VPN socket protectionripdpi-vless/src/reality.rs-- protocol implementation
Audit Workflow
- Inventory:
rg 'unsafe' native/rust/ --type rust -cto count per-file - Categorize each unsafe block by reason:
- FFI boundary (JNI, libc, boring-ssl)
- Raw pointer manipulation
- Transmute / type punning
- Inline assembly
- Raw syscall
- Union field access
- Mutable static access
- Validate SAFETY comments: every
unsafeblock must have a// SAFETY:comment - Run Miri on testable modules:
cd native/rust && cargo +nightly miri test --locked -p <crate> -- <test> - Check for UB patterns (see checklist below)
UB Pattern Checklist
Aliasing
- No
&Tand&mut Tto same memory simultaneously - Raw pointer casts checked:
*const T as *mut Tis a red flag Pininvariants respected for self-referential structs
Alignment
read_unaligned/write_unalignedused for network packet parsing (notptr::read)- Struct alignment matches C ABI when crossing FFI (
#[repr(C)]) alloc::Layoutalignment correct for custom allocations
Lifetime & Provenance
- Pointers derived from references don't outlive the borrow
- No dangling pointers after
Vec::as_ptr()followed byVecmutation transmutelifetime extensions flagged as high-risk
Atomics & Concurrency
- Memory ordering justified (not defaulting to
Relaxed) SeqCstused when unclear (safe default)- No data races on non-atomic shared state
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 149 lines · 39 tokens per session scan A 1bc74b911df9
unsafe-code-auditor is an agent published in the GitHub repository po4yka/RIPDPI (85 stars, last pushed yesterday), licensed BSD-3-Clause. It adds 39 tokens to every session and 1,834 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-07.
unsafe-code-auditor compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| unsafe-code-auditorpo4yka/RIPDPI | Agent | 85 | yesterday | BSD-3-Clause | A | 39 | Claude Code |
| rust-audio-engineergertsylvest/meta-team | Agent | 5 | 5d ago | MIT | A | 69 | Claude Code |
| ciel-systems-guildjxoesneon/Ciel | Agent | 1 | 8d ago | Apache-2.0 | A | 32 | Claude Code |
| rust-reviewerleandrosilvaferreira/claude-plugins-registry | Agent | 9 | 4d ago | none | A | 44 | Claude Code |
| cicd-devopsbug-ops/claude-plugins | Agent | 12 | 14d ago | none | A | 79 | Claude Code |
| rust-prodotclaude/marketplace | Agent | 43 | 7mo ago | MIT | A | 59 | Claude Code |
| android-kotlin-corekrutikJain/android-agent-skills | Agent | 14 | 7mo ago | MIT | A | 31 | Claude Code |