Security knowledge pack for web backends/frontends/APIs. Load when writing or reviewing HTTP endpoints, authentication/sessions/JWT/OAuth/SAML/passkeys, permissions and multi-tenancy, database queries, templates and frontend rendering, file uploads and media processing, outbound URL requests, GraphQL/gRPC/WebSocket/message queues, payments and orders, caches and proxies, secrets, CI workflows and deployment config (Docker/Terraform/cloud storage). Covers IDOR, injection, parser differentials,...
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Sec Web?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/57blocks-sec-web-3a0caebf)
---
name: sec-web
description: >-
Security knowledge pack for web backends/frontends/APIs. Load when writing or reviewing HTTP endpoints,
authentication/sessions/JWT/OAuth/SAML/passkeys, permissions and multi-tenancy, database queries, templates and
frontend rendering, file uploads and media processing, outbound URL requests, GraphQL/gRPC/WebSocket/message queues,
payments and orders, caches and proxies, secrets, CI workflows and deployment config (Docker/Terraform/cloud storage).
Covers IDOR, injection, parser differentials, XSS, CSRF, CORS, SSRF, deserialization, request smuggling, cache
poisoning, race conditions, amount tampering, and legacy Java/PHP/.NET/Rails framework sinks.
globs: ["**/*.{ts,tsx,js,jsx,mjs,cjs,vue,svelte}", "**/*.py", "**/*.java", "**/*.kt", "**/*.jsp", "**/*.go", "**/*.php", "**/*.blade.php", "**/*.twig", "**/*.rb", "**/*.erb", "**/*.cs", "**/*.cshtml", "**/*.razor", "**/*.graphql", "**/*.proto", "**/*.tf", "**/Dockerfile", "**/docker-compose*.yml", "**/.env*", "**/next.config.*", "**/application*.{yml,yaml,properties}", "**/appsettings*.json", "**/web.xml", "**/settings*.py", "**/*nginx*.conf", "**/.github/workflows/*.yml"]
user-invocable: false
---
# sec-web: Web / API security checklist
## Scope
Any web server, API, BFF, SSR/frontend code, plus the deployment and cloud configuration delivered with it.
## Read first
- `sec-core` (baseline rules and P0–P3 definitions).
- For LLM/Agent code also load `sec-ai-llm`; for wallet signing/DApp frontends also load `sec-wallet-dapp`.
- Framework pitfalls (must read when writing code for that framework):
[Node/Express/NestJS/Fastify](refs/node-express-nestjs.md) ·
[Next.js/React](refs/nextjs-react.md) ·
[Django/FastAPI/Flask](refs/python-django-fastapi.md) ·
[Java/Spring](refs/java-spring.md) ·
[Java legacy: Struts2/Shiro/Fastjson/Log4j/Tomcat](refs/java-legacy.md) ·
[.NET/ASP.NET Core](refs/dotnet-aspnetcore.md) ·
[Ruby on Rails](refs/ruby-rails.md) ·
[Go](refs/go.md) ·
[PHP/Laravel](refs/php-laravel.md) ·
[PHP: ThinkPHP/Yii/Symfony/WordPress](refs/php-other.md)
- When the deciding fact lives outside the repository (proxy, CDN, DNS, IdP or cloud config), report the issue as needs-verification and name the exact fact the owner must check.
## Three general principles
1. **Identity comes only from server-verified credentials** (session / signature-verified JWT), never from `userId`, `role`, `tenantId` in the body, query or headers.
2. **Every fetch by ID includes the ownership condition** (`WHERE id = ? AND owner_id = ?`), not "fetch first and forget to compare".
3. **Before user input reaches any interpreter (SQL, shell, template, HTML, URL, file path, deserializer), use parameterization/allowlists; never concatenate.**
---
## Checklist
The 131 items live in `refs/items-*.md`, so a task reads only the part it needs. This index gives each item's ID, title and default level. Items are numbered in the order they were added, so related items can sit in different number ranges; use the file names below.
- Writing or changing code, or `sec-check`: read the files covering what the change touches.
- Full audit: sec-audit assigns item IDs to each perspective; read only those items.
- Looking up one item: open the file named here and read from its `### WEB-NN` heading to the next `###` heading.
**[refs/items-access.md](refs/items-access.md)**
- WEB-01 Trusting client-supplied identity fields · default P0
- WEB-02 IDOR / BOLA: fetching objects by ID without checking ownership · default P1 (P0 when reachable anonymously, or when a newly registered user can bulk-obtain this application's credentials/password hashes/session tokens; P2 when only names/counts/config metadata leak)
- WEB-03 Missing multi-tenant isolation · default P0
- WEB-04 Mass assignment: writing the whole request body into a model · default P1 (P0 when role/balance/tenant/verified status can be changed)
- WEB-05 Missing function-level authorization / permissions only in the frontend · default P1 (P0 when anonymous users or any newly registered user can perform admin operations or escalate to admin; P2 when a delegated admin oversteps into destructive operations without privilege escalation)
- WEB-06 Bulk, export and nested resolution bypass per-item authorization · default P1
- WEB-07 Excessive data exposure: returning whole ORM rows · default P1
- WEB-60 Who may modify ownership/sharing/ACL fields, and "visible means writable" · default P1
- WEB-86 Key and namespace collisions: different inputs, one storage key · default P1 (P0 when it overwrites an admin or another user's account)
- WEB-87 Derived copies and share links drift from the source ACL · default P1 (P2 when only names/titles of private objects leak)
- WEB-88 Soft delete, archive and suspension not enforced on every path · default P2 (P1 when private data is exposed or suspended actors keep acting)
- WEB-89 Query oracles on fields or rows the caller may not read · default P2 (P1 when a secret such as a token or hash can be recovered character by character)
- WEB-90 Import, restore and bulk-load paths bypass authorization and validation · default P1 (P0 when it yields file read/write or other users' data)
- WEB-91 Request-scoped data held in shared state · default P1
- WEB-92 Display identity of the signed-in user taken from the request · default P2 (P1 when the field feeds audit records or approval decisions)
- WEB-127 Declarative authorization that is silently not applied · default P1 (P0 for admin actions or anonymous reach)
**[refs/items-auth.md](refs/items-auth.md)**
- WEB-08 JWT decoded but not verified · default P0
- WEB-09 JWT algorithm not pinned: `none` / RS-HS confusion / trusting `jku`/`kid` · default P0
- WEB-10 Weak or default JWT/session secrets · default P0
- WEB-11 Token claims and lifecycle: missing or unenforced exp/aud/iss, purpose binding, no revocation · default P2 (P1 when replayable across services)
- WEB-12 Session fixation and invalidation · default P2
- WEB-13 Token storage and cookie attributes · default P2 (P1 when combined with XSS)
- WEB-14 Missing OAuth/OIDC/SSO binding, account linking and invite acceptance · default P1 (P0 when accounts can be taken over)
- WEB-15 Password reset / email verification flows · default P0
- WEB-16 Login / OTP without brute-force protection, and user enumeration · default P2 (P1 when small-space codes can be brute-forced or enumeration forms part of a takeover chain)
- WEB-17 Open redirect · default P2 (P1 when used to steal codes via OAuth callbacks)
- WEB-18 Trusting forgeable request headers (forwarded, Host, Referer, path overrides) · default P1
- WEB-19 API keys stored in plaintext and non-constant-time comparison · default P2
- WEB-75 SAML signature not bound to the assertion used, missing assertion checks · default P0
- WEB-76 MFA binding and downgrade · default P1
- WEB-77 Re-authentication for sensitive account changes · default P2 (P1 when it completes an account takeover chain)
- WEB-78 WebAuthn/passkey verification · default P1
- WEB-79 Token scope and type confusion · default P1
- WEB-80 mTLS and client-certificate identity · default P1 · needs-verification
- WEB-81 Self-built OAuth/OIDC authorization server · default P1
- WEB-82 Persistent-login ("remember me") tokens and encryption oracles · default P1
- WEB-83 Authorization changes that do not take effect · default P1
- WEB-84 Auto-provisioned accounts inherit privileged defaults · default P1 (P0 when it grants admin or another user's data)
- WEB-85 Authorization from unverified or mutable attributes · default P1
**[refs/items-injection.md](refs/items-injection.md)**
- WEB-20 SQL injection: string concatenation in ORM raw APIs and query languages · default P0
- WEB-21 Dynamic identifiers: controllable ORDER BY / column / table names · default P1
- WEB-22 NoSQL injection: operator injection / `$where` · default P0
- WEB-23 OS command and argument injection · default P0
- WEB-24 Server-side template injection (SSTI) · default P0 (P1 when only a lower-privileged admin/editor role can author templates)
- WEB-25 Dynamic code execution · default P0
- WEB-26 LDAP / XPath injection · default P1
- WEB-27 XXE and XML processing: external entities, XInclude, XSLT · default P1
- WEB-28 Prototype pollution (JS) · default P2 (P1 when a reachable gadget exists, such as template engine options/an `isAdmin` check)
- WEB-99 Unicode normalization, case folding and truncation collisions · default P1 (P0 when a new account can take over or impersonate an existing privileged one)
- WEB-100 URL parser differentials · default P1
- WEB-101 Type confusion and loose comparison · default P1
- WEB-102 Route, path and method matching differentials · default P1 (P0 when it bypasses authentication)
- WEB-103 Filesystem name semantics: links, globs, sidecars, Windows forms · default P1
- WEB-104 User-supplied query and filter languages with dangerous built-ins · default P1 (P0 for file read/RCE)
- WEB-105 Incomplete validators and sanitizers · default P2 (rate per the sink item when it is the only control)
- WEB-106 ORM filter operator and relation-traversal injection · default P1 (P0 when SQL injection is reachable, secrets can be inferred or auth is bypassed)
- WEB-114 Format-string and formatter fallbacks · default P1
- WEB-129 Constraints enforced only in framework schema validation · default P2 (P1 when it guards authorization or money)
- WEB-107 JNDI and lookup sinks · default P0
- WEB-108 Framework secret keys that unlock deserialization or signing · default P0 (P1 when the key only signs low-impact values)
- WEB-109 Data binding into the object graph · default P0 (link WEB-04)
- WEB-110 JDBC and datasource URL injection · default P0 (P1 when only a full admin of a single-tenant install can set it and admins already run code by design)
- WEB-111 Reflective invocation from user strings · default P0
- WEB-112 File inclusion · default P0
- WEB-113 Variable overwrite · default P1
**[refs/items-client.md](refs/items-client.md)**
- WEB-29 XSS: raw HTML sinks, output context and DOM sources · default P1 (stored XSS that can hijack sessions; reflected P2)
- WEB-30 URL-context XSS and URL-derived DOM sinks: `javascript:` links · default P1 (P2 for non-script DOM sinks)
- WEB-31 Missing CSP and security response headers · default P3 (P2 when the app renders user HTML or sensitive responses are cacheable)
- WEB-32 `postMessage` without origin or source checks · default P1
- WEB-33 Secrets in the frontend bundle · default P0
- WEB-34 CSRF: cookie-authenticated state-changing endpoints and hand-rolled defenses · default P1 (P2 for low-value operations)
- WEB-35 CORS reflecting any origin / trusting too broadly · default P1 (without credentials, P1/P2 depending on readable content)
- WEB-36 WebSocket handshake without Origin check / authentication · default P1
- WEB-115 DOM clobbering and client-side template injection · default P1 (P2 for clobbering without a script or URL gadget)
- WEB-116 Service worker and client storage residue · default P2 (P1 when another account can read the data on a shared device or worker scope is takeable)
- WEB-117 Cross-site leaks (XS-Leaks) · default P2 (P1 when it reveals private content, not just existence)
- WEB-118 Clickjacking and double-clickjacking · default P2 (P1 for OAuth consent, permission grants or account-takeover actions)
- WEB-119 Reverse tabnabbing and opener abuse · default P3
- WEB-120 Response content type, JSONP and XSSI · default P2 (P1 when user content renders as HTML on the app origin)
- WEB-130 Desktop wrapper turns web content into code execution (Electron, Tauri, webviews) · default P1 (P0 when content another user can author, such as a link or stored XSS in shared data, reaches Node/OS APIs or opens arbitrary URL schemes)
**[refs/items-protocol.md](refs/items-protocol.md)**
- WEB-62 HTTP request smuggling / desync: front end and back end disagree on message length · default P1 (P0 when the smuggled request reaches other users' responses or bypasses front-end auth)
- WEB-63 Web cache poisoning through unkeyed input · default P1 (P2 when the poisoned value cannot reach a script, redirect or security header)
- WEB-64 Web cache deception and personalized responses in shared caches · default P1
- WEB-65 CRLF and header injection, and other line-based protocols · default P1 (P2 when only header splitting without a sink)
- WEB-66 Email header / SMTP injection and mail-command argument injection · default P1 (P0 when input reaches sendmail options that write files or load config)
- WEB-67 Parameter pollution, server-side parameter pollution and client-side path traversal · default P1 (P0 when the internal call runs with a privileged service credential; P2 when CSPT reaches only same-user GETs)
- WEB-68 Cookie scope, tossing and shadowing · default P2 (P1 when an untrusted or user-controlled subdomain exists)
- WEB-69 Dangling DNS and subdomain takeover · default P1 (P0 when the hostname is trusted by auth: cookie `Domain`, OAuth `redirect_uri`, credentialed CORS, CSP `script-src`) · needs-verification
- WEB-70 GraphQL abuse: introspection, aliases and batching, cost limits, per-type authorization · default P2 (P1 when batching defeats auth rate limits or a type reached by another path skips authorization)
- WEB-71 Inconsistent checks across transports and interceptors · default P1 (P0 when the alternate transport is reachable anonymously)
- WEB-72 API version drift and shadow endpoints · default P1 (P0 when anonymous users reach admin actions or other users' data; P2 when the old route only lacks newer hardening such as rate limits or validation)
- WEB-73 Message queue, event and pub/sub authorization · default P1 (P0 when a user-reachable producer or unauthenticated push endpoint makes consumers act as another tenant or admin; P2 for ordering/idempotency defects with no authorization impact)
- WEB-74 Envelope and payload identity mismatch in signed or federated documents · default P1 (P0 when it allows impersonating arbitrary accounts or remote actors; P2 for attribution/display-only fields)
**[refs/items-files.md](refs/items-files.md)**
- WEB-37 SSRF: server requests user-supplied URLs · default P1 (P0 when cloud metadata/internal admin planes are reachable; P2 only when neither the response nor any side effect is observable)
- WEB-38 Path traversal: user input concatenated into file paths · default P0 (arbitrary read/write)
- WEB-39 File upload · default P1 (P0 when executable scripts can be uploaded into the web directory)
- WEB-40 Archives: Zip Slip, archive creation/listing and decompression bombs · default P1
- WEB-41 Insecure deserialization and framework wire formats · default P0
- WEB-128 Server-side media processing of untrusted input and transform parameters · default P1 (P0 when user-controlled transform options reach file read/write or RCE)
**[refs/items-config.md](refs/items-config.md)**
- WEB-42 Hardcoded secrets / committed `.env` · default P0 (production secrets)
- WEB-43 Debug mode, error details, web-root exposure and exposed admin endpoints · default P1 (P0 when heapdump/env/console are exposed)
- WEB-44 Default credentials, seeded admins and dev backdoors · default P0
- WEB-61 Config-file write injection (.env/ini/yaml) and unauthenticated install wizards · default P1 (P0 when the install/first-setup endpoint is reachable anonymously, including the window after deployment before installation completes, and can be chained into execution)
- WEB-45 Weak password storage and handling · default P1 (P3 for policy gaps alone)
- WEB-46 Non-cryptographic randomness in security contexts · default P1
- WEB-47 Encryption misuse, weak algorithms and disabled TLS/host-key verification · default P1
- WEB-55 Vulnerable dependencies, hallucinated package names and unpinned versions · default P2 (P0 when a reachable known RCE/auth-bypass CVE exists)
- WEB-56 Secrets/PII leaked via logs and third-party reporting · default P2 (P1 when passwords, tokens or full card numbers reach logs)
- WEB-57 Public storage buckets and overly broad presigned URLs · default P0 (when user data is included)
- WEB-58 Overly broad IAM and network exposure · default P1
- WEB-59 Secrets in containers and build artifacts, and container privileges · default P1 (P2 when only root/hardening without a reachable host-level capability)
- WEB-131 User-supplied container or deployment specs run with host privileges · default P1 (P0 when a non-admin role or a repository the user controls reaches host root or other tenants' workloads)
- WEB-121 Plaintext or weak transport to services · default P2 (P1 when credentials or personal data cross an untrusted network)
- WEB-122 CI/CD workflow injection and pipeline privilege · default P1 (P0 when it yields release, deploy or cloud credentials)
- WEB-123 Log injection and missing security audit trail · default P3 (P2 when logs feed an HTML viewer or automated decisions)
- WEB-124 CSV and formula injection in exports · default P3
- WEB-125 Unsafe consumption of third-party APIs and webhooks · default P2 (P1 when it decides payments, identity/KYC or authorization)
- WEB-126 Temp files and file permissions · default P3 (P2 when secrets or other users' files become readable or writable by another local user or tenant)
**[refs/items-logic.md](refs/items-logic.md)**
- WEB-48 Trusting client-supplied amounts, prices and quantities · default P0
- WEB-49 Race conditions and non-atomic multi-step writes · default P0 (for balances/inventory/coupons/withdrawals; P1 for account/token state; P2 for other partial writes)
- WEB-50 Payment callbacks / webhooks not verified or reconciled · default P0
- WEB-51 Missing replay protection and idempotency · default P1
- WEB-52 Skipping state machine steps · default P1
- WEB-53 Amount precision, numeric overflow and negative values · default P2 (P1 when reliably arbitrageable or when a bounds check is bypassed)
- WEB-54 No rate limiting and unbounded resource consumption · default P2 (P1 when paid endpoints such as SMS/email/LLM can be abused)
- WEB-93 Fail-open on errors, missing config or dependency outage · default P1 (P0 when it bypasses authentication)
- WEB-94 Promotion, referral, refund and trial abuse · default P2 (P1 when reliably monetizable)
- WEB-95 Pre-authentication work asymmetry · default P2 (P1 when one request pins a worker or core for seconds)
- WEB-96 Super-linear parsing and ReDoS · default P2 (P1 when reachable anonymously on a shared worker)
- WEB-97 Work that outlives cancel, failure or validation · default P2 (P1 when cleanup deletes or writes outside the caller's scope or permissions)
- WEB-98 Remotely triggerable process crash · default P2 (P1 when one unauthenticated request takes down the whole service)
---
## Self-check flow (after writing or changing web code, before committing)
Run these in order against **this diff**, looking at only the relevant changes at each step:
1. **List entry points**: List the routes, controllers, server actions, GraphQL resolvers, webhooks, scheduled jobs and message consumers the diff adds or changes. For each entry point, write down "who can call it (anonymous/user/admin/internal)".
2. **Authentication**: Does every entry point go through authentication middleware? Are public ones intentionally public? Does identity come from signature-verified credentials (WEB-01, 08, 09)?
3. **Authorization**: Does every query that accesses data by ID/tenant have the owner/tenant condition in its `WHERE` (WEB-02, 03, 06)? Do admin functions have role checks (WEB-05)? Do ownership/sharing field changes and update/delete have checks independent of view (WEB-60)? Are the guards on new actions consistent with the other actions on the same resource (including inherited destroy/partial_update)?
4. **Input → sink**: For every request field, trace where it finally ends up, including error and 404 responses that echo it: SQL/ORM raw, shell, template, HTML, URL request, file path, deserialization, `eval`, redirect, logs. Any hit → check against the items in groups C/D/F.
5. **Writing models**: Are DB writes done through a DTO/schema allowlist (WEB-04)? Do responses return only the needed fields (WEB-07)?
6. **Parsing and normalization**: Where the diff compares, matches or deduplicates user-controlled names, paths, URLs, emails or keys, is it done after normalization, with the same parser the consumer uses, and with a `/` boundary on prefixes (WEB-99–103)? Do guards run on the same path, method and value the handler uses (WEB-102, 129)?
7. **Lifecycle and derived copies**: Does the change add a cache, search index, feed, export, share link, import or background job? Does it carry the same owner/tenant/visibility condition and follow delete, suspend and permission changes (WEB-83, 86–90)?
8. **Money and state**: Anything involving amounts, inventory, points, coupons, withdrawals or state changes → server-side recomputation (WEB-48), atomic updates (WEB-49), idempotency (WEB-51), prerequisite state checks (WEB-52), callback signature verification (WEB-50), and errors that fail closed (WEB-93).
9. **Config and secrets**: Does the diff introduce secrets, new `NEXT_PUBLIC_` variables, `DEBUG`, CORS, CSRF exempt, `verify=False`, new IaC resources, request values written into config files, or install wizards (WEB-33, 35, 42–47, 57–59, 61)?
10. **Dependencies**: Do new dependencies really exist, are they well maintained, and are versions locked (WEB-55)?
11. **Run tools**: `semgrep scan --config p/default` + language packs, `gitleaks git -v .`, `osv-scanner scan source -r .` (installation in README). Tool results need manual confirmation of reachability and cannot be used as conclusions directly.
12. **Conclusion**: P0/P1 must be fixed before delivery; for anything that cannot be fixed, record the location, exploit path and impact, and have a human sign off on accepting the risk.
### Noise reduction: usually do **not** report the following (unless there is a concrete exploit path)
- Only a missing security header/cookie attribute, missing audit logs or missing hardening, with no reachable privilege escalation or leak (file as a P3 recommendation).
- "XSS" in ordinary React/Vue/Angular interpolation; missing permission checks in frontend code (the frontend is untrusted; report the issue on the backend).
- "SSRF" where only the URL path is controlled, not the host/scheme.
- Attacks that depend on the attacker controlling environment variables/CLI arguments; issues only in test files or docs.
- UUID-guessing issues (UUIDs are treated as unguessable, but they cannot replace authorization checks; see WEB-02).
- Theoretical race conditions: report only races involving funds, quotas or uniqueness constraints.
**Dismissing a candidate needs a named control.** "Admin-only", "operator-controlled", "trusted input" or "by design" is a dismissal only when you name who can set the value (which role, after which login, on a default install), and that role already has the same power by design. Lower-privileged admins or editors, a default no-auth mode, and values that reach other users' browsers all keep the finding. Write the control and its `file:line` in `dismissed`.
(The noise-reduction rules are adapted from the false-positive filtering guidance in anthropics/claude-code-security-review@0c6a49f1; this pack is stricter than upstream on rate limiting, race conditions and dependency vulnerabilities, because outsourced delivery requires the coverage.)
---
## Audit perspectives
In sec-audit live mode, the web checks and app start-up recipes are in [method-live.md](refs/method-live.md).
For a full audit, go through the six perspectives separately (they can be split across sub-agents in parallel; when sec-audit's sub-agent cap forces a merge, merge 5 with 2 and 6 with 3). Each perspective reports "the list of entry points checked + findings", so you do not see only the most obvious issues. Every P0/P1 finding must include `file:line`, the exploit path and the impact (see severity.md). The index in "Checklist" says which file holds each item.
### 1. Access control and data isolation
- Build a route × role matrix: the identity each route requires, the middleware actually attached, and whether the owner/tenant condition is present.
- Build an **authorization matrix (entry point × action)** (put it in an appendix of the internal report): for every action of every route/ViewSet/Controller (including inherited list/retrieve/create/update/partial_update/destroy, custom `@action`, bulk/test/preview/upload), list the caller identity, the permission/policy actually in effect, and the object-level condition. **One row per action**: list/retrieve/create/update/partial_update/destroy, every `@action`/custom route and every bulk endpoint each get their own row; do not write merged rows such as "CRUD", "create/update" or "rest same as above". Each row also answers "should this action be exposed from a business point of view" (a share-link ViewSet that only needs create but inherits list/retrieve/destroy is a finding by itself). **Check both halves of compound permission checks**: for conditions like `owner == user or user.is_staff`, `has_perm(...) or obj.is_public`, "non-superusers cannot set is_superuser", ask for each branch "who controls this half, and can a regular user satisfy or bypass it". For example, a guard that blocks only `is_superuser` but lets the equally privileged `is_staff`/`role` through, or that compares only a boolean in `request.data` (the string `"true"` bypasses `is True`) instead of `validated_data`. Look especially for three asymmetries: (1) create/update are guarded but destroy/bulk/custom actions are not; (2) an endpoint overrides `permission_classes`, skips `authorize()` or only attaches `IsAuthenticated`; (3) write actions reuse the read check (WEB-60).
- Find "multiple paths to the same resource": REST + GraphQL + gRPC + export + bulk + admin panel + webhook + old API versions + message consumers; the weakest one is the effective policy (WEB-71, 72, 73). Fill the matrix in [method-parallel-paths.md](refs/method-parallel-paths.md).
- Walk one protected record through its life: create → share → cache/index/feed/export → import/restore → suspend/delete → restore. Every copy and every state must keep the owner/tenant/visibility condition (WEB-86–90).
- Test every ID parameter (path, query, body, header, nested objects, message fields) with the mental model of two regular accounts + two tenants.
- Items: WEB-01–07, WEB-57, WEB-60, WEB-71–74, WEB-83, WEB-84, WEB-86–92, WEB-127.
### 2. Injection, parsing and input
- Trace source → sink from every entry point (HTTP, queue messages, uploaded file contents, third-party callbacks, user data in the database), including second-order (stored then used) and field-name/key-name injection.
- Search especially for: `$queryRawUnsafe|\.raw\(|whereRaw|text\(f|execute\(f|Sprintf.*SELECT|exec\(|shell=True|eval\(|new Function|render_template_string|pickle|yaml\.load|unserialize|readObject|fetch\(|requests\.get|sendFile|path\.join|filter\(\*\*|Q\(\*\*|lookup\(|invoke|forName|constantize|include|extract\(|jq|xpath`.
- **Parser differentials**: for each security decision on a name, path, URL, email or structured document, find the second parser that later acts on it (router vs filter, validator vs HTTP client, check vs filesystem, normalizer vs database collation) and test the inputs on which they disagree (WEB-99–103, 129), following [method-parser-differentials.md](refs/method-parser-differentials.md).
- Treat "only an admin/operator can set this" as a claim to verify, not a dismissal (see the noise-reduction rule above).
- Items: WEB-20–28, WEB-37–41, WEB-61, WEB-65–67, WEB-99–114, WEB-128, WEB-129.
### 3. Authentication and sessions
- For each credential type (password, session, JWT, refresh token, API key, OAuth code, SAML assertion, passkey, client certificate, remember-me token, reset token, OTP), walk through: issue → store → transmit → verify → refresh → revoke.
- Enumerate every door into the same account (login, SSO/JIT, magic link, reset, email rebinding, MFA recovery, proxy/header auth, admin impersonation, API tokens); the effective strength is that of the weakest door (WEB-76, 84).
- Check that role, membership and account-state changes take effect on every credential already issued (WEB-83).
- Items: WEB-08–19, WEB-42, WEB-45–47, WEB-75–82, WEB-85.
### 4. Business logic, funds and resources
- Draw a state machine for every flow involving money, points, inventory, quotas or entitlements: which steps can be skipped, replayed, run concurrently, reordered or rolled back.
- Check whether the server recomputes all amounts, treats the payment platform's verified callback/active query as authoritative, is idempotent, and fails closed when a dependency errors (WEB-93).
- Try negative numbers, zero, huge values, decimals, currency units, 20 concurrent requests, duplicate callbacks, cancel mid-way.
- Items: WEB-48–54, WEB-93–98, plus the related WEB-02, WEB-04.
### 5. Browser and client
- List every place server data reaches a browser: HTML templates, JSON consumed by the SPA, inline scripts, file downloads, emails, postMessage, WebSocket messages, service workers. For each, name the context and its encoding.
- Check cross-site rules together: cookies (scope, SameSite, prefixes), CSRF defenses, CORS, framing, COOP/CORP, content types.
- If the repo ships a desktop wrapper (Electron, Tauri), check its window, navigation, `openExternal` and IPC settings: any XSS or link in user content becomes code execution there (WEB-130).
- Items: WEB-29–36, WEB-68, WEB-115–120, WEB-130.
### 6. Protocol, deployment and supply chain
- Read the proxy, CDN, cache, DNS, container, CI and IaC config shipped in the repo. If the product itself deploys compose files, Dockerfiles or manifests that users supply, check what host-level options they may set (WEB-131). Where the deciding config lives outside the repo, record a needs-verification item naming the fact the owner must check.
- Items: WEB-43, WEB-44, WEB-55, WEB-56, WEB-58, WEB-59, WEB-62–64, WEB-69, WEB-70, WEB-121–126, WEB-131.
---
## Further reading
- OWASP Top 10 2025: https://owasp.org/Top10/
- OWASP API Security Top 10 2023: https://owasp.org/API-Security/editions/2023/en/0x11-t10/
- OWASP ASVS 5.0: https://github.com/OWASP/ASVS
- OWASP Cheat Sheet Series: https://cheatsheetseries.owasp.org/
- CWE Top 25: https://cwe.mitre.org/top25/
- PortSwigger Web Security Academy: https://portswigger.net/web-security
- trailofbits/skills (CC-BY-SA-4.0, link only): https://github.com/trailofbits/skills