astro-security

Solid

Use when configuring Content Security Policy (CSP) in Astro 7 — security headers, script/style hashes, nonces, or experimentalStaticHeaders.

Web & Frontend 25 stars 4 forks Updated 6 days ago MIT

Install

View on GitHub

Quality Score: 87/100

Stars 20%
47
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

<objective> Configures Astro 7's stable Content Security Policy support (`security.csp` in `astro.config.mjs`): automatic SHA-256/384/512 hash generation for bundled scripts and styles, the injected `<meta http-equiv="content-security-policy">` tag, manual hash configuration for external scripts/styles, and nonces for dynamic script injection. Also covers `experimentalStaticHeaders` for emitting CSP as adapter-based HTTP headers instead of a meta tag. States the known limitations: CSP is inactive in `dev` mode (test with `build` + `preview`), incompatible with `<ClientRouter />` view transitions, and unsupported for Shiki's inline styles. Does not cover general deployment adapter setup beyond the CSP header wiring (astro-deployment). </objective> # Astro Security ## Agent Workflow (MANDATORY) Before ANY implementation, spawn 3 agents in parallel, one `Agent` call each with a `name`: 1. **fuse-ai-pilot:explore-codebase** - Analyze existing security config, adapters, headers 2. **fuse-ai-pilot:research-expert** - Verify latest Astro 7 CSP docs via Context7/Exa 3. **mcp__context7__query-docs** - Check CSP compatibility with deployment adapter After implementation, run **fuse-ai-pilot:sniper** for validation. --- ## Overview ### When to Use - Enabling CSP in an Astro project (stable in v6.0.0) - Configuring `security.csp` in `astro.config.mjs` - Adding SHA-256/384/512 hashes for external scripts or styles - Using nonces for dynamic script injection - Setting up `experim...

Details

Author
fusengine
Repository
fusengine/agents
Created
8 months ago
Last Updated
6 days ago
Language
CSS
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category