Web and Electron Security Review (JavaScript / TypeScript)
Leaf-mode guard
If the task identifies your role as leaf-reviewer or sets
delegation-budget: 0, read and follow
references/validation-pass.md, validate only
the supplied candidates, return the verdicts to the caller, and stop before the
full workflow below.
Identify exploitable security vulnerabilities in JavaScript/TypeScript web and
Electron desktop applications. Reason about the code the way a security researcher
would — trace data flow, understand framework and runtime protections, and report only
findings you can justify with concrete proof. Signal over noise.
This skill is a best-of-three composite. See ATTRIBUTION.md.
Scope
In scope: Node.js/TypeScript backends (Express, NestJS, Fastify, Next.js API
routes), browser/SSR frontends (React, Vue, Angular, Next.js), and Electron main,
preload, renderer, worker, and utility-process code. Server-side, client-side, and
desktop JS/TS, plus the config, packaging, CI/CD, and IaC files that ship with them.
Out of scope: other languages (defer to a language-specific reviewer) and the
exclusions in references/false-positives.md.
Report vs. research — the prime directive
- Report on: only the file, diff, or path the user asked about.
- Research: the entire codebase to establish the facts before reporting.
Before flagging anything, trace where the input actually comes from, whether it is
validated/sanitized upstream, how it is configured, and what framework protection
applies. Never report on pattern-match alone. Investigate first, report second.
Reporting gate: proof, not probability
Report a finding only when you can construct concrete proof appropriate to the
class. If you can't describe how the bug actually manifests, it isn't a finding.
Use one of these proof shapes:
- Data-flow flaw: the exact attacker-controlled input, its route through the code,
and the security-sensitive sink it reaches.
- Exposure flaw: the sensitive value or resource, where an attacker can observe or
retrieve it, and why the value is real and security-relevant. Never validate a
suspected credential against a live service.
- Configuration flaw: the effective unsafe setting, the attacker capability or
reachable operation it affects, the security boundary it removes, and the concrete
resulting impact.
Every shape must establish attacker capability, affected boundary, and impact. Signal
over noise: run down every lead you notice, then report only the ones whose proof is
complete. The gate is proof, not how many candidates you started with.
Do not assign confidence percentages or 1–10 scores — reviewer confidence is not
evidence, and neither is a second tool agreeing with you. The complete proof is the
evidence. Every candidate is in exactly one state:
| State |
You have… |
Action |
| Proven |
one complete proof shape above with a concrete exploit or exposure you can describe |
Report, with that proof in the finding |
| Lead |
a suspicious path, exposure, or setting with a missing proof element after investigation |
List under "Needs verification" as a question — not a finding |
| Theoretical |
only a pattern match, best-practice gap, or defense-in-depth nit |
Drop |
For a data-flow candidate, first ask whether the input is attacker-controlled or
server-controlled. For exposure and configuration candidates, identify the attacker-
reachable boundary and concrete impact instead. See the taxonomy, proof gate, and hard
exclusion / precedent lists in
references/false-positives.md — read it before
reporting anything.
Review workflow
Run these steps in order. Load reference files as each step needs them — don't
front-load everything into context.
1. Scope resolution
2. Map the attack surface
For each file, decide which vulnerability classes are even reachable, then load the
matching sections of references/vuln-classes.md:
| Code under review |
Primary classes to check |
| API routes / controllers |
authorization (IDOR/BOLA), authentication/JWT, injection |
| DB/storage access / ORM/ODM/client |
SQL/NoSQL injection; Redis/LevelDB authz, path, atomicity |
| Templates / DOM / components |
XSS |
Outbound fetch/http/webhooks |
SSRF |
| State-changing endpoints |
CSRF |
| Uploads / file paths |
path traversal, file handling |
| Cookies / tokens / hashing |
crypto, session, secrets |
| Login / password reset / signup |
auth — hashing, enumeration, reset tokens, brute-force |
| OAuth / OIDC callback routes |
OIDC/SSO — see oidc-sso-review.md |
Object merge / JSON.parse spread |
prototype pollution, mass assignment |
| Money / counters / multi-step flows |
business logic, race conditions |
Dockerfile / compose / .env / IaC |
deployment hardening — see self-hosting-hardening.md |
| DB service / connection config / migrations |
DB deployment — see database-deployment-security.md |
Electron main/preload/renderer / webPreferences |
renderer-to-native escalation, isolation — see electron-threats.md |
| Electron IPC / bridge / windows / navigation |
capability authorization, cross-frame/window trust — see electron-threats.md |
| Electron protocols / deep links / shell / updater |
path/header/command flow, permissions, package integrity — see electron-threats.md |
Load references/javascript-web-patterns.md
for the framework-specific safe-vs-dangerous catalog (what auto-escapes, which sinks
are exploitable, which APIs bypass protection).
Conditional passes. If the scope includes deployment files (Dockerfile,
docker-compose*.yml, .env*, IaC) or the user asks for a deployment/Docker/self-
hosting review, additionally run
references/self-hosting-hardening.md, and
when a DB service / connection config / migration runner is in scope also run
references/database-deployment-security.md.
Report proven findings in a Deployment Hardening section with a Deployment-Risk
rating (not the app-vuln severity table). Deployment checklist matches remain subject
to the proof gate: reachability and concrete impact are required, and a missing
hardening control alone is not a finding. If an OAuth/OIDC login flow is in scope,
also run references/oidc-sso-review.md. If Electron
is detected or the requested artifact is an Electron package/ASAR, additionally run
references/electron-threats.md and map every
renderer-to-native trust boundary before classifying candidates.
3. Dependency & secrets quick pass
Fast, high-value wins before the deep scan:
- Dependencies: scan
package.json + lockfile for known-vulnerable packages. When
available and permitted, corroborate with
npm audit --omit=dev — but only report a dependency finding with a concrete,
reachable exploit path; otherwise omit it from findings or put the missing
reachability fact under Needs verification.
- Electron runtime: when present, compare the exact resolved version and target
platform with the official support policy, Electron advisories, release notes, and
applicable bundled Chromium/Node advisories. Match the affected API/content path and
attacker prerequisites before reporting; an outdated line alone is a hardening gap.
- Secrets: scan all files — including
.env, config, CI/CD, Dockerfiles, IaC —
for hardcoded API keys, tokens, private keys, and DB connection strings with
embedded credentials. Real high-value secrets in source/logs are findings;
see the precedents in references/false-positives.md.
4. Deep vulnerability scan
The core pass. Reason about the code; do not grep-and-report. For each reachable
class in step 2, apply the detection signals, safe patterns, and escalation checkers
in references/vuln-classes.md. For every candidate,
confirm the framework does not already neutralize it (auto-escaping, parameterized
queries, SameSite cookies, middleware) using
references/javascript-web-patterns.md.
5. Cross-file data-flow analysis
Step back and look holistically. Trace attacker-controlled input from entry points
(HTTP params/body/headers/cookies, route segments, uploads, WebSocket messages,
renderer/IPC payloads, deep links, protocol requests, navigation, clipboard/downloads)
across files to dangerous sinks (DB queries, exec, HTML output, file writes,
outbound requests, Electron/OS capabilities). Catch second-order issues (value
stored safely, used unsafely later) and broken trust boundaries between modules,
processes, frames, windows, or services that no single-file view reveals.
6. Adversarial self-verification
For each surviving candidate, try to refute it before it makes the report.
When independent reviewers are available and the candidate set is non-trivial,
use at most two leaf validation tasks total. Partition or batch the candidates
between them; never launch one task per candidate or a second validation round.
Prefer the tool-restricted security:reviewer agent when the host exposes it;
otherwise use a general task-local subagent. Start every prompt with
role: leaf-reviewer and delegation-budget: 0, omit workflow skill names, and
point it at the resolved path of
<plugin-root>/skills/web-security-review/references/validation-pass.md. When
context inheritance is configurable, do not pass the surrounding conversation.
Ask each reviewer to disprove its assigned candidates using
references/false-positives.md:
- Re-read the code with fresh eyes. Is it actually reachable with attacker input?
- Is there validation, sanitization, or an allowlist upstream that was missed?
- Does a framework/middleware handle it already?
- Is the source truly attacker-controlled, or server-controlled config?
- For an exposure, is the value/resource genuinely sensitive and attacker-observable?
- For configuration, is the setting effective on a reachable path, and does it cause
the claimed impact rather than merely omit defense-in-depth?
Drop anything that lacks a complete applicable proof shape after refutation. This
find → refute-in-parallel → keep-only-what-survives loop is what keeps the report
actionable.
7. Report
Emit the report in the structure defined by
references/report-format.md: a severity summary
table first, then findings grouped by class, each with location, proof (the traced
data flow, exposure, or effective configuration), evidence, impact, and fix. If nothing
survives, say so explicitly and state what was scanned — "No proven vulnerabilities
identified in ."
8. Propose fixes (do not auto-apply)
For each Critical/High finding, propose a concrete, minimal patch: show vulnerable →
fixed, preserve surrounding style and names, and explain what changed and why. State
plainly: "Review each patch before applying — nothing has been changed." Never
edit files as part of the review unless the user explicitly asks.
Severity
Assign severity from the proven impact, attacker prerequisites, affected data or
privilege, and scope — never from a sink name alone. Use these anchors:
| Severity |
Anchor |
| Critical |
Pre-auth compromise of the application/host or similarly systemic loss |
| High |
Major confidentiality/integrity loss or account takeover |
| Medium |
Meaningful but constrained security-boundary violation |
| Low |
Limited, demonstrable impact with narrow scope |
For example, raw-HTML rendering may be Low through High depending on who controls and
views the content; SSRF may be Low through Critical depending on reachable targets and
credentials; and a hardcoded value is not a finding until it is real, sensitive, and
exposed. State the assumptions that drive severity.
Output rules
- Lead with a findings summary table (counts by severity).
- Group by vulnerability class, not by file.
- Every finding: file:line, an evidence snippet, its proof (using the applicable
shape above), a plain-English attacker scenario, and a fix. For secrets, redact the
value; never reproduce a complete credential, private key, password, or connection
string in the report.
- Never auto-apply patches — present them for human review.
- A clean result is a valid result: say what was scanned and that nothing was found.
Reference files
Load on demand — keep SKILL.md context lean.
| File |
Load during |
Covers |
references/javascript-web-patterns.md |
steps 2, 4, 6 |
Framework catalog: React/Vue/Angular/Express/Next/Nest safe-vs-dangerous sinks, DOM XSS, prototype pollution, zod runtime validation, search starters |
references/vuln-classes.md |
steps 2, 4 |
Per-class detection signals, safe patterns, escalation checkers (SQL/Mongo injection, Redis/LevelDB storage boundaries, per-ORM/ODM raw + SQLite, XSS, authz/mass-assignment, authn/session/JWT, SSRF, CSRF, deserialization, path traversal, crypto, secrets, info disclosure, business logic) |
references/false-positives.md |
steps 3, 4, 6 |
Attacker- vs server-controlled taxonomy, hard exclusions, precedents |
references/self-hosting-hardening.md |
conditional (deployment scope) |
Network exposure, reverse-proxy/trust proxy/host-header trust, container/root, secrets in images, CORS, backups, brute-force posture |
references/database-deployment-security.md |
conditional (DB deployment scope) |
Least-privilege DB/Redis roles, default creds, TLS, Redis ACLs, LevelDB filesystem boundary, migration privilege, dump exposure |
references/oidc-sso-review.md |
conditional (OAuth/OIDC scope) |
redirect_uri + post-login open redirect, state/nonce + unsolicited-response rejection, ID-token validation (sig/iss/aud/exp/JWKS), account-linking takeover, PKCE, token leakage, access-token-vs-ID-token misuse |
references/electron-threats.md |
conditional (Electron scope) |
Electron trust topology and proof patterns for renderers/preloads/main, contextBridge/IPC, navigation/windows/webviews, protocols/deep links/shell, permissions/sessions, version advisories, updater/ASAR/fuses/storage |
references/report-format.md |
step 7 |
Output template and finding card |
Adapting for your project
Point this skill at AGENTS.md and optional CLAUDE.md for the app's threat model, trusted
inputs, and auth boundaries. Add project-specific safe patterns (your validation
layer, your ORM conventions) to references/false-positives.md so the review stops
re-flagging them, and add any bespoke sinks to references/vuln-classes.md. For
Electron, also document trusted content origins, allowed IPC capabilities, packaged
platforms, update/signing ownership, and intentional window/session privilege tiers.
1---2name: web-security-review3description: Top-level security code review for JavaScript/TypeScript web applications and Electron desktop applications. Use when the user asks to "security review", "find vulnerabilities", "check for security issues", "audit security", "OWASP review", "is this secure?", or to review Node/Express/React/Vue/Next/Nest/Angular/Electron code for database/storage security, XSS, authentication, authorization (IDOR/BOLA), SSRF, CSRF, deserialization, secrets, crypto, renderer/preload/main-process boundaries, contextBridge/IPC, BrowserWindow/WebContents, navigation, custom protocols, deep links, shell integration, permissions, or updater/package integrity. Traces data flow and reports only findings with concrete data-flow, exposure, or configuration proof. Do not restart the full workflow for a delegated leaf validation task.4---56# Web and Electron Security Review (JavaScript / TypeScript)78## Leaf-mode guard910If the task identifies your role as `leaf-reviewer` or sets11`delegation-budget: 0`, read and follow12[`references/validation-pass.md`](./references/validation-pass.md), validate only13the supplied candidates, return the verdicts to the caller, and stop before the14full workflow below.1516Identify **exploitable** security vulnerabilities in JavaScript/TypeScript web and17Electron desktop applications. Reason about the code the way a security researcher18would — trace data flow, understand framework and runtime protections, and report only19findings you can justify with concrete proof. Signal over noise.2021> This skill is a best-of-three composite. See [ATTRIBUTION.md](./ATTRIBUTION.md).2223## Scope2425**In scope:** Node.js/TypeScript backends (Express, NestJS, Fastify, Next.js API26routes), browser/SSR frontends (React, Vue, Angular, Next.js), and Electron main,27preload, renderer, worker, and utility-process code. Server-side, client-side, and28desktop JS/TS, plus the config, packaging, CI/CD, and IaC files that ship with them.2930**Out of scope:** other languages (defer to a language-specific reviewer) and the31exclusions in [`references/false-positives.md`](./references/false-positives.md).3233### Report vs. research — the prime directive3435- **Report on:** only the file, diff, or path the user asked about.36- **Research:** the _entire_ codebase to establish the facts before reporting.3738Before flagging anything, trace where the input actually comes from, whether it is39validated/sanitized upstream, how it is configured, and what framework protection40applies. **Never report on pattern-match alone.** Investigate first, report second.4142## Reporting gate: proof, not probability4344Report a finding only when you can **construct concrete proof** appropriate to the45class. If you can't describe how the bug actually manifests, it isn't a finding.46Use one of these proof shapes:4748- **Data-flow flaw:** the exact attacker-controlled input, its route through the code,49 and the security-sensitive sink it reaches.50- **Exposure flaw:** the sensitive value or resource, where an attacker can observe or51 retrieve it, and why the value is real and security-relevant. Never validate a52 suspected credential against a live service.53- **Configuration flaw:** the effective unsafe setting, the attacker capability or54 reachable operation it affects, the security boundary it removes, and the concrete55 resulting impact.5657Every shape must establish attacker capability, affected boundary, and impact. Signal58over noise: run down every lead you notice, then report only the ones whose proof is59complete. The gate is proof, not how many candidates you started with.6061Do **not** assign confidence percentages or 1–10 scores — reviewer confidence is not62evidence, and neither is a second tool agreeing with you. The complete proof is the63evidence. Every candidate is in exactly one state:6465| State | You have… | Action |66| --------------- | -------------------------------------------------------------------------------------- | ----------------------------------------------------------------- |67| **Proven** | one complete proof shape above with a concrete exploit or exposure you can describe | **Report**, with that proof in the finding |68| **Lead** | a suspicious path, exposure, or setting with a missing proof element after investigation | List under **"Needs verification"** as a question — not a finding |69| **Theoretical** | only a pattern match, best-practice gap, or defense-in-depth nit | **Drop** |7071For a data-flow candidate, first ask whether the input is attacker-controlled or72server-controlled. For exposure and configuration candidates, identify the attacker-73reachable boundary and concrete impact instead. See the taxonomy, proof gate, and hard74exclusion / precedent lists in75[`references/false-positives.md`](./references/false-positives.md) — read it before76reporting anything.7778## Review workflow7980Run these steps in order. Load reference files as each step needs them — don't81front-load everything into context.8283### 1. Scope resolution8485- If a path/diff was given, review only that. Otherwise review the working changes,86 including untracked files. Establish the default scope with:87 ```bash88 if git rev-parse --verify --quiet origin/HEAD >/dev/null; then89 git diff --merge-base origin/HEAD90 else91 git diff HEAD92 fi93 git ls-files --others --exclude-standard94 ```95 Treat the diff output plus every listed untracked path as the review scope.96- Detect frameworks and versions from `package.json` / lockfile (React, Vue,97 Angular, Express, Nest, Next, ORM/driver/ODM, Redis clients, LevelDB adapters, and98 validation libraries like `zod`/`joi`). When Electron is present, resolve its exact99 installed version, target platforms, packaging toolchain, and main/preload/renderer100 entry points.101- Verify version-sensitive framework, dependency, and vulnerability behavior against102 primary sources: official project documentation, release notes/advisories, standards,103 or NVD/CISA records. Do not rely on search snippets or third-party summaries.104105### 2. Map the attack surface106107For each file, decide which vulnerability classes are even reachable, then load the108matching sections of [`references/vuln-classes.md`](./references/vuln-classes.md):109110| Code under review | Primary classes to check |111| ---------------------------------------- | -------------------------------------------------------- |112| API routes / controllers | authorization (IDOR/BOLA), authentication/JWT, injection |113| DB/storage access / ORM/ODM/client | SQL/NoSQL injection; Redis/LevelDB authz, path, atomicity |114| Templates / DOM / components | XSS |115| Outbound `fetch`/`http`/webhooks | SSRF |116| State-changing endpoints | CSRF |117| Uploads / file paths | path traversal, file handling |118| Cookies / tokens / hashing | crypto, session, secrets |119| Login / password reset / signup | auth — hashing, enumeration, reset tokens, brute-force |120| OAuth / OIDC callback routes | OIDC/SSO — see `oidc-sso-review.md` |121| Object merge / `JSON.parse` spread | prototype pollution, mass assignment |122| Money / counters / multi-step flows | business logic, race conditions |123| Dockerfile / compose / `.env` / IaC | deployment hardening — see `self-hosting-hardening.md` |124| DB service / connection config / migrations | DB deployment — see `database-deployment-security.md` |125| Electron main/preload/renderer / `webPreferences` | renderer-to-native escalation, isolation — see `electron-threats.md` |126| Electron IPC / bridge / windows / navigation | capability authorization, cross-frame/window trust — see `electron-threats.md` |127| Electron protocols / deep links / shell / updater | path/header/command flow, permissions, package integrity — see `electron-threats.md` |128129Load [`references/javascript-web-patterns.md`](./references/javascript-web-patterns.md)130for the framework-specific safe-vs-dangerous catalog (what auto-escapes, which sinks131are exploitable, which APIs bypass protection).132133**Conditional passes.** If the scope includes deployment files (Dockerfile,134`docker-compose*.yml`, `.env*`, IaC) or the user asks for a deployment/Docker/self-135hosting review, additionally run136[`references/self-hosting-hardening.md`](./references/self-hosting-hardening.md), and137when a DB service / connection config / migration runner is in scope also run138[`references/database-deployment-security.md`](./references/database-deployment-security.md).139Report proven findings in a **Deployment Hardening** section with a Deployment-Risk140rating (not the app-vuln severity table). Deployment checklist matches remain subject141to the proof gate: reachability and concrete impact are required, and a missing142hardening control alone is not a finding. If an OAuth/OIDC login flow is in scope,143also run [`references/oidc-sso-review.md`](./references/oidc-sso-review.md). If Electron144is detected or the requested artifact is an Electron package/ASAR, additionally run145[`references/electron-threats.md`](./references/electron-threats.md) and map every146renderer-to-native trust boundary before classifying candidates.147148### 3. Dependency & secrets quick pass149150Fast, high-value wins before the deep scan:151152- **Dependencies:** scan `package.json` + lockfile for known-vulnerable packages. When153 available and permitted, corroborate with154 `npm audit --omit=dev` — but only report a dependency finding with a concrete,155 reachable exploit path; otherwise omit it from findings or put the missing156 reachability fact under **Needs verification**.157- **Electron runtime:** when present, compare the exact resolved version and target158 platform with the official support policy, Electron advisories, release notes, and159 applicable bundled Chromium/Node advisories. Match the affected API/content path and160 attacker prerequisites before reporting; an outdated line alone is a hardening gap.161- **Secrets:** scan all files — including `.env`, config, CI/CD, Dockerfiles, IaC —162 for hardcoded API keys, tokens, private keys, and DB connection strings with163 embedded credentials. Real high-value secrets in source/logs are findings;164 see the precedents in [`references/false-positives.md`](./references/false-positives.md).165166### 4. Deep vulnerability scan167168The core pass. **Reason about the code; do not grep-and-report.** For each reachable169class in step 2, apply the detection signals, safe patterns, and escalation checkers170in [`references/vuln-classes.md`](./references/vuln-classes.md). For every candidate,171confirm the framework does not already neutralize it (auto-escaping, parameterized172queries, `SameSite` cookies, middleware) using173[`references/javascript-web-patterns.md`](./references/javascript-web-patterns.md).174175### 5. Cross-file data-flow analysis176177Step back and look holistically. Trace attacker-controlled input from entry points178(HTTP params/body/headers/cookies, route segments, uploads, WebSocket messages,179renderer/IPC payloads, deep links, protocol requests, navigation, clipboard/downloads)180across files to dangerous sinks (DB queries, `exec`, HTML output, file writes,181outbound requests, Electron/OS capabilities). Catch **second-order** issues (value182stored safely, used unsafely later) and broken trust boundaries between modules,183processes, frames, windows, or services that no single-file view reveals.184185### 6. Adversarial self-verification186187For each surviving candidate, **try to refute it** before it makes the report.188When independent reviewers are available and the candidate set is non-trivial,189use at most **two** leaf validation tasks total. Partition or batch the candidates190between them; never launch one task per candidate or a second validation round.191192Prefer the tool-restricted `security:reviewer` agent when the host exposes it;193otherwise use a general task-local subagent. Start every prompt with194`role: leaf-reviewer` and `delegation-budget: 0`, omit workflow skill names, and195point it at the resolved path of196`<plugin-root>/skills/web-security-review/references/validation-pass.md`. When197context inheritance is configurable, do not pass the surrounding conversation.198Ask each reviewer to disprove its assigned candidates using199[`references/false-positives.md`](./references/false-positives.md):200201- Re-read the code with fresh eyes. Is it _actually_ reachable with attacker input?202- Is there validation, sanitization, or an allowlist upstream that was missed?203- Does a framework/middleware handle it already?204- Is the source truly attacker-controlled, or server-controlled config?205- For an exposure, is the value/resource genuinely sensitive and attacker-observable?206- For configuration, is the setting effective on a reachable path, and does it cause207 the claimed impact rather than merely omit defense-in-depth?208209Drop anything that lacks a complete applicable proof shape after refutation. This210find → refute-in-parallel → keep-only-what-survives loop is what keeps the report211actionable.212213### 7. Report214215Emit the report in the structure defined by216[`references/report-format.md`](./references/report-format.md): a severity summary217table first, then findings grouped by class, each with location, proof (the traced218data flow, exposure, or effective configuration), evidence, impact, and fix. If nothing219survives, say so explicitly and state what was scanned — "No proven vulnerabilities220identified in <scope>."221222### 8. Propose fixes (do not auto-apply)223224For each Critical/High finding, propose a concrete, minimal patch: show vulnerable →225fixed, preserve surrounding style and names, and explain what changed and why. State226plainly: **"Review each patch before applying — nothing has been changed."** Never227edit files as part of the review unless the user explicitly asks.228229## Severity230231Assign severity from the proven impact, attacker prerequisites, affected data or232privilege, and scope — never from a sink name alone. Use these anchors:233234| Severity | Anchor |235| ------------ | ---------------------------------------------------------------------- |236| **Critical** | Pre-auth compromise of the application/host or similarly systemic loss |237| **High** | Major confidentiality/integrity loss or account takeover |238| **Medium** | Meaningful but constrained security-boundary violation |239| **Low** | Limited, demonstrable impact with narrow scope |240241For example, raw-HTML rendering may be Low through High depending on who controls and242views the content; SSRF may be Low through Critical depending on reachable targets and243credentials; and a hardcoded value is not a finding until it is real, sensitive, and244exposed. State the assumptions that drive severity.245246## Output rules247248- Lead with a findings **summary table** (counts by severity).249- **Group by vulnerability class**, not by file.250- Every finding: file:line, an evidence snippet, its **proof** (using the applicable251 shape above), a plain-English attacker scenario, and a fix. For secrets, redact the252 value; never reproduce a complete credential, private key, password, or connection253 string in the report.254- Never auto-apply patches — present them for human review.255- A clean result is a valid result: say what was scanned and that nothing was found.256257## Reference files258259Load on demand — keep SKILL.md context lean.260261| File | Load during | Covers |262| ---------------------------------------------------------------------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |263| [`references/javascript-web-patterns.md`](./references/javascript-web-patterns.md) | steps 2, 4, 6 | Framework catalog: React/Vue/Angular/Express/Next/Nest safe-vs-dangerous sinks, DOM XSS, prototype pollution, `zod` runtime validation, search starters |264| [`references/vuln-classes.md`](./references/vuln-classes.md) | steps 2, 4 | Per-class detection signals, safe patterns, escalation checkers (SQL/Mongo injection, Redis/LevelDB storage boundaries, per-ORM/ODM raw + SQLite, XSS, authz/mass-assignment, authn/session/JWT, SSRF, CSRF, deserialization, path traversal, crypto, secrets, info disclosure, business logic) |265| [`references/false-positives.md`](./references/false-positives.md) | steps 3, 4, 6 | Attacker- vs server-controlled taxonomy, hard exclusions, precedents |266| [`references/self-hosting-hardening.md`](./references/self-hosting-hardening.md) | conditional (deployment scope) | Network exposure, reverse-proxy/`trust proxy`/host-header trust, container/root, secrets in images, CORS, backups, brute-force posture |267| [`references/database-deployment-security.md`](./references/database-deployment-security.md) | conditional (DB deployment scope) | Least-privilege DB/Redis roles, default creds, TLS, Redis ACLs, LevelDB filesystem boundary, migration privilege, dump exposure |268| [`references/oidc-sso-review.md`](./references/oidc-sso-review.md) | conditional (OAuth/OIDC scope) | redirect_uri + post-login open redirect, state/nonce + unsolicited-response rejection, ID-token validation (sig/iss/aud/exp/JWKS), account-linking takeover, PKCE, token leakage, access-token-vs-ID-token misuse |269| [`references/electron-threats.md`](./references/electron-threats.md) | conditional (Electron scope) | Electron trust topology and proof patterns for renderers/preloads/main, contextBridge/IPC, navigation/windows/webviews, protocols/deep links/shell, permissions/sessions, version advisories, updater/ASAR/fuses/storage |270| [`references/report-format.md`](./references/report-format.md) | step 7 | Output template and finding card |271272## Adapting for your project273274Point this skill at `AGENTS.md` and optional `CLAUDE.md` for the app's threat model, trusted275inputs, and auth boundaries. Add project-specific safe patterns (your validation276layer, your ORM conventions) to `references/false-positives.md` so the review stops277re-flagging them, and add any bespoke sinks to `references/vuln-classes.md`. For278Electron, also document trusted content origins, allowed IPC capabilities, packaged279platforms, update/signing ownership, and intentional window/session privilege tiers.