More screenshots
Works with the AI Agents you already use
Astro Safety Check
A ?q= value passed to set:html lets anyone send a link that runs scripts on your domain.
$5
Astro Safety Check
Example session with this skill installed
Check this project with astro-safety-check.
- Read your context and instructions
- Compiled the astro safety check
$ python3 scripts/check_astro.py examples/risky
BLOCK .env.production:4 A01 SECRET_IN_PUBLIC_ENV
PUBLIC_STRIPE_SECRET_KEY=<redacted>
Why: A variable whose name says it holds a secret (secret, password, private key, service role, admin key, a database URL, an API token, an OpenAI or other server API key) is public: a PUBLIC_ variable with a real value in a .env file, import.meta.env.PUBLIC_... in code, or an astro:env field with context "client"; or a PUBLIC_ value is in a known key format (sk_live_..., ghp_...). Astro puts these values into the JavaScript sent to every visitor.
Safer: Rename it without PUBLIC_ (or make the astro:env field context "server", access "secret"), read it only in server code (getSecret or astro:env/server), and rotate the exposed secret.
BLOCK astro.config.mjs:25 A01 SECRET_IN_PUBLIC_ENV
BLOCK astro.config.mjs:33 A02 SECRET_IN_VITE_DEFINE
BLOCK src/pages/api/account.ts:10 A05 CORS_REFLECTS_ANY_ORIGIN
BLOCK src/pages/search.astro:11 A04 SET_HTML_FROM_REQUEST
BLOCK src/pages/search.astro:15 A03 SECRET_RENDERED_TO_BROWSER
REVIEW astro.config.mjs:16 A11 CHECK_ORIGIN_OFF
REVIEW astro.config.mjs:17 A12 ANY_FORWARDED_HOST_ALLOWED
REVIEW astro.config.mjs:20 A13 REMOTE_IMAGES_FROM_ANY_HOST
REVIEW astro.config.mjs:26 A17 SECRET_IN_SERVER_BUNDLE
REVIEW astro.config.mjs:27 A17 SECRET_IN_SERVER_BUNDLE
REVIEW astro.config.mjs:31 A15 SOURCE_MAPS_PUBLISHED
REVIEW src/pages/api/products.json.ts:11 A18 CORS_WILDCARD_WITH_CREDENTIALS
REVIEW src/pages/login.astro:13 A16 SESSION_COOKIE_WITHOUT_FLAGS
REVIEW src/pages/login.astro:14 A14 OPEN_REDIRECT
(Each finding also has Why and Safer lines, as in the first one.)
Verdict: BLOCK. Checked 6 files, 6 with Astro content.
This is a static check of file text. NOT FLAGGED is not a guarantee.
Connects securely to your tools. The creator never sees your data.
About this skill
A PUBLIC_STRIPE_SECRET_KEY in .env.production, or import.meta.env.OPENAI_API_KEY passed as a prop to a client:load island, ends up in the JavaScript and HTML that every visitor downloads. A ?q= value passed to set:html lets anyone send a link that runs scripts on your domain. This skill finds those and the other Astro mistakes below before you deploy, and tells you how to fix each one.
Your agent runs a scanner on astro.config files, .astro pages and components (frontmatter, template and scripts), endpoints, middleware and actions, .env files, and components that read PUBLIC_ variables. It knows Astro's rules: only PUBLIC_ variables and astro:env client fields reach the browser, client:* props and define:vars values are serialized into the page while server:defer props are encrypted, set:html is not escaped, Astro.params is fixed at build time only on prerendered pages, and checkOrigin is on by default. It treats publishable, anon and browser map keys, feature switches and flags made from a secret (!!key) as fine, reads .env files only in folders that hold Astro files, does not warn about remote images on static builds, and never builds or runs your project. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK
- A01: a secret-named variable made public: PUBLIC_ variables in .env files and code, astro:env fields with context "client", and PUBLIC_ values in known key formats
- A02: vite.define given the whole environment, a secret-named variable or a literal key
- A03: server secrets (or objects holding them) passed to client:* islands, define:vars, HTML attributes or page text
- A04: set:html with query string, form, header or on-demand route data, also through a Markdown renderer
- A05: CORS that copies the request Origin into Access-Control-Allow-Origin with credentials and no allow list
REVIEW
- A11: security.checkOrigin turned off
- A12: security.allowedDomains that trusts any forwarded host
- A13: image.remotePatterns that allow any host on a site rendered on demand
- A14: redirects to a ?next= or form value that is not checked first
- A15: source maps published with the build
- A16: session or token cookies set without httpOnly and secure
- A17: astro:env secrets marked public on the server, or given a literal default
- A18: CORS "*" together with credentials
What's included
- The scanner (Python 3.9+, standard library only)
- A rules guide with the reason, safer approach and official source for each rule
- A risky and a safe example shop (config, .env, pages and API routes), and the real report the scanner produces on the risky one
Limits It reads each file on its own and follows values only through simple assignments in the same file, so data passed through imported helpers or parent components is not followed. Hosting headers, CDN rules and whether an endpoint or action checks who the user is are not known, Markdown and MDX content is not read, and JSX, TSX, Vue and Svelte components are checked only for PUBLIC_ secrets. NOT FLAGGED is not a guarantee.
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Security.
Static check of config and code text. Values are followed only within one file, hosting headers and CDN rules are not known, Markdown and MDX are not read, and framework components are checked only for PUBLIC_ secrets. NOT FLAGGED is not a guarantee.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 4 days ago
Permissions
Runs one local Python script in the terminal. It reads your project's files, writes nothing, and makes no network calls. The example project includes clearly fake, inert keys (not-a-real-... EXAMPLE) for the scanner to find. Nothing in it is run.