# We pointed our own security scanner at our own app and got wrecked

> Source: <https://argus-cyberwatch.space/hn>
> Published: 2026-11-24 14:19:57+00:00

**Key takeaway:** Client-side secrets are shipped to every visitor regardless of base64, reversal or string splitting, so scan the JavaScript the browser downloads — the team's own app leaked a Math.random() session-token fallback in tracker.js:3 that a rendered-page review would never show.

We run a few small products. To keep an eye on them we built a set of blunt, read-only checks — the kind of thing you point at your own box. Then we aimed the whole set at one of our live apps, `stranger-chat.online`, expecting a clean bill. It was not clean.

Read-only, from the outside, in the time it takes to make coffee:

`Math.random()`
tracker.js:3 — sid = crypto.randomUUID ? crypto.randomUUID() : Math.random().toString(36).slice(2)+Date.now()...
→ the fallback path ships. Math.random() is not a CSPRNG — sessions become guessable.
None of this was exotic. It was the boring layer — the layer you stop looking at once the thing works. Which is exactly the layer an AI code generator never looks at either.

If *we* — the people who wrote the scanner — shipped predictable session tokens and a cleartext mail login, what is the app your AI assistant generated last week shipping right now? You can't see it from the rendered page. You can only see it in what the browser *downloads*.

And here's the trap AI codegen falls into constantly: it puts a secret in the frontend, then "hides" it. Base64. A reversed string. Split and re-joined. The model thinks it's hiding; a scanner's regex doesn't match; everyone feels safe. None of it is hiding — the browser ships every byte to every visitor.

This isn't theoretical. Documented, 2025–26: the [Moltbook leak](https://securitybrief.co.uk/story/moltbook-vibe-coded-flaw-exposed-ai-chats-keys) traced to one client-side Supabase key — ~1.5M API tokens and 30k emails out. Lovable's row-level-security gap, [CVE-2025-48757](https://nvd.nist.gov/vuln/detail/CVE-2025-48757), 170+ production apps. A scan of [~5,600 vibe-coded apps](https://dev.to/vibewrench/i-scanned-100-vibe-coded-apps-for-security-i-found-318-vulnerabilities-4dp7) pulling service-role keys straight out of public JS. Average time from a key going public to it being used: under two minutes.

Here's the part nobody tells a vibe-coder: that boring layer already has an invoice attached, and someone else is holding it.

That's the direction the whole market is moving. Carriers increasingly run their own outside-in scans and check them against the controls you *attested* to; when the questionnaire and the scan disagree, the renewal stalls — or worse, the claim does, after the breach, when forensics find the attested control was never actually there. [(Travelers v. ICS)](https://www.insurancejournal.com/news/national/2022/07/12/675516.htm) [(carriers on self-attestation)](https://www.darkreading.com/cyber-risk/cyber-insurers-clamp-down-on-clients-self-attestation-of-security-controls)

Insurers want security. You should want it harder — it's your invoice, not theirs. We are not your underwriter, and a scan is not a policy. But the thing underwriters are moving toward — dated, independent, outside-in evidence that your attestation is actually *true* — is exactly the artifact this spits out: a signed, timestamped read of what your app ships, from the outside, that you can hand over instead of ticking a box and hoping.

Argus reads what the browser reads — your homepage and its linked JS — and reports what's actually exposed, each finding with the exact request to reproduce it. It de-obfuscates the "hidden" keys (decodes, reverses, re-joins), flags `localStorage` tokens, hardcoded passwords, `isAdmin = true`, the `// TODO: move credentials` comment the model left behind — and the boring infra layer that wrecked us above.

Design rule, because every other "vibe-coded app scanner" we tried was a word generator with a nice UI: *it shows the receipt or it shuts up.* If it says your key is exposed, it prints the key (masked) and the line it came from. A clean result says "nothing found at this layer," not "you're secure."
