Security review

From makifbaysal/tasktrooper · View interactive version

Security review is an AI agent skill from the GitHub repository makifbaysal/tasktrooper. Use in code_review when the diff touches input handling, auth, queries, files, outbound requests, secrets, dependencies or LLM calls, and in analysis for any new endpoint or data flow

How to use this skill

Skill file

Security Review

Overview

Security is not a separate pass over the whole repo — it is one more lens on the diff (code_review) or the design (analysis) you are already reading. Report only what is reachable by an attacker; a theoretical issue with no path to it is noise that trains people to skip your findings.

1. Risk Tier First

2. Map the Attack Surface (of the diff, not the repo)

List, from the diff: every new input (params, headers, body, path segment, uploaded file, webhook payload, LLM output used downstream), every new or changed query, every auth/authorization check, every outbound call, every secret touched.

3. Report Only Attacker-Reachable Findings

Trace the value to its source with grep_code/expand_symbol_context before flagging it. Not attacker-controlled: config values, environment variables, constants, server-set values, test fixtures. Not a finding: framework auto-escaping doing its job (React {x}, an ORM's parameterized query) — that is the control working, not a gap.

4. Checks

Authorization per new route — does it carry the same middleware as its neighbours, and does the query filter by owner/tenant (IDOR)?

Injection sinks — string-built SQL, exec.Command("sh","-c",…) / child_process.exec, template |safe, dangerouslySetInnerHTML, v-html.

Path traversal, SSRF, open redirect — a path or URL built from user input without an allowlist or a resolved-path check.

Secrets — in code, logs, error bodies, or argv (this repo's own rule: secrets never go on argv; a child process gets them via env, not a command-line flag).

Crypto — math/rand/Math.random used for a token or session id; MD5/SHA1 for a password hash.

CSRF / CORS — a cookie-authenticated state change with no CSRF check; Access-Control-Allow-Origin: * alongside credentialed requests.

Supply chain — a new dependency: pinned in the lockfile, maintained, license-compatible, not a typo-squat of a popular name, and actually in scope (an out-of-scope list that forbids unrequested dependency changes still applies).

Exceptional conditions — an error swallowed into a 200/success response; auth that fails open (an unreachable check defaults to "allowed" instead of "denied").

LLM-specific (any diff that calls a model or exposes a tool to one) — model output used directly as a shell command, a SQL fragment, or a URL; a tool callable on untrusted content (e.g. a webhook body) with no confirmation step. See OWASP Top 10 for LLM Applications, LLM01 Prompt Injection.

5. Severity

6. Before the Verdict

State to yourself, not in the comment: which areas you could not verify and why (e.g. "didn't trace the mobile client's handling of this field — out of this diff's repo"). An unverifiable area is not a finding; it's a boundary of the review.

References (names and links only — OWASP content is CC BY-SA, not reproduced)

OWASP Top 10:2025: A01 Broken Access Control · A03 Software Supply Chain Failures · A04 Cryptographic Failures · A05 Injection · A06 Insecure Design · A07 Authentication Failures · A08 Software/Data Integrity Failures · A09 Security Logging and Alerting Failures · A10 Mishandling of Exceptional Conditions. OWASP Top 10 for LLM Applications: LLM01 Prompt Injection.

Common Mistakes

Red Flags

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.