plugins/smedjen/skills/web-security-owasp/SKILL.md
XSS, CSRF, injection attacks, SSRF, security headers, and web application security hardening. Covers reflected/stored/DOM-based XSS, token-based CSRF defense, parameterized queries, SSRF allowlists, and the full security header stack with recommended values.
npx skillsauth add hjemmesidekongen/ai web-security-owaspInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Security bugs are architecture bugs discovered late. The OWASP Top 10 attacks succeed because input trust assumptions are baked into design — not because developers forgot a sanitization call.
Reflected: payload in request, echoed in response. User must click a crafted URL. Stored: payload persisted to DB, served to every visitor. DOM-based: payload lives in the URL fragment or JS variable, processed entirely client-side — server logs show nothing.
Prevention: output encoding matched to context (HTML entity, JS escape, CSS escape, URL encode). CSP as a second layer — not a replacement. Never trust innerHTML; use textContent or DOM APIs.
Forged requests exploit authenticated sessions. Defense: synchronizer token (server-issued, validated per-request) or SameSite=Strict cookies. Double-submit cookie pattern works for stateless APIs. Check Origin/Referer headers as secondary signal.
Parameterized queries eliminate SQL injection — string concatenation does not. ORM query builders are safe when used correctly; raw query escape hatches are not. NoSQL injection targets MongoDB $where and JSON body operators — validate and type-check inputs before passing to query layer.
Server-side fetch of user-supplied URLs enables internal network scanning. Allowlist approved domains. Resolve DNS before connecting and re-validate the resolved IP — DNS rebinding bypasses hostname checks. Block RFC-1918 ranges (10.x, 172.16.x, 192.168.x) and 169.254.0.0/16 (cloud metadata).
Embed the target in an iframe, render transparent overlay, capture clicks. Defense: X-Frame-Options: DENY or Content-Security-Policy: frame-ancestors 'none'. frame-ancestors is the CSP-native replacement; use both for older browser coverage.
See references/process.md for security header values, cookie flag reference, SRI, HTTPS/HSTS setup, and anti-patterns.
development
Creates a brand from scratch through market research and interactive sparring. Runs competitive research via Perplexity, then guides the user through positioning, audience, voice, values, and content pillars. Produces the full brand guideline set at .ai/brand/{name}/. Use when building a new brand, defining brand strategy for a product, or when /våbenskjold:create is invoked.
testing
Loads brand guidelines from .ai/brand/{name}/ and makes them available to the current context. Progressive disclosure: L1 confirms brand exists, L2 loads summary, L3 loads specific files on demand. Use when a downstream skill or user needs brand context, or when /våbenskjold:apply is invoked.
documentation
Guided reinvention of an existing brand guideline. Loads current brand from .ai/brand/{name}/, identifies what to keep vs change, and walks the user through targeted evolution. Preserves brand equity while updating positioning, voice, or values. Use when refreshing a brand or when /våbenskjold:evolve is invoked.
development
Codifies an existing brand from materials, samples, and references. Analyzes provided content to extract voice patterns, values, and positioning. Produces the same guideline format as brand-strategy. Use when a brand already exists but isn't documented, or when /våbenskjold:audit is invoked.