7

Credentials and secrets

What you will learn

  • What counts as a credential or secret, and who owns each kind
  • Why stolen credentials, especially machine tokens, are the leading way in
  • The incidents that define the risk, from Snowflake to Salesloft Drift
  • How secrets are managed today, where the tools fall short, and which vendors play

In one minute

Valid credentials are the most common way into a company, and the weak half is not human passwords but machine secrets: API keys, tokens, service accounts and certificates. Machine identities outnumber people more than 80 to 1, tens of millions of secrets leak to public code every year, and most stay valid for years. Tools can store secrets and find leaked ones. What they cannot yet tell the security team is who owns a secret, what it can reach, whether it is being abused, and how to revoke it without breaking something.

Plain English

Secret
Any credential a program uses to prove who it is, such as an API key, password or token. Glossary
Non-human identity (NHI)
An identity used by software rather than a person: service accounts, API keys, bots and AI agents. Glossary
OAuth token
A token that lets one app act on your behalf in another without your password; often long-lived. Glossary
PAM
Privileged access management: tools that vault and control the most powerful admin accounts. Glossary
See also
Agent identity at a strategy level is in Chapter 6. The identity pillar and its vendors are in Chapter 3. In the maps, see the identity and secrets areas in Chapter 10 and layer B in Chapter 11.
On the risk map
Risk areas this chapter explains, in the interactive risk watch map: 03 Identity & access · 04 Secrets, keys & cryptography

Valid credentials are now the leading way into enterprises, and the weak half is machine secrets, not human passwords. Machine identities outnumber humans 82 to 1, 28.65M new secrets leaked on public GitHub in 2025, and most leaked secrets stay valid for years. Tools can store and find secrets well. What they cannot yet do is tell the security team who owns a secret, what it can reach, whether it is being abused, and how to kill it safely. The 2025-26 acquisition wave folded most NHI startups into platforms, which helps suite buyers but leaves the cross-silo view largely unsolved.

7.1 What counts as a credential or secret

The credential estate splits into two halves with different owners, tools and failure modes. Most enterprises manage human credentials reasonably well and machine secrets poorly. This chapter builds on Chapter 6, How AI changes security, which covers agent identity at a strategy level; here the focus is the credential material itself.

Human halfowner: IAMMachine halfowner: often nobodyWorkforce loginspasswords, MFA, SSO cookies, passkeysPrivileged accountsdomain admin, root, break-glassStatic secretsAPI keys, database passwords, SSH keysService accountsAD service accounts, cloud rolesTokens and grantsOAuth refresh tokens, app-to-app grantsCertificates and keysTLS, code signing, KMS keysAI agent credentialsLLM keys, MCP tokensManaged reasonably well:one clear owner and maturetools (SSO, MFA, PAM)
Figure 7.1 The credential estate splits into two halves. The human half has a clear owner; the machine half is larger, scattered and often unowned.
TypeExamplesWhere it livesTypical owner in the org
Human workforce credentialsPasswords, MFA factors, SSO session cookies, passkeysIdP (Entra, Okta), browsers, password managersDirector of IAM
Privileged human credentialsDomain admin, root, break-glass, cloud console adminPAM vault, sometimes spreadsheets and shared password managersDirector of IAM / PAM team
Static machine secretsAPI keys, database passwords, connection strings, SSH keysCode, CI/CD variables, config files, .env files, laptops, Slack/JiraPlatform engineering and developers; AppSec scans for them
Service accountsAD service accounts, cloud IAM roles and service principalsDirectories and cloud IAMOften nobody; created by app teams
Tokens and delegated accessOAuth refresh tokens, PATs, SaaS-to-SaaS app grants, session tokensSaaS tenants, third-party integrationsBusiness app owners; SaaS security if it exists
Certificates and keysTLS certs, code-signing keys, mTLS/workload certs, KMS keysPKI, load balancers, Kubernetes, HSM/KMSPKI or infrastructure team
AI agent credentialsLLM API keys, MCP server tokens, agent OAuth grants, keys in agent configsDeveloper laptops, MCP config files, agent platformsUnclear; usually the builder

The ownership column is the core problem. Human credentials have a clear owner (IAM). Machine secrets are spread across developers, platform, cloud, AppSec and SaaS owners, so no one person is accountable for the inventory.

7.2 Risks

Stolen credentials are the most common way attackers get in, and the trend has moved from human passwords to machine tokens that bypass MFA. Credential abuse was the top initial access vector in the 2025 Verizon DBIR at 22%, ahead of vulnerability exploitation (20%) and phishing (15%). Third-party involvement in breaches doubled to 30%, and GitGuardian's summary of the report names reused or leaked secrets as a major driver.

How a leaked secret becomes a breachLeakedin code, CI logs, Slack,Jira, or by aninfostealer on a laptopStill validover 64% of 2022secrets still workedin January 2026Usedattacker logs in as the app;tokens skip MFAData takenoften across manycustomers at once
Figure 7.2 The usual path from a leaked secret to a breach. Long-lived secrets and tokens that skip MFA make the middle steps easy.

The scale of exposure

82 to 1machine identitiesper person (2025)28.65Mnew secrets leaked onpublic GitHub in 202564%of 2022 secrets stillvalid in 202694 daysmedian time to fix asecret leaked on GitHub
Figure 7.3 The scale of the problem in four numbers, from CyberArk, GitGuardian and the Verizon DBIR. The full table follows.
MeasureValueSource
New hardcoded secrets on public GitHub in 202528.65M, up 34% year over yearGitGuardian 2026
AI-service secrets leaked (LLM keys, vector DBs, orchestration)1.28M, up 81%GitGuardian 2026
Secret-leak rate in Claude Code-assisted commits vs all public commits (developers still decide what gets pushed)3.2% vs 1.5%GitGuardian 2026
Secrets found in MCP config files24,008 unique, 2,117 validGitGuardian 2026
Secrets valid in 2022 still valid in Jan 2026Over 64%GitGuardian 2026
Internal repos vs public repos, likelihood of hardcoded secretsAbout 6xGitGuardian 2026
Secret incidents originating outside code (Slack, Jira, Confluence)About 28%GitGuardian 2026
Median time to remediate a secret leaked on GitHub94 daysVerizon DBIR 2025 via GitGuardian
Infostealer victims that were unmanaged (BYOD) devices with corporate logins46%Verizon DBIR 2025 via GitGuardian
Machine identities per human identity82 to 1; 42% have privileged accessCyberArk 2025 Identity Security Landscape
Orgs whose "privileged user" definition covers only humans88%CyberArk 2025

Incidents that define the risk

DateIncidentCredential abusedLesson for the security team
Jun 2026KlueA four-year-old dormant test credential, then customer Salesforce OAuth tokens (195 orgs)Nobody deprovisioned a pilot credential; sign-in monitoring saw nothing
Nov 2025Shai-Hulud 2.0 npm wormDeveloper and CI secrets; 33,185 unique secrets from 6,943 machines, 59% of them CI runnersBuild systems and laptops are secret stores; the worm used stolen tokens to spread
Nov 2025GainsightVendor-held OAuth tokens into 200+ Salesforce instancesThird-party SaaS grants are standing privileged access
Aug 2025Salesloft DriftOAuth and refresh tokens of an AI chat agent; 700+ orgs. Google researchers said the attackers searched the stolen data for AWS keys, passwords and Snowflake tokensAn AI agent integration became the blast radius; secrets pasted into CRM cases became the second stage
Mid 2025Salesforce vishing (UNC6040)Users tricked into authorizing a fake Data Loader connected appSocial engineering now targets consent grants, not passwords, so MFA does not help
Mar 2025tj-actions/changed-filesA stolen PAT let attackers modify an Action used by 23,000+ repos, dumping CI secrets into logsCI/CD secrets are only as safe as every third-party build step
Apr 2024Snowflake customers (UNC5537)Infostealer-harvested passwords, some from 2020, on accounts without MFA; up to 165 orgsUnrotated credentials plus no MFA plus no network restriction

The common thread: the credential was valid, so every control treated the attacker as the legitimate user or app. The risk is less "a secret leaks" than "a leaked secret stays valid, over-privileged and unwatched."

7.3 How they are managed today

Large enterprises run many overlapping control layers, often bought by different teams, and each sees only its own slice. The ten most common are below. Human credentials are relatively mature (SSO, MFA, PAM). Machine secrets are managed through a patchwork of vaults and scanners, and the newest layers (NHI, agent identity, secretless access) are still early. In a 2024 GitGuardian and CyberArk survey, 79% of organizations reported secrets leaks and the average leak took 27 days to remediate.

Control layerWhat it doesUsually run byMaturity
SSO, MFA, passkeys (IdP)Centralizes workforce login; phishing-resistant MFAIAMMature; passkey rollout ongoing
Enterprise password managersStores human and shared team passwordsIT / IAMMature, but often holds shared machine secrets too
PAM (vaulting, session recording, JIT elevation)Vaults and rotates admin credentials, brokers sessionsIAM / PAM teamMature for on-prem and servers; weaker in cloud and DevOps
Secrets managers / vaultsStore machine secrets and issue dynamic, short-lived credentials to appsPlatform engineeringWidely deployed, but many enterprises run several at once (cloud-native, HashiCorp, CyberArk Conjur, Kubernetes secrets)
Secrets scanningFinds hardcoded secrets in code, CI logs, containers, chat, ticketsAppSecMature for Git; patchy for Slack, Jira, laptops and CI runners
Certificate lifecycle management (CLM) and PKIDiscovers, issues and renews certificates and keysPKI / infrastructureUnder pressure: max public TLS lifetime fell to 200 days on 15 Mar 2026, 100 days in 2027, 47 days in 2029 (CA/B Forum schedule)
SaaS security posture (SSPM) and OAuth app governanceInventories third-party app grants and token scopesSaaS security / IAM, if anyonePatchy; 46% lack visibility into OAuth-connected apps (CSA)
NHI managementDiscovers service accounts, keys and tokens across cloud, SaaS and vaults; maps owners and usage; drives rotationIAM or cloud securityEmerging; the category was largely bought up in 2025-26
Workload identity and secretless accessReplaces static keys with federated, short-lived identity (OIDC federation, SPIFFE, cloud IAM roles)Platform / cloudEarly; Gartner's 2026 identity hype cycle says none of the workload access categories are mainstream (via Silverfort)
ITDRDetects misuse of valid credentials in the IdP, AD and cloudSecOps with IAMOver 50% penetration, but detection outpaces containment (via Silverfort)

Rotation is the operational weak point. Vaults can rotate what they own, but most leaked secrets live outside the vault, and rotating a shared key means finding every consumer first. That is why over 64% of secrets valid in 2022 were still valid in 2026.

7.4 Gaps

What tools do well, and the four questions they cannot yet answerDone well todayStore secrets in a vaultRotate some automaticallyScan code for leaksVault admin passwords (PAM)Who owns it?so someone can actWhat can it reach?so you know the blast radiusIs it being abused?so you know it is urgentHow do we kill it safely?without breaking production
Figure 7.4 Where today's tools stop. The four questions in red are what a security team needs to act on a secret.

The unsolved problems are less about storing secrets and more about knowing which ones exist, who owns them, what they can reach, and whether they can be killed safely.

  1. No complete inventory. Secrets live in vaults, code, CI variables, laptops, chat, tickets, SaaS tenants and agent configs. Each tool inventories its own surface, and no system of record joins them. Internal repos are about 6x more likely to hold secrets than public ones, yet get less scanning attention.
  2. No owner. Service accounts, OAuth grants and API keys are created by app teams and outlive the people and projects that made them. Klue's four-year-old test credential is the typical case.
  3. Detection without remediation. Scanners raise thousands of findings, but fixing one means finding the consumer, rotating, redeploying and confirming nothing broke. Median fix time for a GitHub leak is 94 days, and GitGuardian found 46% of critical secrets are missed if you only prioritize by "is it valid".
  4. Blast radius is unknown. A finding says "AWS key found" but rarely what that key can do, which data it reaches, and whether it was used. Without that, triage is guesswork.
  5. Valid-credential abuse looks normal. In the Salesforce campaigns, sign-in monitoring missed everything because activity came through already-authorized apps. Most ITDR is built around human logins, not token and API behavior.
  6. Third-party and SaaS-to-SaaS tokens are ungoverned. Vendors hold long-lived, broad OAuth tokens into your tenants. These are effectively privileged accounts with no PAM, recertification or rotation.
  7. Human privileged access is defined too narrowly. 88% of orgs count only humans as privileged users, while 42% of machine identities have privileged access (CyberArk).
  8. AI agents multiply the problem. Agents get API keys and OAuth grants from whoever builds them, often stored in plaintext MCP configs, with broad scopes and no identity separate from the human. GitGuardian measured Claude Code-assisted commits leaking secrets at about twice the public GitHub baseline (3.2% vs 1.5%).
  9. Unmanaged endpoints and CI runners leak secrets in bulk. Infostealers and worms like Shai-Hulud harvest every token on a machine. 46% of infostealer victims are unmanaged devices with corporate logins.
  10. Certificate volume is about to multiply. At 47-day lifetimes, public TLS certs renew about 8 times a year. Manual or ticket-driven renewal will fail, and outages from expired certs are a reliability risk, not just a security one.
  11. Vault sprawl. Multiple vaults per enterprise means no single policy, audit trail or rotation process, and developers fall back to .env files.

7.5 Vendors and where they fall short

The market consolidated hard in 2025-26: most standalone NHI startups were bought by platform vendors, so buyers now choose between suite add-ons and a shrinking set of independents. Ownership below is as of 12 Nov 2026, from the Security Boulevard identity market map and Accuro's NHI consolidation tracker, checked against the deal announcements linked below.

PAM and privileged access

VendorOwnership / recent dealWhat it doesWhere it falls short of actionable
CyberArkPalo Alto Networks, completed 11 Feb 2026 (about $25B in cash and stock); CyberArk had bought Venafi (Oct 2024) and Zilla Security (Feb 2025)Market-leading PAM; Conjur and Secrets Hub for machine secrets; Venafi CLMHeavy to deploy; strongest on vaulted human admin accounts. Secrets outside its vaults are invisible without extra modules. Palo Alto says it stays available standalone while integration proceeds
DelineaPrivate equity-owned; completed StrongDM acquisition 5 Mar 2026PAM plus StrongDM's just-in-time runtime authorizationTwo products still being merged; NHI and agent coverage depends on that integration
BeyondTrustPrivate equity-ownedPAM, endpoint privilege management, Identity Security InsightsInsights flags risky identities, but remediation still runs through separate PAM workflows
TeleportIndependent; Cisco strategic investment (Aug 2026, per NHI market timeline)Certificate-based, short-lived access to infrastructure for humans and machinesStrong where adopted, but only covers infrastructure it fronts; no inventory of secrets elsewhere
P0 SecurityIndependentJust-in-time access and authorization for humans, service accounts and agentsYoung company; cloud-centric
SGNLCrowdStrike, announced 8 Jan 2026 (reported $740M), closed Feb 2026 per AccuroContinuous, policy-based authorization to remove standing privilegeValue now tied to buying into the CrowdStrike Falcon identity stack

Secrets managers and vaults

VendorOwnership / recent dealWhat it doesWhere it falls short of actionable
HashiCorp VaultIBM, completed 27 Feb 2025 ($6.4B)De facto standard vault; dynamic secrets; Vault Radar for scanningOperationally heavy; the 2023 move to a Business Source License led some users to the OpenBao fork. A vault protects what is onboarded, not what developers left outside
AWS Secrets Manager, Azure Key Vault, Google Secret ManagerCloud providersNative secrets storage and rotation per cloudOne silo per cloud; no cross-cloud inventory or ownership view, a main cause of vault sprawl
AkeylessIndependentSaaS vault for secrets, certificates and keys, plus secretless accessSame gap as every vault: a secure store, not a discovery or remediation engine
Doppler, InfisicalIndependent; Infisical raised $40M at a $600M valuation (Oct 2026)Developer-friendly secrets managersBuilt for engineering teams; security gets limited policy, risk scoring and enterprise-wide reporting
1PasswordIndependent; bought Trelica (Jan 2025) and Apono (Jun 2026, reported $250-300M)Password manager extended to developer secrets, SaaS access and just-in-time accessStrong on humans and developer experience; machine-identity governance is newly assembled from acquisitions

Secrets scanning

VendorOwnership / recent dealWhat it doesWhere it falls short of actionable
GitGuardianIndependent; $50M Series C, Feb 2026Scanning across Git, CI, Slack, Jira and containers; NHI Governance inventoryFinds far more than teams can fix; remediation still depends on developers rotating and redeploying
Truffle SecurityIndependentTruffleHog scanning with live validation and permission analysis of found keysValidation shows a key works, but GitGuardian found validation-only triage misses 46% of critical secrets
GitHub secret protectionMicrosoftPush protection and scanning inside GitHubOnly covers GitHub; no view of Slack, laptops, other source control or where a secret is used
WizGoogle, completed 11 Mar 2026 ($32B)Finds secrets on cloud workloads and maps their attack pathsStrong cloud context, but not a fix workflow for developers or SaaS

NHI management and AI agent identity

VendorOwnership / recent dealWhat it doesWhere it falls short of actionable
Astrix SecurityCisco, announced 4 May 2026, completed 29 Jun 2026NHI discovery across SaaS, cloud and AI agentsStandalone sales ended; roadmap now tied to Cisco's identity stack
Entro SecuritySailPoint, completed 29 Jun 2026 (reported about $200M)Secrets and NHI inventory with context from vaults and scannersBecoming a module of SailPoint identity governance; best fit for SailPoint customers
Oasis SecurityCyera, completed 3 Sep 2026 (valued at about $1B); now sold as Cyera IdentityNHI lifecycle management and rotationFolding into a data security platform; NHI-only buyers may get less focus
Clutch SecurityIndependent; Palo Alto Networks reported in talks to buy it for about $500M (6 Nov 2026, not signed)NHI discovery and zero-trust controls for machine identitiesSmall (about $10M ARR); likely to become part of Palo Alto plus CyberArk if the deal happens
Token SecurityIndependentNHI and AI agent discovery and ownership mappingVisibility-first; enforcement depends on other tools
AembitIndependentWorkload and agent access without static secretsRequires changing how each workload authenticates; adoption is app by app
NatomaSnowflake, announced 27 May 2026, closed Jun 2026MCP gateway and agent access governanceNow aimed at Snowflake's agent platform rather than neutral enterprise-wide control
VezaServiceNow, completed 2 Mar 2026 (about $1.2B per ServiceNow's 10-Q)Access graph showing what each human and NHI can actually reachAnswers "what can it reach", not "where is the secret"; now steered toward ServiceNow AI Control Tower
PermisoOkta, completed 26 Aug 2026Threat detection across human, NHI and agent identitiesDetection only; response relies on Okta and other tools
SilverfortIndependent; bought Fabrix Security (28 Apr 2026)Inline MFA and protection for service accounts in Active Directory and hybrid environmentsStrong on-prem; cloud and SaaS token coverage less mature

SaaS and OAuth token governance

VendorOwnership / recent dealWhat it doesWhere it falls short of actionable
AppOmni, Obsidian Security, Valence SecurityIndependent; Obsidian raised $85M at a $1.1B valuation (Aug 2026)SaaS security posture, third-party app and OAuth grant inventory, SaaS threat detectionFew companies have a SaaS security owner to act on findings; revoking a vendor integration needs the business owner's sign-off

Certificate lifecycle management

VendorOwnership / recent dealWhat it doesWhere it falls short of actionable
VenafiCyberArk (Oct 2024, about $1.54B), now Palo Alto NetworksEnterprise certificate lifecycle managementIntegration churn through two acquisitions in 18 months
KeyfactorPrivate equity-owned; bought InfoSec Global and CipherInsights (May 2025) and Cofide (2026); $1B+ growth investment led by Summit Partners (Jul 2026), per the NHI market timelineCLM, PKI and cryptographic inventory for post-quantum migrationDiscovery is good; automating renewal on every endpoint is still a per-app project
DigiCert, Sectigo, AppViewXIndependentPublic CA plus CLMCA-led tools favor their own certificates; private and shadow certificates are harder to cover

7.6 Why the tools are not yet actionable, by role

Every category above produces findings, but security teams need a decision they can execute: this credential, owned by this person, can reach this data, is being used from here, and can be rotated now without breaking production. No single vendor answers all five parts.

Missing pieceWhat the security team gets todayWhat would make it actionableRoles who feel it most
One inventory across vaults, code, SaaS, endpoints and agentsA list per tool; NHI vendors cover cloud and SaaS, scanners cover codeA single system of record joining all sources, deduplicated per secretDirector of IAM, CISO
Owner and consumer mapping"Created by svc-deploy in 2021"The accountable human and every app that would break on rotationDirector of IAM, Director of Arch & Eng
Blast radius"Valid AWS key found"Effective permissions, data reached, and whether it touches regulated dataDirector of AppSec, Director of Data Security
Usage and abuse detectionLogin-based ITDR; SaaS logs few teams watchBehavioral baselines per token and integration, alerting on bulk export or new source IPsDirector of SecOps
Safe automated remediationA ticket to a developerOne-click or policy-driven rotate, revoke, re-scope, with rollbackDirector of AppSec, platform engineering
Third-party token governanceVendor questionnairesContinuous inventory of vendor-held tokens, scopes and recertificationDirector of GRC, third-party risk
Agent credentialsAgents borrow human or shared keysPer-agent identity, scoped short-lived tokens, and an audit trail tied to the requesting humanCISO, Director of AppSec, Director of IAM
Board-level metricCounts of findingsPercentage of secrets owned, short-lived, and rotated within SLA; mean time to revokeCISO, Director of GRC

Consolidation cuts both ways. Buyers get NHI features inside platforms they already own (Palo Alto, Cisco, CrowdStrike, Okta, SailPoint, ServiceNow), but each platform sees mostly its own ecosystem. The cross-silo view is still the open opportunity, and only a few independents (Aembit, Token Security, P0, GitGuardian, Truffle, and Clutch for now) are positioned to offer it neutrally.

Key takeaways

  1. Human credentials usually have a clear owner (IAM); machine secrets are spread across developers, platform, cloud and app owners, so nobody owns the inventory.
  2. Session cookies and OAuth tokens bypass MFA, which is why attackers now prefer them to passwords.
  3. Leaked secrets stay valid for years: over 64% of secrets valid in 2022 were still valid in January 2026.
  4. A wave of acquisitions in 2025 and 2026 folded most non-human identity startups into large platforms.
  5. The missing piece is actionability: owner, reach, abuse signal and a safe way to rotate or revoke.

Check yourself

  1. Name four kinds of machine secret and where each usually lives.
  2. Why did the Snowflake customer breaches succeed even though Snowflake itself was not hacked?
  3. What is the difference between a secrets manager and a secrets scanner?
  4. Why is rotating a leaked key harder than it sounds?

Go deeper