astro-security
Installation
SKILL.md
Astro Security
When to use
This skill is the Astro-specific layer on top of secure-coding. Astro mixes static-site generation, server-side rendering, and partial hydration in one codebase, which means the attack surface differs per page even within the same project. That mixed-mode reality is the single most underappreciated source of Astro security mistakes.
Triggers on:
- A question like "review our Astro app for security issues", "is this page SSG or SSR", "set:html on user input", "Astro API route auth", "Decap CMS hardening", "OAuth backend for Decap", "Astro middleware bypass".
- Presence of
astro.config.mjs/.ts,src/pages/,src/middleware.ts,src/content/directories,@astrojs/*adapters, ordecap-cms/netlify-cmsadmin-UI files. - A PR touching
set:html,Astro.locals, middleware, content-collection schemas, MDX components, or adapter config. - Astro version bumps, especially around security advisories (check the
astroGitHub security tab). - A handoff from
security-revieworapi-securitywhen Astro is in the stack.