audit-security
Skill8 starsChanged 14 days agoMITView on GitHub
Run a focused security audit of the mangrove-agent trading bot. Covers wallet signing surfaces, EIP-7702 / arbitrary-signing risks, MCP tool permissions, Fernet key handling, DEX executor paths, hook-enforcement gaps, OWASP Top 10, and dependency CVEs. Use when the user asks for "security audit", "audit security", "security review", "check for vulnerabilities", "OWASP audit", or "/audit-security". Adapted from the Mangrove workspace `audit-security` skill with a trading-bot lens added after the 2026-04-24 EIP-7702 incident.
- Reads credentials
- Installs packages
18 other projects use a version of this.
Adopted by
Most recently taken up by
- TsukiNi22/ai-utilstheir own version, first seen Nov 16, 2026
- tounsils/claude-code-skillstheir own version, first seen Oct 25, 2026
- VelimirMueller/ai-development-skillstheir own version, first seen Oct 25, 2026
- ChariereFiedler/ronce-racinetheir own version, first seen Oct 22, 2026
- krixon/skillstheir own version, first seen Oct 11, 2026
- VelimirMueller/claude-skillstheir own version, first seen Oct 11, 2026
Used with
Projects with it also use retro, implement and 2 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AWSSkillretro
Conduct a retrospective on a coding session.
Also in 4 projects that use this
Hugging FaceSkillimplement
Make tests pass. Invoke after /write-tests produces failing tests.
Also in 3 projects that use this
GoogleSkilltdd
Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
Other versions18 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 18
- ChariereFiedler/ronce-racine★ 9same name
- kensaurus/cursor-kenji★ 9same name
- kensaurus/skills★ 9same name
- VelimirMueller/ai-development-skills★ 7same name
- VelimirMueller/claude-skills★ 7same name
- VoxTechnologies/transmute-framework★ 5same name
- daanvandenbergh/claudekit★ 2same name
- engineering-workshops/react-alicante-agentic-workflow★ 2same name
- jasonmichaelbell78-creator/sonash-v0★ 2same name
- JoseArron/skills★ 2same name
8 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- check-alignmentSkill
- connect-krakenSkill
- setup-krakenSkill
- setup-robinhoodSkill
- tool-specSkill
- trading-botSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 17 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Read-only audit against the mangrove-agent repo.
- Distinctive: line 23
Wallet + signing invariants: Verify:
- Very specific: line 38
No tool returns encrypted_secret, raw Fernet ciphertext, or secret fields in its response.
- Distinctive: line 43
No endpoint returns wallet plaintext.
- Very specific: line 54
Check .env.example and server/src/config/*-config.json for accidentally committed real keys.
- Very specific: line 64
Write a report to agent-data/audits/YYYY-MM-DD-mangrove-agent-security-audit.md with this shape:
- Distinctive: line 92
Read-only: Never modify source code, tests, or configuration.
- Very specific: line 93
Redact secrets: If you encounter a plaintext key or API token in any file, replace with * in the report.
- Distinctive: line 94
No exploits: Never run network-level attack tests or modify running services.
“Common” is measured: kept by at least 6 in 10 of the 17 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Security Audit - mangrove-agent trading bot
Read-only audit against the mangrove-agent repo. Covers:
- Wallet + signing surfaces (post-2026-04-24 incident focus)
- Web3 / crypto-specific threats (EIP-7702 delegation, permit abuse, tx replay, router allowlist drift, private-key lifetime, Fernet at rest)
- MCP tool layer (auth tier assignments, tool input validation, response leakage)
- OWASP Top 10 + CWE/SANS Top 25 (SQL injection via SQLite, SSRF via webhook URLs, path traversal via config files, etc.)
- Dependency CVEs (
pip-audit/safety checkagainstserver/requirements.txt) - Infrastructure (hook registration, docker-compose exposure, default API key shipping)
Process
- Check for prior audits at
agent-data/audits/*-security-audit.md(local and gitignored; audit reports are not published). If a recent one exists, read it to avoid re-flagging fixed issues and to track remediation. - Wallet + signing invariants. Verify:
transaction_intent.validate_transactionrejects unsupported types/chains/selectors, authorization lists, malformed ABI, mismatched chain/assets/recipient/amounts, native value and excessive fees before key access.- The isolated custody broker independently pins wallet, router, executor, input/output floor, payees, validity, lifetime spending/fee budgets and replay state; request arguments cannot authorize wider limits.
- Custody runs as a distinct non-root UID with private state and root-owned immutable code/runtime/policy. Check ACLs and peer credentials; same-user processes and agent-controlled containers are insufficient.
sign_message()still refuses general signing. Dedicated x402/SIWX/marketplace proofs retain their own structure, identity, expiry and approval checks.- Plaintext loading is custody-internal; ordinary API/MCP/RPC has no export, stash, import, backup-confirmation or budget-reset authority.
- Human backup/import use direct independent custody administration. Verify recovery and guarded legacy retirement before calling an old installation migrated.
- Hook-enforcement gaps. For each hook in
.claude/hooks/*.sh:- Confirm it's registered in
.claude/settings.jsonunder the right matcher. - Confirm it
set -uo pipefail, handles malformed JSON without crashing, and uses proper exit codes (0 = allow, 2 = block). - Confirm it doesn't log or exfiltrate secrets in its stderr message (particularly
block-wallet-secrets.sh).
- Confirm it's registered in
- MCP tool layer. For each tool in
server/src/mcp/tools.py:- Auth tier matches the sensitivity (no auth-gated tool slipped into free tier).
- No tool returns
encrypted_secret, raw Fernet ciphertext, orsecretfields in its response. api_keyparam is validated via_require()before the tool body runs.
- REST routes. For each route in
server/src/api/routes/*.py:- Auth dependency is wired correctly.
- No endpoint returns wallet plaintext. Both former reveal routes, stash/import and backup confirmation return 410; disabled local authentication refuses privileged access.
- Pydantic validators enforce slippage caps, chain allowlists, and amount bounds.
- Dependency CVEs.
Report HIGH / CRITICAL findings only.cd server && pip install pip-audit && pip-audit -r requirements.txt - Secret handling.
grep -rE "(private_key|seed_phrase|mnemonic|secret|API_KEY)" server/src/- every hit should be a name, not a plaintext value.- Check
.env.exampleandserver/src/config/*-config.jsonfor accidentally committed real keys. git log --all -p -- '*.env*' '*config*'- check git history for leaked secrets.
- Infrastructure.
docker-compose.yml- no bind mounts exposing host secrets; port bindings match the documented9080..github/workflows/ci.yml- no secret leakage in logs;${{ secrets.* }}usage is minimal.scripts/*.sh- input validated; no command injection via user input.
Output
Write a report to agent-data/audits/YYYY-MM-DD-mangrove-agent-security-audit.md with this shape:
# Security Audit - YYYY-MM-DD
## Summary
Overall severity + high-level findings count by CRITICAL / HIGH / MEDIUM / LOW.
## Findings
### [CRITICAL] <short title>
- **Location:** `path/to/file.py:LN`
- **CWE:** CWE-N - Name
- **Description:** what's wrong
- **Impact:** what could happen
- **Remediation:** concrete fix
(repeat per finding)
## Done Well
- Strict transaction-intent validation and isolated custody refuse new EIP-7702 authorization signing
- (etc.)
## Dependencies
List of CVEs from pip-audit with fix recommendations.Constraints
- Read-only. Never modify source code, tests, or configuration.
- Redact secrets. If you encounter a plaintext key or API token in any file, replace with
***in the report. - No exploits. Never run network-level attack tests or modify running services.
- Cite every finding. File path + line number + CWE ID. No generic "this could be exploited" language without a specific pointer.
- Acknowledge good practices. The "Done Well" section matters - the encrypted custody state, OS boundary and narrow signing policies need evidence for their actual deployment, and the audit should record what's working.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

