Join our Newsletter — 33% off our NHI Course

How should security teams implement cryptographic discovery across cloud, code, and infrastructure?

Security teams should treat cryptographic discovery as a continuous inventory and monitoring process, not a one-time project. Start by scanning code, binaries, CI/CD tools, file systems, web servers, and cloud environments to identify keys, certificates, keystores, algorithms, protocols, and libraries. Then map each asset to its business context so remediation can target real risk without breaking dependent systems.

What cryptographic discovery needs to cover

Cryptographic discovery is broader than finding hard-coded keys. Security teams need visibility into where cryptography is actually used across source code, build pipelines, cloud services, infrastructure configurations, certificates, keystores, secrets stores, libraries, protocols, and runtime dependencies. That matters because the same organisation can have well-managed certificate renewal and still miss embedded keys in a deployment manifest, a container image, or a backup script.

Good discovery separates the cryptographic asset from the system that depends on it. A certificate may be visible in a cloud load balancer, a JVM trust store, and an application bundle, but the remediation path differs in each case. Teams that scan only code miss operational credentials; teams that scan only cloud miss what ships in artifacts; teams that scan only infrastructure miss the libraries and algorithms that shape exposure. The practical goal is to build an inventory that is current enough to support rotation, revocation, migration, and exception handling without breaking live services.

That inventory also needs context. If a key is tied to a low-risk test environment, the response may differ from a production signing key, an API token used by automation, or a legacy protocol that remains active only because a downstream system has not been modernised. In practice, many teams discover their highest-risk cryptographic debt only after an outage, a dependency break, or an audit exception forces them to look.

How discovery works across code, cloud, and infrastructure

The most reliable approach is to combine static discovery, configuration analysis, and runtime observation. Static scanning finds embedded secrets, certificate material, algorithm choices, and insecure library versions in repositories, build outputs, images, and infrastructure-as-code. Configuration analysis extends that view into cloud services, web servers, TLS settings, keystores, key-management integrations, and identity-linked access paths. Runtime observation then confirms what is actually loaded, negotiated, or presented in production, which is important because code often differs from what is deployed.

A useful workflow is to normalise findings into a single asset record with four attributes: what the cryptographic object is, where it was found, what depends on it, and whether it is still active. That record should distinguish between a secret that can be revoked immediately and a certificate or library that requires compatibility testing before change. It should also capture algorithm age, protocol version, key length, issuer, expiration, and ownership so teams can prioritise by blast radius rather than by scan volume.

For cloud environments, discovery should include managed services and identity boundaries, not just virtual machines. Many sensitive objects are exposed through object storage, parameter stores, CI/CD variables, serverless functions, and workload metadata. For code, the useful question is not only “is a secret present?” but also “does this component generate, consume, validate, or forward cryptographic material?” For infrastructure, the question becomes whether the platform is enforcing the intended policy or merely hosting a weak default. The NIST SP 800-53 Rev 5 Security and Privacy Controls provides a useful control vocabulary for tying discovery output to accountable ownership and system-level protection expectations.

At scale, discovery works best when it is continuous rather than episodic. Re-scan on code change, image release, cloud configuration drift, and certificate lifecycle events. NHIMG research on NHI risk patterns shows that organisations often lack full visibility into connected identities and credentials, which is why discovery has to span the whole delivery chain instead of assuming any single repository is complete. The NHI Lifecycle Management Guide is useful here because it frames discovery as part of ongoing ownership, not one-off cataloguing. These controls tend to break down when teams rely on a single scanner output as the source of truth, because cryptographic material is frequently duplicated, transformed, or embedded after the first scan passes.

Where teams usually misread the problem

Tighter discovery often increases operational noise, so teams need to balance visibility against remediation capacity. The common mistake is treating every cryptographic finding as equal. A stale test certificate, a deprecated hash algorithm in a rarely used tool, and a production signing key do not deserve the same response path, even if they appear in the same report.

Another edge case is indirect usage. Some systems do not store secrets at all but still rely on cryptography through inherited libraries, default trust stores, mTLS configuration, or provider-managed keys. Best practice is evolving in this area, and there is no universal standard for how deep every environment’s discovery must go, but the minimum bar is to know which assets create trust and which assets merely report on it. Teams also underestimate how often certificate chains, container layers, and golden images propagate old material long after the original source has been fixed.

The final nuance is ownership. Discovery fails when security owns the scan but not the cleanup path. If application, platform, and cloud teams each see only part of the cryptographic picture, the inventory will be incomplete even if the tooling is sophisticated. The organisations that get this right usually tie every finding to a service owner, a rotation path, and an exception date rather than leaving findings in an untriaged backlog.

Risk and Threat Considerations

Cryptographic discovery has a material exposure dimension because unknown or unmanaged keys, certificates, and libraries expand the attack surface in ways that are hard to monitor. The main risk is not just secret leakage; it is lingering trust in material that has outlived its intended lifecycle, especially when the same object is reused across cloud, build, and production systems.

Failure mechanism: Attackers and internal abuse paths both benefit when cryptographic assets are invisible, duplicated, or over-scoped. Hard-coded secrets in code, tokens in CI/CD variables, stale certificates in cloud services, and weak libraries in images all create persistence opportunities because defenders cannot reliably rotate, revoke, or validate what they have not found. Hidden dependencies also cause operational failures when a key or protocol is changed without knowing every consumer.

Impact: The consequence can be credential compromise, service impersonation, failed encryption trust, broken deployments, or broad lateral access through a shared cryptographic dependency. At scale, the same visibility gap that delays remediation also delays incident scoping, which means compromised material can remain active longer than teams expect.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

MITRE ATT&CK address the attack and risk surface, while CIS Controls v8, NIST CSF 2.0 and NIST SP 800-63 set the governance and control requirements practitioners need to meet.

Framework Control / Reference Relevance
CIS Controls v8 5 — Account Management Discovery must tie cryptographic assets to accountable owners and active usage.
6 — Access Control Management Over-scoped keys and tokens are an access-control exposure discovered by this process.
8 — Audit Log Management Continuous discovery depends on log evidence from code, cloud, and runtime systems.
Recommendation — Inventory all cryptographic assets and bind each one to a responsible owner for remediation. Review discovered credentials for excess privilege and revoke unnecessary access paths. Correlate scan results with logs to confirm where cryptographic material is actually used.
NIST CSF 2.0 ID.AM-1 — Physical Devices and Systems Inventory Cryptographic discovery is fundamentally an inventory problem across systems and assets.
PR.DS-5 — Data, At Rest Security Keys, certificates, and secrets are part of protecting stored data and trust paths.
Recommendation — Maintain a current inventory of systems that store, process, or depend on cryptographic material. Protect stored cryptographic material with controls that reduce exposure and misuse.
MITRE ATT&CK T1552 — Unsecured Credentials Discovery targets exposed secrets, tokens, and keys that adversaries commonly seek.
Recommendation — Hunt for exposed credentials in code, images, cloud stores, and automation paths.
NIST SP 800-63 AAL — Authentication Assurance Level Discovery often uncovers certificates or tokens whose assurance level is misaligned with use.
Recommendation — Validate that discovered authentication material matches the required assurance for its use case.

Practitioner Guidance

What to prioritise: Start with cryptographic objects that can authenticate to production, sign software, or terminate external trust. Those findings have the highest blast radius and the shortest acceptable time to remediation.

What to verify: Confirm not only that an object exists, but also whether it is active, duplicated, inherited, or embedded in an image or template that will reintroduce it after cleanup. If the same material appears in multiple places, treat one of those locations as a propagation path, not just a duplicate record.

  • Assign each finding to a service owner before opening a remediation ticket.
  • Track expiration, rotation, and revocation dates as first-class fields, not comments.
  • Separate production, non-production, and build-time exposure in the inventory.
  • Escalate any finding that crosses environment boundaries or appears in shared automation.

Practitioner takeaway: Discovery is only useful when it produces a trusted ownership map that can drive rotation, revocation, and compatibility decisions without guessing which systems still depend on the cryptographic material.