Website Vulnerability Scanner: Find Security Issues in AI-Generated Apps
AI-assisted development has made it faster than ever to ship working web apps. Tools like Cursor, Lovable, Bolt, and v0 can produce functional full-stack applications in hours. The problem is that AI code generators optimise for working code — not secure code. They routinely produce apps with exposed API keys, missing input validation, unsanitised outputs, and absent rate limiting. This guide covers the most common vulnerabilities in AI-generated apps and how to scan your site for them with a free browser-based tool.
Run a free security scan on any web app with Jaconir Website Vulnerability Scanner — checks for 16 common security issues including exposed keys, missing security headers, and dependency vulnerabilities. No sign-up required.
Why AI-Generated Code Has More Security Issues
AI code generators are trained on vast amounts of code — including code with vulnerabilities, outdated practices, and security anti-patterns. When generating an app, they tend to:
- Hardcode API keys directly in client-side code (a very common training pattern)
- Skip input sanitisation and rely on the database layer for protection
- Generate permissive CORS configurations to make development easier
- Omit security headers that aren't visible to the end user
- Use older dependency versions present in training data
- Skip rate limiting on authentication endpoints
None of these are AI failures — they're the natural output of a system optimised for "get it working." Security hardening is a separate step that needs deliberate attention.
Most Common Vulnerabilities Found in AI-Built Apps
1. Exposed API Keys in Client-Side Code
The most critical and most common issue. AI generators often place API keys directly in JavaScript files that are served to the browser. Anyone can view these using DevTools → Sources. Exposed keys can lead to:
- Unexpected billing charges (OpenAI, AWS, Stripe keys)
- Data access via exposed database credentials
- Service abuse via exposed third-party API keys
Fix: Move all API keys to server-side environment variables. Client-side code should never contain sk-, pk_live_, AIza, or similar key patterns.
2. Missing Security Headers
HTTP security headers are a first line of defence against common attacks. AI generators almost never add them. The critical ones:
- Content-Security-Policy: Prevents XSS by controlling which scripts can run
- X-Frame-Options: Prevents clickjacking attacks
- X-Content-Type-Options: nosniff — prevents MIME type sniffing attacks
- Strict-Transport-Security: Forces HTTPS connections
- Referrer-Policy: Controls what referrer information is sent
3. Absent Rate Limiting on Auth Endpoints
Login, signup, and password reset endpoints without rate limiting are vulnerable to brute force attacks. AI-generated auth code typically has no rate limiting unless explicitly prompted. An attacker can try thousands of passwords per minute against an unprotected endpoint.
Fix: Add rate limiting middleware. In Next.js: use upstash/ratelimit. In Express: use express-rate-limit.
4. Overly Permissive CORS
AI generators often produce Access-Control-Allow-Origin: * to prevent development errors. In production, this allows any website to make authenticated requests to your API.
Fix: Restrict CORS to your specific domain: Access-Control-Allow-Origin: https://yourdomain.com
5. Missing Input Validation
AI-generated forms frequently skip server-side validation, relying only on client-side checks that can be bypassed. SQL injection, XSS, and command injection all rely on unvalidated input reaching the server.
Fix: Always validate and sanitise input server-side. Client-side validation is UX only — never security.
6. Dependency Vulnerabilities
AI generators use package versions from their training data, which may be months or years old. Outdated packages frequently contain known CVEs (Common Vulnerabilities and Exposures).
Fix: Run npm audit immediately after any AI-generated project scaffold. Update flagged packages before deploying.
How to Use the Free Vulnerability Scanner
- Open Jaconir Website Vulnerability Scanner
- Enter your web app URL
- The scanner checks for 16 common security issues including security headers, exposed patterns, sitemap exposure, and framework fingerprinting
- Review findings sorted by severity (Critical → High → Medium → Low)
- Use the AI fix prompts to generate the exact code needed to resolve each issue in Cursor, Lovable, or Bolt
Security Checklist Before Going Live
- All API keys in environment variables, not client-side code
- Security headers configured (CSP, X-Frame-Options, HSTS)
- Rate limiting on login, signup, and password reset
- CORS restricted to your production domain
- Input validation on every server-side endpoint
npm auditrun and critical vulnerabilities resolved- Database access restricted to application server IPs only
- Error messages that don't expose stack traces or internal paths
FAQ
Is it safe to scan my own app with an external tool?
Yes — the scanner reads publicly available information from your site (HTTP headers, HTML source, robots.txt, sitemap) the same way a search engine crawler would. It does not attempt any intrusive tests or exploits.
Does Vercel or Netlify handle security headers automatically?
Partially. Vercel adds some headers by default but not a full Content-Security-Policy. Always verify with a scanner after deploying — don't assume your hosting provider covers everything.
My app was built with AI — does that mean it's insecure?
Not automatically, but it warrants a security review. AI-generated code can be perfectly secure if the prompt explicitly asks for security best practices and the output is reviewed before deployment. The scanner gives you a fast baseline check.
Conclusion
Shipping fast is valuable. Shipping fast with an exposed API key or no rate limiting on your auth endpoint creates real-world risk. A 5-minute scan before going live catches the most common issues that AI code generators miss by default.
Scan your app now: Jaconir Website Vulnerability Scanner →