# What 6,348 AI-generated websites taught me about security

> Source: <https://dev.to/__943ad161d762b/what-6348-ai-generated-websites-taught-me-about-security-4509>
> Published: 2026-11-22 13:34:35+00:00

**Recommendation:** Add a vercel.json headers() block setting X-Frame-Options, X-Content-Type-Options, Referrer-Policy, HSTS and Permissions-Policy, tighten script-src, and scan for exposed .env files and client-side API keys before shipping.
More in the playbook "Securing agents and AI tools": <https://wpnews.pro/playbooks/agent-security>

Everyone is shipping apps built with AI now. I am too - it's the fastest way I know to go from idea to a live URL. But after building a small security scanner and running it against thousands of real, publicly listed AI-generated websites, I now look at my own deploys very differently.

Here's the data first, then the lessons.

My side project [AppSeal](https://appseal.online) scans a live site with 125 checks: security headers, exposed secrets (.env, .git, AI/cloud/payment API keys), TLS config, cookies, broken links, admin panels, and basic DNS hygiene.

We collected 6,348 unique hosts from public portfolios, launch pages and "built with X" galleries, then scanned each one.

| Grade | Sites | Share | 
|---|---|---|
| A+ | 20 | 0.3% | 
| A | 264 | 4.2% | 
| B | 1,266 | 20% | 
| C | 3,626 | 57% | 
| D | 1,103 | 17% | 
| E | 69 | 1% | 

The most common header gaps across scanned sites:

| Missing / weak | Share of sites | 
|---|---|
| COOP | 83% | 
| Permissions-Policy | 80% | 
| X-Frame-Options | 74% | 
| CSP | 74% | 
| Referrer-Policy | 63% | 
| HSTS | 46% | 

And the genuinely scary one: a number of sites exposed `.env` files or had live API keys for AI/cloud providers sitting in client-side code. We flag those as critical severity, and they are one-line mistakes.

AI builders (v0, Lovable, Bolt and friends) optimize for an amazing first screen. They don't set security headers, and they don't know which of your keys are "demo" and which are real. Neither does the person shipping the project on a Sunday evening - that's not a dig, that's exactly why I built the scanner.

`vercel.json` with a `headers()` block covers X-Frame-Options, X-Content-Type-Options, Referrer-Policy, HSTS and Permissions-Policy in five lines.`script-src` down removes the whole class of injected-scripts problems.
The scanner is free, one domain, no signup: [appseal.online](https://appseal.online). Full aggregated stats live here: [appseal.online/stats](https://appseal.online/stats). It's a solo project, so honest feedback on the report UI is very welcome.
