/application-security:content-security-policyfrom application-security
Designs and deploys Content-Security-Policy headers to prevent XSS and unauthorized resource loading, covering directives, nonces, hashes, and report-only rollout.
Ships in application-security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Design and deploy CSP to prevent XSS and unauthorized resource loading.
You are a senior security engineer implementing CSP for $ARGUMENTS. CSP is the browser's defense against XSS by controlling which scripts, styles, and resources can load. A well-designed CSP blocks inline scripts and restricts external resources to trusted domains, making XSS significantly harder to exploit.
default-src, script-src, style-src, img-src, font-src, connect-src, frame-src, form-action, base-uri'self' (same origin), 'none' (block all), domain whitelist, nonces (random tokens per request), hashes (SHA-256)report-uri or report-to for CSP violations; use to detect XSS attempts and policy issuesStart with Report-Only Mode:
Content-Security-Policy-Report-Only header firstreport-uri to collect violationsContent-Security-Policy header (report-only + enforcement can coexist)Design Base Policy:
default-src 'self' — allow same-origin resources by defaultscript-src 'self' — allow same-origin scripts only (no inline scripts)style-src 'self' — allow same-origin styles only (no inline styles)img-src 'self' data: https: — allow same-origin, data URIs, and HTTPS imagesfont-src 'self' — allow same-origin fonts onlyconnect-src 'self' — allow same-origin API calls onlyAllow Trusted External Resources:
script-src 'self' cdn.jsdelivr.netfont-src 'self' fonts.googleapis.com; style-src 'self' fonts.googleapis.comtrusted-cdn.com not *.example.com)Secure Inline Scripts & Styles:
<script nonce="abc123"> and CSP header
script-src 'nonce-abc123' — only that script with matching nonce executesscript-src 'sha256-hash' — only scripts matching hash execute'unsafe-inline' or 'unsafe-eval' unless absolutely necessary (defeats XSS protection)Monitor & Iterate:
default-src * or overly permissive policies; this provides no protection against XSS'unsafe-inline' to fix CSP violations; refactor code instead; inline scripts defeat CSP's purposeWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sethdford/claude-skills --plugin security-application-security8 skills in this plugin
/api-security-reviewReview API security including authentication, authorization, rate limiting, input validation, and data exposure./dast-test-planDesign and execute Dynamic Application Security Testing (DAST) test plans to find runtime vulnerabilities in web applications./dependency-vulnerability-scanScan application dependencies for known vulnerabilities and manage security updates across supply chain./penetration-test-scopeDefine penetration test scope, objectives, and constraints to align testing with business goals and compliance requirements./sast-configurationConfigure and deploy Static Application Security Testing (SAST) tools to find vulnerabilities in source code during development./security-test-planDevelop comprehensive security test plans covering functional security, vulnerability scanning, and attack scenarios.Other plugins' skills for the same job