Skip to content

aleph-void/csptool.net

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSP Tool

CSP Tool is an open-source browser extension for inspecting, editing, and overriding Content Security Policies in real time. Available for Chrome and Firefox.

Website: https://csptool.net

Features

  • Live CSP Inspection — Instantly view the active Content Security Policy from HTTP headers or meta tags on any page.
  • Visual Editor — Add, edit, toggle, and remove directives using a clean visual interface. No more hand-editing raw header strings.
  • Header Override — Replace server-sent CSP headers entirely using the declarativeNetRequest API for full control to tighten or loosen any policy.
  • Violation Tracking — Monitor CSP violations as they happen. See the blocked resource, violated directive, and timestamps in real time.
  • Multiple Configurations — Save and switch between named CSP configurations with URL patterns so the right policy applies to the right environment.
  • 15 Languages — Full internationalization with support for English, Chinese, Spanish, German, French, Italian, Portuguese, Japanese, Korean, Russian, Polish, Arabic, Filipino, Hebrew, and Hindi.

How It Works

CSP Tool offers two modes for applying policy changes:

Mode 1: Meta Tag Mode (Default)

Injects or modifies a <meta> tag in the page DOM to apply your policy changes.

  • No page reload required
  • Great for loosening policies during development
  • Cannot tighten policies already set by HTTP headers

Mode 2: Header Override Mode (Advanced)

Intercepts and replaces the actual HTTP Content-Security-Policy response header before the browser processes it.

  • Full control — tighten or loosen any policy
  • Can inject CSP on pages with no existing policy
  • Requires a page reload after changes

Typical Workflow

  1. Inspect — Open the extension popup to see the active CSP on the current page.
  2. Edit — Add, modify, or toggle directives using the visual editor.
  3. Apply — Click Apply to push the new policy to the page instantly.
  4. Debug — Check the Errors tab for violations and iterate until clean.

Editor

The editor supports all 28 CSP directives from the specification:

  • Fetch directivesdefault-src, script-src, style-src, img-src, font-src, connect-src, media-src, object-src, frame-src, child-src, worker-src, manifest-src
  • Document directivesbase-uri, sandbox
  • Navigation directivesform-action, frame-ancestors, navigate-to
  • Reportingreport-uri, report-to

Each directive can be toggled on/off without losing its value, or deleted entirely. The Reset button restores the original policy from the page.

Configurations & URL Patterns

Create multiple named configurations and assign URL patterns (glob syntax) to each:

https://example.com/*
https://*.staging.example.com/*
*://localhost:3000/*

CSP Tool automatically activates the matching configuration based on the current page URL.

Violation Tracking

The Errors tab captures securitypolicyviolation events in real time. Each violation shows:

  • Error message
  • Violated directive
  • Blocked URI
  • Timestamp

Capturing Violations with csptool-receiver

csptool-receiver is a companion web application that collects CSP violation reports sent via the report-to and report-uri directives. It is designed to work alongside CSP Tool to give researchers a complete violation capture pipeline.

How to Use

  1. Deploy csptool-receiver to a host reachable from your target page.
  2. In CSP Tool's editor, override the report-uri or report-to directive to point at your csptool-receiver endpoint.
  3. Browse the target site — the browser will POST violation reports to your collector in real time.

This workflow captures violations that occur outside the browser tab (e.g. in workers or cross-origin frames) which are not surfaced by the built-in Errors tab.

Installation

Install for free from your browser's extension store:

Tech Stack

Built with Vue 3, TypeScript, and Tailwind CSS.

Related Projects

License

Open source. Contributions and bug reports are welcome on GitHub.

Created by Aleph Void LLC. © 2026 CSP Tool.

About

The Public Web / Marketing Site for CSP Tool

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors