TL;DR: Secrets hidden in JavaScript bundles, build outputs, and single-page application front ends can escape traditional scanners, with large-scale testing finding hundreds of high-impact tokens and broad exposure across code, ticketing, and collaboration systems, according to Intruder. The governance gap is not discovery alone, but failure to scan runtime-facing artefacts and revoke exposed credentials fast enough.
NHIMG editorial — based on content published by Intruder: analysis of leaked secrets in JavaScript bundles and front-end delivery paths
By the numbers:
- The research identified a total of 688 code repository tokens, many of which were still active.
- Intruder says 213 Slack tokens were among the secrets exposed in the scan.
Questions worth separating out
Q: How should security teams handle secrets embedded in JavaScript bundles?
A: Teams should treat bundled secrets as production credentials, not harmless code residue.
Q: Why do secrets in front-end code create an IAM and NHI risk?
A: Because the leaked value is usually a usable credential, not just sensitive text.
Q: What do security teams get wrong about shift-left for secrets?
A: They often assume early detection equals governance.
Practitioner guidance
- Scan front-end delivery artefacts, not just repositories Add JavaScript bundle inspection and crawler-based checks to your secrets programme so production-delivered assets are covered alongside source code and tickets.
- Treat exposed tokens as credential incidents Route every confirmed leak into the same response path used for NHI or service-account compromise, including immediate revocation, scope review, and downstream access validation.
- Review build injection paths for secret propagation Audit custom build scripts, environment-variable handling, and front-end packaging so sensitive values cannot be injected into production artefacts by mistake.
What's in the full report
Intruder's full analysis covers the operational detail this post intentionally leaves for the source:
- The JavaScript protocol spidering method used to enumerate bundle assets at scale
- Regex tuning and false-positive reduction techniques for minified front-end code
- Examples of the exact secret types discovered across repositories, ticketing, Slack, and SaaS tools
- Build-process failure modes that caused secrets to be injected into production artefacts
👉 Read Intruder's analysis of JavaScript bundle secrets exposure and scanner blind spots →
JavaScript bundle secrets exposure - are your controls keeping up?
Explore further
JavaScript bundle secret exposure is a runtime governance failure, not a scanning nuisance. Once credentials are injected into compiled front-end assets, the control problem moves from source code hygiene to delivery-path governance. Traditional shift-left methods still matter, but they do not cover what users actually download. Practitioners should treat runtime-delivered artefacts as part of the governed credential surface.
A question worth separating out:
Q: How do organisations respond when a front-end secret is exposed?
A: They should treat it as a credential compromise, revoke the token, confirm where it was used, and check for downstream access enabled by that identity. If the secret was tied to shared services or broad repository access, scope reduction and follow-up review are necessary before the token can safely be reissued.
👉 Read our full editorial: JavaScript bundle secrets exposure is bypassing shift-left tooling