/indra:sh-kb-race-conditionsfrom Indra
Knowledge base for finding race conditions and TOCTOU flaws in concurrent check-then-act logic. Covers double-spend, limit bypass, balance manipulation, and file TOCTOU patterns with detection recipes and PoC guidance.
Ships in Indra. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
A gap between checking a condition and acting on it lets concurrent requests slip through: spend a coupon twice, withdraw more than the balance, bypass a rate/quota limit, or swap a file between check and use. These are logic bugs - reason about interleavings, not just about a dangerous sink.
os.path.exists/access() then open(); symlink swapped in between.Non-atomic sequences: a SELECT/read followed by an UPDATE/write of the same field without a transaction,
SELECT ... FOR UPDATE, optimistic-lock version, or atomic DB op. Grep near money/credits/quota/inventory:
balance|credit|quota|limit|coupon|voucher|stock|inventory|redeem|withdraw|transfer. Filesystem:
os.path.exists|access\(|stat\( shortly before open(. Look for absence of with transaction,
SELECT FOR UPDATE, lock, Mutex, atomic, unique constraints.
codebase-map.json.POST /redeem requests, all read used=false before any writes
used=true, so all N succeed." Show the non-atomic code path.needs-runtime to fully confirm.engine=Engine.BURP2, concurrentConnections=1). When racing multiple different endpoints (e.g.
check-balance vs. spend), pre-warm each connection with a throwaway request first so backend processing
times align, since cross-endpoint timing skew is a common reason an otherwise-real race fails to trigger.UPDATE ... SET x=x-1 WHERE x>0 (check in the WHERE), DB unique
constraint / SELECT ... FOR UPDATE, optimistic locking (version column), INSERT ... ON CONFLICT, or an
explicit lock/mutex/serializable transaction covering check+act.CWE-362 (race), CWE-367 (TOCTOU), CWE-366. OWASP A04:2021 (Insecure Design). Financial/limit bypass -> high/critical by value; filesystem TOCTOU -> high if it leads to privilege gain.
Race to bypass a spend/limit -> monetary loss; combine with access-control (race a permission change);
TOCTOU file swap -> path-traversal/privilege escalation. Often amplifies an otherwise-bounded feature.
Make check-and-act atomic: guard in the UPDATE WHERE, use DB constraints/unique indexes, row locking
(SELECT ... FOR UPDATE) or optimistic locking, serializable transactions, idempotency keys for retried
mutations, and atomic counters for quotas. Avoid exists-then-open; open directly and handle errors.
What SKILL.md sets; muted values are Claude Code's defaults
20 skills in this plugin
/indraindra - the entry point for application-security work. Dispatcher for the indra security harness. Use when the user asks for any application-security work - 'security review', 'audit this codebase', 'pentest', 'find vulnerabilities', 'check for SQLi/XSS/IDOR/SSRF', 'generate a security report/SARIF'. Interprets the request and routes it to the full sh-security-review pipeline, a single stage, or a single vulnerability-class knowledge base./sh-kb-access-controlKnowledge base for finding broken access control - IDOR/BOLA, missing function-level authorization, privilege escalation, and multi-tenant isolation failures. Use when hunting authorization issues or reviewing whether users can access resources/actions they shouldn't. CWE-284/285/639/862/863, OWASP A01:2021-Broken Access Control./npx claudepluginhub dmdhrumilmistry/indra --plugin indraOther plugins' skills for the same job