dom-based

A security review for DOM-based vulnerabilities, where browser JavaScript sends attacker-controlled data into an unsafe browser operation.

In plain words
What is it for?
It traces values from sources such as URLs, cookies, storage, and messages to risky navigation, request, parser, socket, or page-manipulation operations.
Why use it?
These flaws can exist entirely in client-side code, so a server-focused review may miss them. They can enable phishing redirects, data leaks, or other browser-side attacks.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/emre-guler/websec/dom-based
Any agent
npx skills add emre-guler/websec --skill dom-based
Clone the repo
git clone --depth 1 https://github.com/emre-guler/websec

Made for: Claude Code, Codex.

Per session 104 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 6,622 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00104 $0.06622
Opus 5 $0.00052 $0.03311
Sonnet 5 $0.00021 $0.01324
Haiku 4.5 $0.00010 $0.00662

Measured 2d ago against content hash 969fcb104dd9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

dom-based scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

| Requests | `XMLHttpRequest.open/send/setRequestHeader`, `fetch(url, {headers})`, `new WebSocket(url)`, `EventSource(url)`, `navigator.sendBeacon` | an API base or endpoint path taken from a parameter or config value th
skills/dom-based/SKILL.md · 176 lines

How it starts

The opening of the file, as written. The whole thing — 176 lines — stays where its author put it; the contents beside it link to each section on GitHub.

DOM-Based Vulnerability Detection

Overview

A DOM-based vulnerability is an unsafe taint flow inside the browser: the site's own JavaScript reads an attacker-influenceable value (a source) and passes it into an API or DOM property (a sink) without validating, encoding or type-checking it. The server may return entirely benign markup — the flaw lives in the client bundle, which means it is invisible to server-side review and often invisible to logs. The attacker is remote: they hand the victim a crafted URL whose query string, fragment or path carries the payload, frame the page and drive it with a cross-document message, or plant a value in storage or a cookie that the page reads back later. What they gain depends entirely on which sink is reached — a credible phishing redirect from the real domain, a planted session cookie, a socket to their own server carrying the victim's data, a subverted client-side query, or a hijacked global variable that turns benign code into an attack primitive. This skill locates every source-to-sink flow in client code, checks each flow in parallel, and merges results into <output_dir>/dom-based-results.md.

What it is NOT

  • Cross-site scripting (/websec:xss): the boundary is the sink, not the source. If the sink renders HTML or executes code — innerHTML, outerHTML, insertAdjacentHTML, document.write, srcdoc, eval, new Function, string-argument timers, createContextualFragment, jQuery .html()/$(…)/.append(), framework HTML bypasses — it belongs to /websec:xss, including the DOM-based, reflected-DOM and stored-DOM cases. Every other client-side sink family — navigation, document.cookie, storage, request headers, WebSocket(), JSON.parse, document.evaluate, executeSql, document.domain, FileReader, plain DOM properties, RegExp() — belongs here. When a flow in this skill escalates into a script-executing sink (an open redirect reached with a script pseudo-protocol, a storage write read back into innerHTML), record the escalation as impact here and note the executing sink for /websec:xss.
  • Prototype pollution (/websec:prototype-pollution): polluting Object.prototype so unrelated code picks up an attacker property is a different mechanism. DOM clobbering — overriding globals by injecting named HTML elements — stays here. Both are gadget techniques; keep them apart in reporting.
  • Server-side open redirection (/websec:open-redirect): a Location header built from a request value is a server bug fixed in the handler, and post-login return flows, allowlist bypasses and protocol-relative or scheme targets go with it. Test: does the browser leave because the server answered with a redirect, or because page JavaScript assigned a navigation property? Only the second belongs here.
  • WebSocket protocol and authorisation flaws (/websec:websockets): message authorisation, cross-site socket hijacking and server-side message handling live there; only the client-side construction of the socket URL from a source belongs here.
  • Server-side injection namesakes (/websec:sql-injection, /websec:xxe): client-side SQL, XPath and JSON injection run against an in-browser database or parser and cannot reach the backend by themselves; scope and impact are client-side only.
  • Cross-origin read misconfiguration (/websec:cors): a permissive response header is a server-side trust decision, not a taint flow. A message listener with no origin check is this skill.
  • Not a finding: a write to a cookie or storage key whose value is never read back into anything security-relevant; a source that reaches a sink through an exact allowlist or a relative-path-only constraint; a message listener that compares event.origin for equality against a fixed origin before using the data; a value that is developer-controlled by the time it reaches the sink (a constant, an enum lookup, an index into a fixed table); DOM writes of values the same user already controls in their own page with no cross-user or cross-origin effect.

Read the full file on GitHub · 176 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 176 lines · 104 tokens per session scan A 969fcb104dd9

Subscribe to this mod's changes

dom-based is a skill published in the GitHub repository emre-guler/websec (2 stars, last pushed 5d ago), licensed MIT. It adds 104 tokens to every session and 6,622 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

vantage

Autonomous, artifact-driven SAST (Static Application Security Testing) for web AND mobile app repositories, plus optional code-level remediation. Use whenever the user asks to security-review, pentest, audit, or scan a codebase for vulnerabilities — web (SQLi, XSS, IDOR/BOLA, auth bypass, SSRF, XXE, hardcoded secrets…

tinoimammp/vantage-security-agent · 230 tokens

prowler-ui

Prowler UI-specific patterns. For generic patterns, see: typescript, react-19, nextjs-16, tailwind-4. Trigger: When working inside ui/ on Prowler-specific conventions (shadcn, folder placement, actions/adapters, shared types/hooks/lib).

prowler-cloud/prowler · 64 tokens

prowler-test-api

Testing patterns for Prowler API: JSON:API, Celery tasks, RLS isolation, RBAC. Trigger: When writing tests for api/ (JSON:API requests/assertions, cross-tenant isolation, RBAC, Celery tasks, viewsets/serializers).

prowler-cloud/prowler · 62 tokens

prowler-pr

Creates Pull Requests for Prowler following the project template and conventions. Trigger: When working on pull request requirements or creation (PR template sections, PR title Conventional Commits check, changelog gate/no-changelog label), or when inspecting PR-related GitHub workflows like conventional-commit.yml…

prowler-cloud/prowler · 84 tokens

tailwind-4

Tailwind CSS 4 patterns and best practices. Trigger: When styling with Tailwind (className, variants, cn()), especially when dynamic styling or CSS variables are involved (no var() in className).

prowler-cloud/prowler · 47 tokens

prowler-docs

Prowler documentation style guide and writing standards. Trigger: When writing documentation for Prowler features, tutorials, or guides.

prowler-cloud/prowler · 31 tokens