Contents

Chapter 1

Features

This chapter covers the core features and capabilities of CSP Builder.

Features

  • Directive generator — covers all standard CSP directives (default-src, script-src, style-src, etc.)
  • Preset policies — strict, moderate, and permissive presets for quick starts
  • Policy tester — validate a URL's existing CSP headers and identify gaps
  • Violation reporting — configure report-uri and report-to directives
  • Nonce generation — create cryptographic nonces for inline scripts and styles
  • Multiple output formats — HTTP header string or HTML tag
  • Config file support — version-control your CSP policies as JSON
  • Directive reference — built-in documentation for every CSP directive

Requirements

  • Python 3.10+
  • No external dependencies (stdlib only)
Chapter 2

Quick Start

Follow this guide to get CSP Builder up and running in your environment.

Quick Start

bash
# Generate a strict CSP header
python src/csp_builder.py --preset strict

# Build from a config file
python src/csp_builder.py --config examples/csp_config.json --output csp_header.txt

# Test a live URL's CSP
python src/csp_builder.py --test --url https://example.com

Output

Outputs a ready-to-use CSP header string (e.g., Content-Security-Policy: default-src 'none'; script-src 'self'; ...) or an HTML meta tag equivalent. Test mode shows the existing policy with gap analysis.

Chapter 3
🔒 Available in full product

Configuration Reference

Chapter 4
🔒 Available in full product

License

You’ve reached the end of the free preview

Get the full CSP Builder and unlock everything.

All Chapters

Get the complete guide with every chapter unlocked, including code samples, diagrams, and best practices.

Full Tool Suite

Access all interactive tools with complete data, all workload profiles, and the full scenario library.

Source Files

Downloadable source code, configuration files, and working examples from every chapter.

Lifetime Updates

Free updates for life. Every new chapter, tool, and improvement included.

Buy Now — $19 →
📦 Free sample included — download another copy for the full product.
CSP Builder v1.0.0 — Free Preview