hunt-csp

Validates Content Security Policy enforcement in real browsers against XSS and clickjacking signals.

10|3|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-csp-baiqigo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hunt-csp
Source: https://github.com/baiqigo/baiqi-redteam-lab/tree/main/.agents/skills/hunt-csp
Command: npx skills add https://github.com/baiqigo/baiqi-redteam-lab --skill hunt-csp-baiqigo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Security testers often misread CSP headers as static strings and cannot tell whether a policy actually blocks script injection or framing in a live browser, leading to false positives and missed client-side vulnerabilities. ## Core Features & Use Cases - Browser-Verified CSP Auditing: Records CSP sources, header merge rules, enforce vs report-only modes, nonce/hash, strict-dynamic, and Trusted Types, using Chrome console policy violations as primary evidence. - Minimal Harmless Validation: Confirms whether CSP blocks a target context using in-page harmless markers and self-hosted iframe demo pages, without external scripts or data exfiltration. - Clear Oracle and Routing: Distinguishes real exploitable gaps from non-issues like unreachable report endpoints, and routes confirmed XSS impact to hunt-xss/hunt-dom and UI impact to hunt-clickjacking. - Use Case: During an authorized web assessment, you spot a script nonce and a frame-ancestors header; this Skill verifies in Chrome whether injection or framing actually executes before reporting a finding. ## Quick Start Ask the agent to run the hunt-csp route against the authorized target to verify whether its CSP, Trusted Types, and frame-ancestors policies actually block injection and framing in a real browser.

Frequently Asked Questions about hunt-csp

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I test if a Content Security Policy actually works?

CSP testing requires verifying enforcement in a real browser, not just parsing header strings. This Skill uses Chrome console policy violations as primary evidence and harmless in-page markers to confirm whether injection contexts are actually blocked.

How to test frame-ancestors against clickjacking?

Frame-ancestors is validated with a self-hosted iframe demo page to confirm whether sensitive pages can be framed by arbitrary external origins. A finding only counts if an external origin can actually frame the page.

Does a missing CSP header always mean a vulnerability?

No. A missing header is not a vulnerability if another header covers the same directive, and Report-Only warnings or unreachable report endpoints are not standalone findings. Only confirmed executable injection or framing counts.

Can CSP testing be done without data exfiltration?

Yes. This Skill explicitly avoids external script uploads, data exfiltration, and third-party JSONP or open-redirect bypass chains, relying on harmless markers and existing XSS or DOM evidence instead.

What are the limitations of CSP header analysis?

Static header parsing cannot show whether a policy blocks real execution contexts. WAF blocks, captchas, timeouts, or single anomalies are treated as inconclusive, and out-of-scope or third-party impact stops the test immediately.