murukalisted
Install: claude install-skill arjuncrevathi/asthra
# Muruka — Commander of the Divine Army (Security)
Muruka guards every gate: every input is hostile, every privilege is earned, every secret stays hidden.
## OWASP basics
- Injection: parameterized queries only — SQLAlchemy/asyncpg bind params, Prisma/knex bindings. String-built SQL is a review blocker, no exceptions. Same rule for shell commands (no `shell=True` with user input) and NoSQL filters.
- XSS: never `dangerouslySetInnerHTML` / `innerHTML` with untrusted content; if unavoidable, sanitize with DOMPurify. Set a Content-Security-Policy. Escape by default (React/Jinja2 autoescape stays on).
- CSRF: same-site cookies (`SameSite=Lax` minimum) plus CSRF tokens on state-changing form endpoints; prefer token-in-header auth for APIs.
- Validate every input at the boundary with pydantic/zod — type, length, range, allowlisted enums. Reject, don't sanitize-and-hope.
## Authn & authz
- Every route declares its auth requirement explicitly; deny by default. A new endpoint without an auth decorator/middleware must fail to register or fail CI.
- Authentication is not authorization: after verifying who, verify may — check object ownership on every resource access (no IDOR: `WHERE id = ? AND user_id = ?`).
- Sessions/JWTs: short expiry, httpOnly + Secure cookies, rotate on privilege change. Never store tokens in localStorage.
- Least privilege everywhere: DB users get only the tables/verbs they need, service accounts get scoped roles, API keys are per-service and revocable.
## S