csp-bypass-tester

csp-bypass-tester is an agent for Claude Code from Stickman230/claude-pentest. It costs 78 tokens per session (2,939 once invoked), scanned A, original, MIT.

A web-security agent that examines Content Security Policy, or CSP, a browser rule controlling which scripts and other resources a page may load. It checks whether that rule has weaknesses and tests possible ways around it.

In plain words
What is it for?
Use it to inspect CSP headers and meta tags, check weaknesses such as unsafe script rules or broad source lists, and confirm behavior in a real browser.
Why use it?
It can reveal when a CSP appears restrictive but still permits unsafe scripts or trusted domains that attackers could abuse.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the pentest plugin — 7 skills, 5 commands, 15 agents shipped together

Good fit Use it to inspect CSP headers and meta tags, check weaknesses such as unsafe script rules or broad source lists, and confirm behavior in a real browser.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/stickman230/claude-pentest/csp-bypass-tester
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.

Clone the repo
git clone --depth 1 https://github.com/Stickman230/claude-pentest

Made for: Claude Code.

Or install pentest, the plugin that ships this one along with the rest of its 7 skills, 5 commands, 15 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for csp-bypass-tester

README.md
[![agentmods](https://agentmods.dev/badge/agents/stickman230/claude-pentest/csp-bypass-tester/github.svg)](https://agentmods.dev/agents/stickman230/claude-pentest/csp-bypass-tester)
Your own site
<a href="https://agentmods.dev/agents/stickman230/claude-pentest/csp-bypass-tester"><img src="https://agentmods.dev/badge/agents/stickman230/claude-pentest/csp-bypass-tester/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for csp-bypass-tester

Your own site · 80×15
<a href="https://agentmods.dev/agents/stickman230/claude-pentest/csp-bypass-tester"><img src="https://agentmods.dev/badge/agents/stickman230/claude-pentest/csp-bypass-tester.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,939 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00078 $0.02939
Opus 5 $0.00039 $0.01470
Sonnet 5 $0.00016 $0.00588
Haiku 4.5 $0.00008 $0.00294

Measured 11d ago against content hash b967e6038de5, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

csp-bypass-tester 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 11d 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.

2. Extract CSP header using curl:
plugins/pentest/agents/csp-bypass-tester.md · 268 lines

How it starts

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

CSP Bypass Tester

Inspect and test Content Security Policy implementations. Extract the policy, analyze for permissive directives, identify known bypass vectors (JSONP, Angular, open redirects in allowlisted origins), and confirm whether scripts execute in a real browser despite the policy.

Workflow

Phase 1: Recon

  1. Mount skill files:
    Read plugins/pentest/skills/common-appsec-patterns/SKILL.md
    Read plugins/pentest/skills/pentest/attacks/client-side/xss/xss-bypass-techniques.md
    
  2. Extract CSP header using curl:
    curl -sI https://TARGET/ 2>&1 \
      | grep -i 'content-security-policy' \
      | tee outputs/ENGAGEMENT/activity/csp-header-TARGET.txt
    
  3. Also check for CSP delivered via meta tag:
    curl -s https://TARGET/ 2>&1 \
      | grep -i 'content-security-policy' \
      | tee outputs/ENGAGEMENT/activity/csp-meta-TARGET.txt
    
  4. Navigate to target in browser to capture full CSP including dynamically set headers:
    browser_navigate(url="https://TARGET")
    browser_network_requests()
    
    Identify the content-security-policy header value from the network requests output.
  5. Parse the CSP manually for each directive:
    • default-src: catch-all for unspecified resource types
    • script-src: controls JavaScript execution — most critical directive
    • style-src: CSS sources
    • img-src: image sources
    • connect-src: fetch/XHR/WebSocket origins
    • frame-src/child-src: iframe allowed origins
    • report-uri/report-to: reporting endpoints
  6. Flag immediately dangerous directive values:
    • 'unsafe-inline' in script-src → inline scripts permitted (major weakness)
    • 'unsafe-eval' in script-src → eval() permitted (major weakness)
    • * wildcard in script-src → any origin permitted (complete bypass)
    • data: in script-src → data URI scripts permitted (known bypass)
    • http: scheme in script-src → allows any HTTP domain
    • blob: in script-src → allows blob URI execution
  7. Log:
    {"timestamp":"...","agent":"csp-bypass-tester","action":"recon","target":"https://TARGET","csp_present":true,"script_src":"'self' https://cdn.jquery.com 'nonce-abc123'","unsafe_inline":false,"unsafe_eval":false,"wildcard":false}
    

Read the full file on GitHub · 268 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. 11d ago First seen · 268 lines · 78 tokens per session scan A b967e6038de5

Subscribe to this mod's changes

csp-bypass-tester is an agent published in the GitHub repository Stickman230/claude-pentest (100 stars, last pushed 3mo ago), licensed MIT. It adds 78 tokens to every session and 2,939 once invoked, about $0.0004 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-30.