TL;DR: A scan of 1,225,736 public DotNetFiddle snippets found 140 verified live secrets, plus a context-aware HMAC signing key that could authenticate as any user in Zendesk SSO, according to Truffle Security. The finding shows why format-based secret detection and post-publication cleanup both leave dangerous gaps in secrets governance.
At a glance
What this is: Truffle Security's scan of public DotNetFiddle snippets found live secrets, including a context-only HMAC signing key that verification missed.
Why it matters: This matters because leaked secrets in developer-sharing environments create direct IAM and NHI exposure, where standing credentials can outlive the code they were pasted into.
By the numbers:
- My own .NET-tuned regex pass produced 9,702 raw hits.
- 24 live Azure credentials included storage account keys, AD service-principal secrets, Cosmos DB keys, and a SAS token.
👉 Read Truffle Security's scan of public DotNetFiddle snippets for live secrets
Context
Public code-sharing environments become secret exposure risks when they allow developers to save credentials, tokens, and signing keys into content that remains searchable long after the original task is finished. In this DotNetFiddle case, the primary issue is not just leaked code, but the governance gap between ephemeral development intent and persistent public accessibility, which is directly relevant to secrets management, IAM, and non-human identity control.
The article shows two distinct failure modes. Verified secret scanners can find format-recognisable credentials, but they can miss high-impact secrets such as symmetric signing keys that only become visible when the surrounding code is read as a whole. That boundary matters for NHI governance because API keys, service-principal secrets, and JWT signing material are all machine-consumed identities or authenticators, not just developer convenience artefacts.
Key questions
Q: What breaks when secrets are pasted into public cloud development environments?
A: What breaks is the assumption that public sandboxes are harmless sharing spaces. A live credential can remain active long after the project is forgotten, and there is often no native scanning, push protection, or automatic revocation to catch it. The result is a standing access path that can be reused until someone finds and invalidates the secret.
Q: Why do secrets scanners miss some high-risk credentials?
A: Scanners often miss secrets that have no fixed format or no provider verification endpoint. Symmetric signing keys, for example, only become obvious when you inspect the surrounding code for the algorithm and signing call. That is why semantic analysis must complement pattern matching and live verification.
Q: How can security teams tell whether secret management is actually working?
A: Look for fewer plaintext secrets, narrower reuse, faster rotation, and a shrinking set of credentials that remain valid across multiple systems. If the same password or API key can still unlock several services, secret management is not yet reducing blast radius in practice.
Q: Who is accountable when leaked secrets remain active after discovery?
A: Accountability sits with the team that owns secret lifecycle governance, not just the team that found the leak. If tokens, API keys, or certificates remain valid after exposure, the organisation has failed at revocation and ownership. That failure belongs in PAM, IAM, and cloud operations governance, not only in incident response.
Technical breakdown
Why format-based secret scanning misses some high-impact credentials
Most secret scanners rely on recognisable prefixes, provider-specific patterns, or reachable verification endpoints. That works for many API keys and tokens, but it breaks down when the secret is simply a high-entropy string with no external validation path. Symmetric signing keys for HMAC-based JWTs are a good example. The application validates them locally, so there is no provider to query. The result is a blind spot where the scanner can see a string but not understand whether it is a credential, a decoy, or an active authenticator.
Practical implication: supplement pattern matching with context-aware detection for signing flows, token usage, and local verification logic.
How public developer snippets turn non-human identities into exposure points
A saved snippet can contain more than a secret. It can expose tenant names, scopes, service endpoints, and the authentication model itself. In the article, that meant Azure credentials, Microsoft enterprise services, and a Zendesk SSO signing key were visible in public code. This is an NHI governance issue because the exposed material often controls machine-to-machine or user-impersonation pathways, not just a single login. Once that material is public, the exposure window extends until discovery, takedown, and rotation all happen.
Practical implication: treat public code repositories and playgrounds as secret-bearing environments and enforce save-time prevention where possible.
Why verification alone is not enough for secrets governance
Verification confirms whether a known-format secret is live, but it does not tell you whether every risky credential in a file is detectable by that method. The article’s context-aware pass found a signing key that the verified set missed, which shows that detection quality depends on both syntax and surrounding semantics. For IAM and NHI teams, that means control coverage must extend beyond inventorying obvious secrets to understanding how secrets are used, where they are embedded, and whether they can authenticate as privileged identities.
Practical implication: build layered detection that combines provider verification, semantic analysis, and repository controls.
Threat narrative
Attacker objective: The attacker objective is to reuse exposed developer credentials or signing material to impersonate users, access cloud services, or move into enterprise systems without initial intrusion.
- Entry occurs when a developer pastes a live credential or signing key into a public DotNetFiddle snippet.
- Credential exposure persists because the snippet remains publicly accessible even after the developer moves on or deletes local context.
- Impact follows when the exposed secret is used to authenticate, sign tokens, or access cloud and SaaS services as a trusted identity.
Breaches seen in the wild
- GitHub Dependabot Breach — GitHub Dependabot tokens stolen and abused to push malicious commits to repositories.
- Shai Hulud npm malware campaign — Shai Hulud campaign: npm malware exposed secrets on GitHub.
Read our 52 NHI Breaches Analysis report for a comprehensive view of breaches impacting Non-Human Identities including AI Agents.
NHI Mgmt Group analysis
Public snippet exposure is a secrets governance problem, not a developer hygiene issue. The article shows that credentials and signing keys can survive in public code long enough to be discovered by scanners, even when the original task was temporary. That shifts the control question from user behaviour alone to save-time prevention, lifecycle control, and detection across public-sharing surfaces. For identity programmes, the key conclusion is that exposed machine credentials behave like unmanaged NHI assets the moment they leave the intended boundary.
Context-aware secret discovery is now a baseline requirement for modern NHI defence. Verification-based tools still matter, but they do not cover secrets that have no fixed format or external validation endpoint. The finding around the Zendesk SSO signing key shows that the real risk is often semantic, not syntactic. A named concept here is semantic secret blind spots: credentials that can only be identified by understanding how code uses them. Practitioners should treat that as a control gap, not a tooling quirk.
Developer playgrounds expose the same control failures seen in broader NHI sprawl. When a platform allows public persistence of live secrets, the organisation has effectively lost inventory, ownership, and revocation timing at the point of entry. That mirrors the broader problem of standing credentials in cloud and SaaS environments. The NHI control lesson is clear: if the platform cannot prevent publication, then rotation and detection must be fast enough to shrink the exposure window materially.
Secrets management must now align with code-sharing and collaboration pathways. Security teams have historically centralised vaults while leaving ad hoc developer workflows outside policy scope. This article shows why that boundary no longer holds. Public snippets, paste sites, playgrounds, and collaborative sandboxes are part of the identity surface, because they can publish credentials that authenticate as services, tenants, or users. The practitioner conclusion is to govern those pathways with the same seriousness as production secrets stores.
The distinction between verified secrets and live secrets is not sufficient for governance. A scanner can be correct and still miss the most dangerous material if it cannot interpret token context. That makes runtime use, surrounding algorithms, and adjacent calls part of the security signal. For IAM and NHI teams, the governance target is not just discovery volume but confidence that the full credential lifecycle, including detection, revocation, and rotation, is actually covered.
From our research:
- The average estimated time to remediate a leaked secret is 27 days, despite 75% of organisations expressing strong confidence in their secrets management capabilities, according to The State of Secrets in AppSec.
- From our research: Organisations maintain an average of 6 distinct secrets manager instances, creating fragmentation that undermines centralised control, according to The State of Secrets in AppSec.
- Forward look: Review 52 NHI Breaches Analysis for recurring identity failure patterns, then compare those breach lessons with public-code secret exposure controls.
What this signals
Semantic secret blind spots: this article shows that detection quality will increasingly depend on understanding how secrets are used, not just how they look. For practitioners, the operational signal is that format-only tools are now a partial control at best, especially where HMAC signing, OAuth pairs, and service-principal material are embedded in developer workflows.
The exposure window matters more than the original mistake. If public snippets can retain live credentials long enough to be scanned, then incident response must assume discovery by outsiders, not internal cleanup alone. That makes rotation speed, inventory accuracy, and public-surface prevention the controls that shape programme resilience.
For teams building identity governance around machine credentials, the next step is to align repository controls, secret scanning, and revocation workflows with the NHI lifecycle, not treat them as separate problems. The wider lesson is consistent with 52 NHI Breaches Analysis: unmanaged machine identity exposure usually starts long before the breach becomes visible.
For practitioners
- Implement save-time secret prevention for public code surfaces Block or warn when developers paste credentials, tokens, or signing keys into playgrounds, gists, and shared snippets before publication. Treat public developer tools as governed collaboration surfaces, not benign sandboxes.
- Add semantic detection for signing keys and token flows Extend scanning beyond format-based regex and provider verification so it inspects surrounding code for HMAC algorithms, signing calls, and token construction. This is how you catch context-only material such as JWT signing keys.
- Accelerate rotation for any secret exposed in public code Create a response path that assumes exposure first and verification second, then rotates the secret immediately and checks for downstream use across Azure, Microsoft 365, SaaS, and internal services.
- Classify public playground credentials as NHI incidents Route exposed service-principal secrets, SAS tokens, SSO signing material, and API keys into the same incident workflow you use for compromised non-human identities so ownership and revocation do not stall.
Key takeaways
- Public developer snippets can expose live credentials and signing keys long after the original task is finished, turning collaboration tools into identity risk surfaces.
- Verification-based secret scanning is necessary but incomplete because context-only secrets can remain invisible unless surrounding code is analysed.
- The control gap is not just detection, but fast rotation, save-time prevention, and lifecycle ownership for exposed non-human identities.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST CSF 2.0, NIST SP 800-53 Rev 5 and CIS Controls v8 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-03 | Secret exposure and rotation failure are central to the article's NHI risk. |
| MITRE ATT&CK | TA0006 , Credential Access; TA0010 , Exfiltration | The article focuses on exposed credentials that enable reuse and data access. |
| NIST CSF 2.0 | PR.AC-1 | Identity and credential management controls are directly implicated by public secret exposure. |
| NIST SP 800-53 Rev 5 | IA-5 | Authenticator management directly covers rotation and lifecycle of leaked secrets. |
| CIS Controls v8 | CIS-5 , Account Management | Account and secret lifecycle controls are needed when public snippets expose live access material. |
Tie exposed secrets to account management workflows so ownership, revocation, and offboarding are enforced.
Key terms
- Context-aware secret detection: Context-aware secret detection is a scanning approach that looks at how code uses a value, not just what the value looks like. It helps identify high-risk material such as signing keys, OAuth pairs, and embedded credentials that pattern matching alone can miss.
- Hmac Secret: A shared cryptographic key used to generate and verify a message authentication code. In practice, it is a sensitive non-human credential that must be stored, rotated, and revoked carefully because anyone who holds it can create valid signatures.
- Public code exposure: Public code exposure is the accidental publication of sensitive material in a snippet, repository, paste, or playground that remains accessible to others. In practice, it converts a private operational secret into a discoverable identity asset that must be treated as compromised.
- Non-Human Identity (NHI): A digital identity assigned to a non-human entity such as a software application, service account, API key, bot, machine, or AI agent that enables it to authenticate and interact with systems without direct human involvement. NHIs now outnumber human identities in most enterprises by 25 to 50 times.
What's in the full report
Truffle Security's full article covers the operational detail this post intentionally leaves for the source:
- The scanning method used to collect 1.2 million public DotNetFiddle snippets and separate retriable from deleted entries.
- The context-aware detection logic that identified a live HMAC signing key beyond the verified-secret results.
- The full inventory of credential types found, including Azure, Office 365, SharePoint, Mailgun, SendGrid, and SQL Server access.
- The comparison between regex-only matching and TruffleHog verification across the same corpus.
Deepen your knowledge
The NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, secrets management, and workload identity in practical terms. It is designed for practitioners who need to connect identity controls to real operational workflows across cloud and developer environments.
Published by the NHIMG editorial team on August 1, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org