UI はローカライズ済みです。スキルの紹介と説明文書は選択した言語へ AI が自動翻訳し、コード・コマンド・パス・専門用語は原文のままです。原作者の文書が優先されます。
スキルを探す
開発・技術 · SKILL.md

csp-gen

csp-gen

Generate Content Security Policy headers from your codebase

Independent GitHub snapshot · Automated classification · Original documentation governs

スキルの説明

GitHub

name: csp-gen description: Generate Content Security Policy headers from your codebase

CSP Generator

Scan your app and generate a proper Content Security Policy. Stop breaking your site with overly strict rules.

Quick Start

npx ai-csp ./src

What It Does

  • Scans for external resources (scripts, styles, images)
  • Identifies inline scripts that need hashes
  • Generates a working CSP header
  • Explains each directive

Usage Examples

# Scan and generate CSP
npx ai-csp ./public ./src

# Generate for specific strictness
npx ai-csp ./src --strict

# Output as meta tag
npx ai-csp ./src --format meta

Output Formats

  • HTTP header format
  • HTML meta tag
  • Next.js config
  • Nginx config snippet

Requirements

Node.js 18+. OPENAI_API_KEY required.

License

MIT. Free forever.


Built by LXGIC Studios

保存したスキル