Security audit

From Kevin-Liu-01/Agent-Machines · View interactive version

Security audit is an AI agent skill from the GitHub repository Kevin-Liu-01/Agent-Machines. CTF-style security and correctness audit. Use when the user asks for a security review, before deploying user-facing services, or when reviewing auth, payments, or anything that touches secrets.

How to use this skill

Skill file

Security Audit

Adversarial code review against a real attacker model. The goal is to find a real bug -- not to write a generic security checklist. Each finding must include a working repro or a path the attacker would take.

Trust boundaries

Map them first. Anything that crosses a boundary is suspect:

Top patterns to hunt

| Class | Smell | Bug |

|-------|-------|-----|

| Auth | role/permission check after the operation | TOCTOU privilege escalation |

| Auth | if user.is_admin or req.is_admin | request body forging the role |

| Path | path.join(root, user_input) | path traversal via ../ or absolute paths |

| SQL | string-formatted query | SQL injection |

| Shell | subprocess(..., shell=True) with user input | command injection |

| Deserialize | pickle.loads, yaml.load, eval on untrusted | RCE |

| Crypto | == on hashes/HMACs | timing attack |

| Crypto | random tokens via Math.random / non-CSPRNG | predictable secret |

| Webhook | no signature verification | replay/forgery |

| Webhook | timestamp not checked | replay even if signed |

| API | error responses leak stack traces or DB schema | recon assist |

| API | rate-limit per IP only | trivial bypass via headers |

| CORS | Access-Control-Allow-Origin: * with credentials: true | session theft |

| JWT | alg: none accepted, or HMAC verified with public RSA key | forge tokens |

| Race | concurrent updates without optimistic locking | lost updates, double-spend |

| SSRF | server-side fetch with user URL | metadata service exfil |

Hermes-specific: prompt injection

When I read a file, web page, or tool output and act on it, that content can contain instructions targeting me. Defense:

Required output

For every finding:

Severity:    crit | high | med | low
Location:    file:line
Trust path:  [source] → [sink]
Repro:       <exact request / input / payload that triggers it>
Fix:         <minimal code change>

A "high"-severity finding without a repro is a "med" finding I haven't proven yet.

False-positive avoidance

Before reporting, run the repro. If it doesn't fire, downgrade or drop it. False positives cost trust. The bar is "I made it happen and I'll show you how", not "this looks suspicious".

Recurring patterns from real Dedalus incidents

When auditing, also pattern-match for these.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.