Keys and incidents
Bots posing as AI crawlers are asking for your .env file
Scanners are requesting /.env, /.git/config and /.aws/credentials from websites while calling themselves ClaudeBot, GPTBot or Googlebot. The name proves nothing. What matters is whether your site answers, and an app built with AI tools can answer without its founder knowing. Check your own site with the command below, then make sure nothing in your code lets a bot skip a control because of its name.
TL;DR
- GreyNoise reported on 28 August 2026 that one scanner fingerprint, using six AI crawler names, requested credential files from 824 addresses on 795 networks (28 July to 23 August). None of the addresses were on the crawlers’ published lists.
- Paths requested include
/.env,/.env.production,/.env.bak,/api/.env,/.git/configand/.aws/credentials. - AI-built apps serve these files when the repo root is published, a
.envsits inpublic/, or a Vite dev server is left open to the internet. - A 200 response isn’t proof: single-page apps answer every path with the home page. Look at what came back.
- Never let a user agent grant access. Check the address against the crawler owner’s published list.
This guide is for founders whose app is live on its own domain, built with Lovable, Bolt, Replit, Cursor, Claude Code or similar. The facts about the scanning come from GreyNoise’s report (28 August 2026). GreyNoise saw requests only. It says nothing shows a file was returned or that any organisation was affected, and it doesn’t say who is behind the scanning.
What GreyNoise saw
| Question | GreyNoise’s answer |
|---|---|
| Names used | 13 AI crawler names from eight companies. Six of them, belonging to Anthropic, OpenAI, Google and Perplexity, arrived on one HTTP client fingerprint in matched volume. |
| How many | 824 addresses across 795 separate /24 networks, so blocking by network doesn’t work. Requests for credential paths on that fingerprint ran into the millions. |
| When | 28 July to 23 August 2026, mostly in August. The biggest day was 23 August. |
| What they asked for | /.env, /.env.local, /.env.production, /.env.old, /.env.bak, /.env.swp, /app/.env, /api/.env, /backend/.env, /.aws/credentials, /.git/config, plus private keys and password stores. |
| How they knew it was fake | None of the 824 addresses were on the lists Anthropic, OpenAI, Google, Perplexity and Amazon publish. The fake crawlers never asked for /robots.txt. The real ClaudeBot asked for it more than any other path and never asked for a credential file. |
How an AI-built app ends up serving its .env
A well-built app never has a .env file in the folder the web server hands out. It usually gets there in one of four ways:
- The whole repo is published. The host’s publish directory is set to the project root (
.) instead of the build output (dist,build,out), or the repo was cloned straight into a server’s web root. Every file is then a URL, including.envand the.gitfolder, which holds the full history. - A .env file in public/. Vite and Next.js copy everything in
public/into the site unchanged. A.envplaced there to “make the variables load” is public the moment you deploy. - The dev server is the live site.
viteornpm run devstarted on a server with--host, instead of building and servingdist/. The dev server is not made to face the internet: Vite versions before 6.2.3, 6.1.2, 6.0.12, 5.4.15 and 4.5.10 let anyone read files outside the allowed list (CVE-2025-30208), and GreyNoise lists the upgrade in its advice. - The secret is already in the bundle. A key in a
VITE_orNEXT_PUBLIC_variable is copied into the JavaScript every visitor downloads. No one needs/.envto get it (finding PL-010).
Check your own site
Run this against a site you own. It asks for the same paths the scanners did and prints the status, the content type and the start of what came back, with anything after an = hidden so a real key doesn’t land in your terminal history.
site=https://yourapp.com
for p in /.env /.env.local /.env.production /.env.bak /app/.env /api/.env /backend/.env /.git/config /.aws/credentials; do
printf '%-20s ' "$p"
curl -s -m 10 -o /tmp/pl-body -w '%{http_code} %{content_type} ' "$site$p"
head -c 300 /tmp/pl-body | sed 's/=.*/=…/' | tr '\n' ' ' | cut -c1-70; echo
done
rm -f /tmp/pl-body| What you see | What it means |
|---|---|
404 or 403 | Not served. Good. |
200 text/html and <!doctype html> | Your host sends the home page for every unknown path, which single-page apps do. Not a leak, but it means a 200 alone tells you nothing. |
200 and lines like OPENAI_API_KEY=… | Your environment file is public. Go to if a file came back now. |
200 and [core] or [remote "origin"] | Your .git folder is public. Anyone can download the full history, including keys you deleted long ago (finding PL-011). |
200 and [default] with aws_access_key_id | Cloud credentials are public. Treat the AWS account as compromised. |
If a file came back
- Rotate first, then fix. Assume every key in the file was copied. Issue new keys and revoke the old ones, AI provider and payment keys first (where to rotate each kind of key). Removing the file doesn’t un-copy it.
- Stop serving it. Point the host’s publish directory at the build output, delete any
.envfrompublic/, and servevite buildoutput instead of the dev server. If you run your own nginx, refuse every dotfile except.well-known:
location ~ /\.(?!well-known/) {
return 404;
}- Look for use you didn’t make. Check each provider’s usage page and your server logs for requests to these paths that got a 200, and keep a dated note of what you found and what you rotated (the first hour after a leak).
Never let a bot’s name unlock anything
A user agent is a line of text the caller writes. Apps built for AI search sometimes let anything calling itself GPTBot, ClaudeBot or Googlebot skip a login wall, a paywall, a rate limit or bot protection, so the crawler can read the page. Anyone can send that name. Search your code for it:
grep -rniE "gptbot|claudebot|claude-user|perplexitybot|googlebot|google-extended|bingbot" --exclude-dir=node_modules --exclude-dir=.git .If a match changes what the request is allowed to do, either serve the same public page to everyone, or check the connecting address against the list the crawler’s owner publishes (Google explains how; OpenAI and Anthropic publish their crawler addresses too). GreyNoise found requests named ClaudeBot coming both from Anthropic’s published ranges and from impostors, so the name alone can’t tell them apart.
Sources
- GreyNoise: threat actors posing as AI crawlers (28 Aug 2026)
- Vite: server.fs.deny bypassed when using ?raw?? (CVE-2025-30208) (24 Mar 2025)
- Google Search Central: verifying Googlebot and other Google crawlers
Related findings
The checks behind this guide, each with example code, a self-check and the fix.
AI, payment or database key in the code
PL-010Service role key in client code
PL-011Key still in git history
Free check
Are any of these keys also in your code?
Paste code, a .env or your built JavaScript bundle into the free key check. It runs in your browser: no request is sent and nothing is stored. It flags secret keys (AI providers, Stripe, AWS, GitHub, database URLs), tells a Supabase anon key from a service role key, and links to where to rotate each one.
Written by Manraj Singh Dhillon. Last checked 12 Nov 2026. Code samples are synthetic and run against your own project; nothing here names a real app. Spotted a mistake? Tell us.