code-security-review — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited code-security-review (Agent Skill) and scored it 91/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 1 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} is the classic direct prompt-injection phrasing. Placed in a skill body that the agent reads as trusted instructions, it tries to make the agent abandon its prior rules and follow whatever comes next — a full system-prompt override.
ignore/disregard/forget … previous instructions sentence.Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Lifecycle skill for REST and GraphQL APIs: covers secure design (controls to implement) and active security testing (payloads to validate those controls). One skill, two complementary modes — invoke whichever fits the current phase of work.
Use this skill when:
references/python/), Gin / Fiber APIs (→ references/golang/), or Elysia APIs (→ references/DESIGN_CONTROLS.md)references/TESTING_PHASES.md)references/REPORT_TEMPLATE.mdreferences/WEB_VULNERABILITIES.md)references/SUPPLY_CHAIN_CICD.md)references/AI_SECURITY.md)This skill is fully standalone — every payload, snippet, and checklist needed lives in this directory.
| File / Directory | Use when |
|---|---|
SKILL.md (this file) | Foundations, Phase 0 stack + surface detection, OWASP Web 2025 + API 2023 maps, AI/agentic pointer, audit cheat sheet |
references/DESIGN_CONTROLS.md | Implementing or reviewing controls (proactive) — language-agnostic |
references/TESTING_PHASES.md | Running 7-phase active testing workflow (reactive) — language-agnostic |
references/REPORT_TEMPLATE.md | Documenting findings with consistent severity rubric |
references/WEB_VULNERABILITIES.md | Reference catalog of 100 web vulnerabilities by category (XSS, CSRF, deserialization, mobile/IoT, etc.) |
references/golang/ | Go stack lifecycle (Gin/Fiber): API.md, MIDDLEWARE.md, VULNERABILITIES.md, PATCHES.md, TESTING_PAYLOADS.md |
references/python/ | Python stack lifecycle (FastAPI / Django / Flask, CPython 3.13/3.14): API.md, CONFIGURATION.md, VULNERABILITIES.md, PATCHES.md, TESTING_PAYLOADS.md |
references/nextjs/ | Next.js 16 App Router lifecycle: API.md, CONFIGURATION.md, VULNERABILITIES.md, PATCHES.md, TESTING_PAYLOADS.md |
references/SUPPLY_CHAIN_CICD.md | A03:2025 deep-dive — dependency pinning, GitHub Actions hardening, secrets, SBOM, incident case studies |
references/AI_SECURITY.md | LLM Top 10 2025, Agentic Top 10 2026, MCP security, prompt-injection controls, AI-generated-code review |
scripts/ | Executable probes — automate Phase 0–10 against a live target, or static phases (07/09/10/11) with STATIC_ONLY=1. See scripts/README.md. |
Detect the language/framework before loading stack-specific references. Steps 1–4 pick one $STACK (stop at the first match). Step 5 runs always and adds orthogonal surface overlays — AI and CI are independent of the stack.
# Step 1 — Go (Gin / Fiber)
test -f go.mod && grep -E 'gin-gonic/gin|gofiber/fiber/v[23]' go.mod && echo "stack: go"
# Step 2 — Next.js 16+ App Router
test -f package.json && rg '"next":\s*"\^?1[6-9]' package.json && test -d app/ && echo "stack: nextjs-app"
# Step 3 — Python (FastAPI / Django / Flask)
if test -f pyproject.toml || test -f requirements.txt || test -f setup.py; then
rg -q '\bfastapi\b' pyproject.toml requirements*.txt 2>/dev/null && echo "stack: python (framework: fastapi)"
rg -q '\bdjango\b' pyproject.toml requirements*.txt 2>/dev/null && echo "stack: python (framework: django)"
rg -q '\bflask\b' pyproject.toml requirements*.txt 2>/dev/null && echo "stack: python (framework: flask)"
fi
# Step 4 — Elysia / generic
test -f bun.lockb && rg 'elysia' package.json && echo "stack: elysia"
# Step 5 — Surface overlays (always run, additive — not exclusive with the stack above)
rg -lq 'openai|@anthropic-ai/sdk|anthropic|langchain|llamaindex|litellm|ai-sdk|mcp' \
package.json pyproject.toml requirements*.txt go.mod 2>/dev/null && echo "surface: ai-llm"
ls .mcp.json .cursor/mcp.json 2>/dev/null && echo "surface: mcp"
ls .github/workflows/*.y*ml 2>/dev/null && echo "surface: ci-cd"$STACK | References to load (in addition to generic) | Notes |
|---|---|---|
go | references/golang/{API,MIDDLEWARE,VULNERABILITIES,PATCHES,TESTING_PAYLOADS}.md | Gin v1.10.1+, Fiber v2/v3, OWASP API 2023 + Go-specific (race, slowloris, math/rand, pprof, ServeMux conflicts) |
python | references/python/{API,CONFIGURATION,VULNERABILITIES,PATCHES,TESTING_PAYLOADS}.md | FastAPI 0.115+, Django 5.x, Flask 3.x, CPython 3.13/3.14 — Pydantic Settings, ASGI middleware, pickle/yaml deserialization, JWT alg confusion, ALLOWED_HOSTS, SECRET_KEY, free-threaded 3.14t races |
nextjs-app | references/nextjs/{API,CONFIGURATION,VULNERABILITIES,PATCHES,TESTING_PAYLOADS}.md | Next.js 16.2.x App Router — RSC, Server Actions, Route Handlers, proxy.ts, "use cache", Image Optimizer |
elysia / generic | references/{DESIGN_CONTROLS,TESTING_PHASES,WEB_VULNERABILITIES,REPORT_TEMPLATE}.md | Generic references cover the language-agnostic surface |
The generic references (DESIGN_CONTROLS.md, TESTING_PHASES.md, WEB_VULNERABILITIES.md, REPORT_TEMPLATE.md) apply to every stack — load them in addition to the stack-specific bundle. Stack-specific references inherit the OWASP map and severity rubric from the generic ones; do not duplicate.
Step 5 overlays are additive and combine with any $STACK:
| Overlay | References to load | Scripts |
|---|---|---|
ai-llm / mcp | references/AI_SECURITY.md | 11-ai-llm-probes.sh |
ci-cd | references/SUPPLY_CHAIN_CICD.md | 09-cicd-workflows.sh, 10-secrets-scan.sh |
These principles are language and framework agnostic:
| Principle | Meaning |
|---|---|
| Defence in Depth | Multiple independent security layers — one failure should not compromise the system |
| Least Privilege | Every component and user gets only the minimum access needed |
| Zero Trust | Never assume a request is safe because it originates inside the network |
| Shift Left | Embed security checks in development and CI, not only in production monitoring |
| Fail Secure | On error, deny access rather than allow it |
The current Web list (final 2025 edition; replaces 2021). Use these tags for web findings; the API list below is a separate, still-current catalog.
| # | Category | Key Risk |
|---|---|---|
| A01 | Broken Access Control | Missing/again-broken authz; SSRF merged in (was A10 in 2021) |
| A02 | Security Misconfiguration | Moved up from #5 — debug on, permissive CORS, missing headers, defaults |
| A03 | Software Supply Chain Failures | Broadened from "Vulnerable Components" — deps, build, CI, registries |
| A04 | Cryptographic Failures | Weak/absent crypto, plaintext secrets, bad TLS |
| A05 | Injection | SQL/NoSQL/command/XSS — untrusted input reaching an interpreter |
| A06 | Insecure Design | Missing controls by design — no rate limit, no threat model |
| A07 | Authentication Failures | Renamed — weak sessions, no brute-force protection, credential stuffing |
| A08 | Software or Data Integrity Failures | Unsigned updates, insecure deserialization, untrusted CI artifacts |
| A09 | Logging & Alerting Failures | Renamed — no audit trail, no alerting on abuse |
| A10 | Mishandling of Exceptional Conditions | New — fail-open error handling, leaked stack traces, logic edge cases |
references/SUPPLY_CHAIN_CICD.md).The OWASP API Top 10 below is a distinct list; its current edition is still 2023 (no 2025 API release).
This is the 2023 list — the 2019 list is obsolete.
| # | Vulnerability | Key Risk |
|---|---|---|
| API1 | Broken Object Level Authorization (BOLA) | Attacker accesses another user's resources by changing an ID |
| API2 | Broken Authentication | Weak tokens, missing expiry, no brute force protection |
| API3 | Broken Object Property Level Authorization | Over-fetching (returning private fields) or mass assignment (accepting unexpected fields) |
| API4 | Unrestricted Resource Consumption | No rate limiting — DoS, cost amplification, brute force |
| API5 | Broken Function Level Authorization (BFLA) | Regular users can call admin functions |
| API6 | Unrestricted Access to Sensitive Business Flows | Automated abuse of checkout, account creation, voting |
| API7 | Server-Side Request Forgery (SSRF) | New in 2023 — server makes requests to attacker-controlled URLs |
| API8 | Security Misconfiguration | Debug mode in prod, permissive CORS, missing headers, default creds |
| API9 | Improper Inventory Management | Shadow APIs, deprecated versions, undocumented endpoints |
| API10 | Unsafe Consumption of APIs | New in 2023 — trusting third-party API responses without validation |
When Phase 0 Step 5 flags ai-llm, mcp, or the code drives LLMs / agents, the web+API catalogs are necessary but not sufficient. Three additional catalogs apply:
LLM01:2025 Prompt Injection … LLM10:2025 Unbounded Consumption) — for any LLM-integrated app.ASI01:2026 Agent Goal Hijack … ASI10:2026 Rogue Agents) — for code that acts via tools, runs multi-step, or talks to other agents.Full tables, controls, AI-generated-code review checklist, and testing payloads in references/AI_SECURITY.md. Static + gated active probes in scripts/11-ai-llm-probes.sh.
| OWASP Item | Design (DESIGN_CONTROLS.md) | Testing (TESTING_PHASES.md) |
|---|---|---|
| API1 BOLA | Authorization patterns | Phase 2.2 Cross-User Access |
| API2 Broken Auth | JWT/OAuth 2.1/DPoP | Phase 1 Authentication Testing |
| API3 BOPLA | DTOs, mass assignment guards | Phase 2.3 Over-Fetching, Phase 2.4 Mass Assignment |
| API4 Unrestricted Consumption | Rate limit algorithms | Phase 4 Rate Limiting Testing |
| API5 BFLA | RBAC enforcement | Phase 2.5 Admin Endpoints |
| API6 Sensitive Flows | Anti-abuse + MFA | Phase 4.5 Brute Force |
| API7 SSRF | URL allowlist | Phase 3.4 SSRF Payloads |
| API8 Misconfiguration | Headers, CORS, debug-off | Phase 5 Info Disclosure, Phase 7 CORS |
| API9 Inventory | Versioning, doc gating | Pre-Testing Checklist |
| API10 Unsafe Consumption | Response validation | Phase 3 Input Injection (mirrored) |
| A03:2025 Supply Chain | SUPPLY_CHAIN_CICD.md — pinning, SBOM | Phase 6/8 (scripts/07, 09) |
| Secrets (CWE-798) | SUPPLY_CHAIN_CICD.md — secrets hygiene | Phase 9 (scripts/10) |
| LLM01:2025 / ASI (AI surface) | AI_SECURITY.md — prompt isolation, tool authz | Phase 10 (scripts/11) |
Run these checks before deploying any API:
401 without a valid tokenallow_origins=["*"] + allow_credentials=True combination4xx/5xx responsesHSTS, X-Content-Type-Options, X-Frame-Options, CSPpip-audit / govulncheck / bun audit / osv-scanner passing in CI; lockfiles committed (A03:2025)app = FastAPI(docs_url=None), Gin gin.SetMode(gin.ReleaseMode), Fiber app := fiber.New()pull_request_target + PR-head checkout; zizmor cleangitleaks / trufflehog clean over tree + history| Framework | Production Risk | Check |
|---|---|---|
| FastAPI | /docs, /redoc, /openapi.json exposed | curl https://target/docs → should return 404 |
| Django | DEBUG=True, ALLOWED_HOSTS=["*"] | curl https://target/<nonexistent> → must not render Django traceback; python manage.py check --deploy clean |
| Flask | app.debug=True, missing Flask-Talisman / CSRFProtect | Inspect app.config; curl -I https://target/ must include HSTS + CSP |
| Gin | Debug mode active | GIN_MODE env var should be release |
| Fiber | Prefork mode or Helmet missing | Review middleware stack |
| Elysia | Bun runtime exposes raw errors | Verify global error handler is in place |
For detailed implementation patterns per framework, see references/DESIGN_CONTROLS.md. For active probes that exercise these flags, see references/TESTING_PHASES.md.
references/DESIGN_CONTROLS.md end-to-end before writing the first endpoint.references/TESTING_PHASES.md Phase 1–7 against staging.references/REPORT_TEMPLATE.md.references/TESTING_PHASES.md Phase 1–7 against the target.references/DESIGN_CONTROLS.md to identify the missing or misconfigured control.references/REPORT_TEMPLATE.md.references/TESTING_PHASES.md — confirm scope and authorization.references/REPORT_TEMPLATE.md.Use scripts/ for hands-off execution:
cd skills/code-security-review/scripts/
export TARGET="https://api.staging.example.com"
export TOKEN_USER_A="..." TOKEN_USER_B="..." USER_A_RESOURCE_ID="42"
export ORIGIN_ALLOWED="https://app.example.com"
export I_HAVE_AUTHORIZATION=1
./run-all.sh # active phases 00–08 + static 09–11
# Static-only — no live target, no authorization needed (deps, CI, secrets, AI):
STATIC_ONLY=1 PROJECT_ROOT=. ./run-all.shEach phase from TESTING_PHASES.md has a script counterpart that emits findings as JSON-Lines (out/findings.jsonl) plus an aggregated Markdown report (out/report.md). Active phases (00–08) need an authorized TARGET; static phases (07 supply chain, 09 CI/CD, 10 secrets, 11 AI/LLM) read repository files and run without a target. The active prompt-injection battery in 11 stays gated by LLM_ENDPOINT + I_HAVE_AUTHORIZATION=1. Designed to gate CI on critical/high findings. See scripts/README.md for env vars and CI integration example.
@code-review — broader code-quality review that pairs with this skill for security-specific concerns. For Next.js performance audits, see @code-review references/NEXTJS.md.For a formal verification standard, deep audits can map findings to OWASP ASVS 5.0 (17 chapters, levels 1–3); use it to set a coverage bar beyond the Top 10.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.