AI Tools & Scripts
Vite Config Check
Check Vite projects before you build or share a dev server: secrets in VITE_ variables, a risky envPrefix, define copying process.env into the bundle, file guards turned off, servers on all interfaces, source maps and open CORS.
What you get: 1 file · 30.74 KB · ZIP
See purchase optionsProduct description
One VITE_OPENAI_API_KEY in .env, or one define: { 'process.env': env } after loadEnv(mode, process.cwd(), ''), puts your secret keys into JavaScript that every visitor downloads. This skill finds those and seven other Vite mistakes before you build or deploy, and tells you how to fix each one.
Your agent runs a scanner on your vite.config files, your .env files (including .env.example) and the vite scripts in package.json. It reads the envPrefix of each config and applies it to that project's .env files, so a prefix such as APP_ or TAURI_ is checked against the variables it really exposes. It skips comments, tells a setting apart from a string that only mentions it, and leaves public keys alone (VITE_FIREBASE_API_KEY, VITE_SUPABASE_ANON_KEY, publishable Stripe keys). The default npm create vite project passes clean. It never runs Vite or your app. It returns BLOCK, REVIEW, or NOT FLAGGED, with the file, line, reason, and a safer approach. Secrets are never printed.
What it checks
BLOCK (fix before shipping)
V01: secrets in variables Vite exposes to the browser (secret names, AI API keys, Stripe secret or Supabase service_role keys, copies such as VITE_DB="${DB_PASSWORD}")
V02: an envPrefix that is empty, very short or matches server and CI secrets (APP_, TAURI_, GITHUB_, AWS_)
V03: define that injects process.env, a loadEnv(mode, root, '') result, or a secret variable or value
V04: server.fs.strict: false, or server.fs.allow with the filesystem root or home folder
REVIEW (check before release)
V11: dev or preview server on all interfaces (host: true, 0.0.0.0, a LAN address, vite --host)
V12: production source maps in app builds (build.sourcemap or rollupOptions.output.sourcemap true or 'inline')
V13: CORS open to any site (cors: true, origin '*' or /.*/, Access-Control-Allow-Origin: *)
V14: allowedHosts: true or legacy.skipWebSocketTokenCheck: true
V15: a server.fs.deny list that replaces the defaults without .env entries
What's included
The scanner (Python 3.9+, standard library only)
A rules guide with the reason and safer approach for each rule
A risky and a safe example Vite project (vite.config.ts, .env.example, package.json), and the real report the scanner produces on the risky one
Limits
It reads each file as written: options built by functions or imported from other files, and command-line flags other than --host, are not followed. Client source code is not read, and the installed Vite version is not checked. NOT FLAGGED is not a guarantee.
Contents
One ZIP file with 13 files: SKILL.md, the scanner in scripts/ (4 Python files), references/rules.md (every rule with its reason and safer approach), and examples/ (6 example files plus report.md, the real scanner output on the risky example).
How to use: This is an agent skill: a folder with a SKILL.md file and Python scripts that an AI coding agent such as Claude Code, Cursor, or Codex CLI can run. Unzip it into your agent's skills folder (for Claude Code: ~/.claude/skills/), then ask your agent to check your project. The scripts also run on their own with Python 3.9 or newer, with nothing to install. They read your files only: no network access, and nothing is sent anywhere.
What you get
1 file · 30.74 KB
- vite-config-check-1.0.0.zipZIP · 30.74 KB
AI Tools & Scripts
Vite Config Check
Check Vite projects before you build or share a dev server: secrets in VITE_ variables, a risky envPrefix, define copying process.env into the bundle, file guards turned off, servers on all interfaces, source maps and open CORS.
Included in Getly ProGet Pro
Tags
Frequently asked questions
Do I get access instantly?
Yes. This is a digital product - you can download it right after checkout, straight from your library.
Can I use it for commercial projects?
Yes. Commercial use is allowed: use it in your own business and in things you sell. You may not resell or redistribute the file itself.
What's your refund policy?
You can request a refund within 30 days. If something isn't right, request it from your order and the Getly team reviews it.
What file formats and sizes will I get?
You'll download 1 file - ZIP - 30.74 KB in total.
Do I get free updates?
Yes - when the seller ships a new version, you can re-download the latest files from your library at no extra cost. Check the changelog for recent updates.
Price
$5.00



