Security report
https://vulndemo.example/
Scanned Apr 12, 2026, 8:32 PM UTC · vulndemo.example
Built from a scan of demo-vulnerable-app (demo-vulnerable-app/index.html at c3e7ee7). The page ships fake pattern-shaped keys on purpose. Anything that still looked like a key is masked. This sample includes every finding and its fix prompt.
0/100 · BLOCK
19 findings
Matched secret pattern: openai_project_key
const AI_KEY = " [redacted] ";
How to fix
Fix: Potential openai_project_key detected in client code. Evidence: const AI_KEY = " [redacted] ";.
Matched secret pattern: resend_api_key
const MAIL_KEY = " [redacted] ";
How to fix
Fix: Potential resend_api_key detected in client code. Evidence: const MAIL_KEY = " [redacted] ";.
Matched secret pattern: groq_api_key
const LLM_KEY = " [redacted] ";
How to fix
Fix: Potential groq_api_key detected in client code. Evidence: const LLM_KEY = " [redacted] ";.
costexposure
CWE-798Attackers use the key to run paid model calls on your account. Token-miners scrape leaked keys within hours of exposure.
...<script>
const AI_KEY = " [redacted] ";
</script>
<!-- VULN 4:...Cost exposure: Uncapped API spend
How to fix
Fix: OpenAI key exposed — Uncapped API spend. Evidence: ...<script> const AI_KEY = " [redacted] "; </script> <!-- VULN 4:....
Matched secret pattern: stripe_test_secret_key
const BILLING_SK = " [redacted] ";
How to fix
Fix: Potential stripe_test_secret_key detected in client code. Evidence: const BILLING_SK = " [redacted] ";.
costexposure
CWE-798Attackers send email from your domain — reputation damage + per-email charges.
...script>
const MAIL_KEY = " [redacted] ";
</script>
<!-- VULN 8:...Cost exposure: Email abuse + reputation damage
How to fix
Fix: Resend key exposed — Email abuse + reputation damage. Evidence: ...script> const MAIL_KEY = " [redacted] "; </script> <!-- VULN 8:....
Matched secret pattern: generic_api_key_upstream
authDomain: " [redacted] ",
How to fix
Fix: Potential generic_api_key_upstream detected in client code. Evidence: authDomain: " [redacted] ",.
compliance
CWE-693Impact: GDPR Article 13 requires a clear, accessible privacy policy explaining what data is collected and how it is processed. No privacy policy link was found on the page.
Searched page HTML for links containing 'privacy', 'privacy-policy', 'data protection' — none found.
How to fix
Fix: No privacy policy link found. Evidence: Searched page HTML for links containing 'privacy', 'privacy-policy', 'data protection' — none found.. Impact: GDPR Article 13 requires a clear, accessible privacy policy explaining what data is collected and how it is processed. No privacy policy link was found on the page..
costexposure
CWE-798AIza keys are intended to be public but must be domain-restricted. Check the key's restrictions in Google Cloud Console.
...baseConfig = {
apiKey: " [redacted] ",
authDomain: "testapp-...Cost exposure: Public API key — verify restrictions
How to fix
Fix: Google Maps/API key exposed — Public API key — verify restrictions. Evidence: ...baseConfig = { apiKey: " [redacted] ", authDomain: "testapp-....
auth
Impact: No CSP means the browser allows loading scripts, styles, and resources from any origin. XSS attacks are much easier to exploit.
How to fix
Missing Content-Security-Policy header. Add a CSP that restricts script sources. Minimum: default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; In Next.js, add to next.config headers(). In Express: app.use(helmet.contentSecurityPolicy()). CSP is the strongest defense against XSS attacks.
auth
Impact: Page can be embedded in iframes, enabling clickjacking attacks.
How to fix
Missing X-Frame-Options header. Add to your server config: X-Frame-Options: DENY. In Next.js, add to next.config.js headers(). In Express: app.use(helmet()). This prevents clickjacking attacks by blocking your site from being embedded in iframes.
auth
Impact: Browser may connect over HTTP first, enabling SSL stripping attacks.
How to fix
Missing HSTS header. Add: Strict-Transport-Security: max-age=63072000; includeSubDomains; preload. In Next.js, add to next.config.js headers(). In Express: app.use(helmet.hsts()). This forces browsers to only connect via HTTPS, preventing SSL stripping attacks.
Detected token-like string with high entropy in variable assignment — possible leaked secret
[redacted]. [redacted] ";
How to fix
LOW: High-entropy token detected found in client-side code. 1) Immediately revoke this key in the provider dashboard. 2) Move it to a .env.local file (add .env.local to .gitignore). 3) Create a server-side API route (e.g., /api/provider) that proxies requests using the secret. 4) Update your client code to call your API route instead of using the key directly. Never expose secrets in client-side JavaScript.
Matched secret pattern: google_api_key
apiKey: " [redacted] ",
How to fix
Fix: Potential google_api_key detected in client code. Evidence: apiKey: " [redacted] ",.
auth
Impact: Browser may MIME-sniff responses, which can lead to XSS via content type confusion.
How to fix
Missing X-Content-Type-Options header. Add: X-Content-Type-Options: nosniff. In Next.js, add to next.config.js headers(). In Express: app.use(helmet.noSniff()). This prevents MIME type sniffing attacks.
auth
Impact: Full URL including query params may be sent to external sites via Referer header, potentially leaking tokens or session IDs.
How to fix
Missing Referrer-Policy header. Add: Referrer-Policy: strict-origin-when-cross-origin. In Next.js, add to next.config.js headers(). In Express: app.use(helmet.referrerPolicy()). This prevents leaking full URLs (including tokens in query params) to external sites.
auth
Impact: Browser features like camera, microphone, and geolocation are not explicitly restricted. Add Permissions-Policy to disable unused features.
How to fix
Missing Permissions-Policy header. Add: Permissions-Policy: camera=(), microphone=(), geolocation=(). In Next.js, add to next.config.js headers(). This disables browser APIs you don't use, reducing attack surface if your site is compromised.
auth
Impact: Window references from cross-origin popups are not isolated. Set to 'same-origin' for defense-in-depth.
How to fix
Missing Cross-Origin-Opener-Policy header. Add: Cross-Origin-Opener-Policy: same-origin. This isolates your window from cross-origin popups, preventing Spectre-like side-channel attacks.
auth
Impact: Resources can be loaded cross-origin by default. Set to 'same-origin' or 'cross-origin' explicitly.
How to fix
Missing Cross-Origin-Resource-Policy header. Add: Cross-Origin-Resource-Policy: same-origin. This prevents other sites from embedding your resources (fonts, images, scripts) cross-origin.