Introduction
Secrets management evidence for SOC 2 is the dated record that shows your company keeps credentials such as API keys, database passwords, tokens, and signing keys in controlled stores, limits who and what can read them, rotates them on a defined schedule or after an event, keeps them out of source code and logs, and responds when one leaks. A policy line that says "secrets are stored securely" is intent. A secret store inventory with owners, access policies, rotation records, scanning results, and closed leak tickets is evidence.
Secrets sit underneath almost every other control. If a production database password lives in a public repository or a shared chat thread, access reviews and MFA on human accounts matter much less, because anyone holding that string can skip them. Auditors know this, and credential handling often comes up when they test logical access and change management.
Here is a labeled hypothetical. A 40-person SaaS company keeps most secrets in a cloud secrets manager and passes its Type 1 review. During Type 2 fieldwork, the auditor asks how the team knows no credentials were committed to source control during the period. The team has a scanning tool, but it was only enabled on two of nine repositories, and nobody can show what happened to the alerts it raised. The auditor also asks for rotation records for the payment provider API key, which turns out to be the same key created three years earlier by an engineer who has since left. None of this means the company was breached. It means the company cannot prove its secrets controls operated across the period.
What Secrets Management Evidence Means
Secrets management evidence answers six questions with records rather than descriptions:
- Where do secrets live? An inventory of approved secret stores and the in-scope systems that depend on them.
- Who and what can read them? Access policies for people, workloads, and pipelines, tied to roles and reviewed.
- How do secrets reach running systems? The injection path from store to application or pipeline, without copies in code or images.
- How are they rotated? A defined cadence or trigger, with dated proof that rotation happened.
- How do you detect exposure? Scanning of code, commits, and pipelines, with alerts routed to an owner.
- What happens when one leaks? A ticketed response that revokes, rotates, and closes the exposure.
Auditors test the controls your company describes in its system description. If you describe a vault, rotation, and scanning, expect to show all three working across the audit period.
How This Differs From Encryption and Key Management Evidence
Secrets management and key management overlap, but they are not the same evidence set.
| Topic | Encryption and key management | Secrets management |
|---|---|---|
| Main objects | Encryption keys, key management service settings, certificates | API keys, passwords, tokens, connection strings, signing keys used by apps |
| Typical question | Is data encrypted at rest and in transit, and are keys controlled? | Are credentials kept out of code, restricted, rotated, and monitored? |
| Common evidence | Encryption settings, key policies, rotation configuration, certificate inventory | Secret store inventory, access policies, CI/CD injection config, scanning results, leak tickets |
If you already maintain the evidence described in Encryption and Key Management Evidence for SOC 2, keep it. Secrets management adds the application and pipeline credentials that encryption evidence usually does not cover.
Why Secrets Evidence Matters for SOC 2
SOC 2 does not name a secrets manager or require a specific rotation interval. The Trust Services Criteria published by the AICPA ask whether logical access to information assets is restricted (CC6.1), whether access is granted and removed appropriately (CC6.2 and CC6.3), whether the company detects and monitors for anomalies (CC7.1 and CC7.2), and whether changes are authorized and controlled (CC8.1). Credentials are part of how access works, so secrets controls usually support several of these criteria at once.
In practice, auditors commonly look for three things:
- Credentials for in-scope systems are stored in an approved location with restricted access.
- Exposure is detected and handled when it happens.
- The controls ran consistently across the whole period for a Type 2 report, not just on the day of the walkthrough. See SOC 2 Type 1 vs Type 2 for how the period affects testing.
Building the Secret Store Inventory
Start with where secrets are supposed to live, then find where they actually live.
Approved secret stores
List each approved store: a cloud secrets manager, a dedicated vault product, your CI/CD platform's encrypted secrets, and a team password manager for human-used credentials. For each, record the owner, the environments it serves, and how access is granted. Fewer stores are easier to evidence.
Secrets by system
For in-scope production systems, record which secrets the system depends on, which store holds them, who owns each one, and when it was last rotated. You do not need to list secret values, and you should not. An inventory of names, owners, locations, and rotation dates is enough.
Shadow locations
Look for credentials outside approved stores: environment files on laptops, hardcoded values in older repositories, configuration in container images, wiki pages, chat messages, and spreadsheets. Each one you find becomes a remediation ticket. Finding and closing these is evidence of a working control, not a failure, as long as it is tracked.
Controlling Access to Secrets
Access to a secret store is privileged access. Treat it with the same discipline described in Privileged Access Management Evidence for SOC 2.
- People: Limit who can read production secrets directly. Grant access through roles, not individual exceptions, and remove it when someone changes teams or leaves. See Onboarding and Offboarding Evidence for SOC 2.
- Workloads: Give each service its own identity and its own scoped secrets rather than one shared credential for everything. Workload identity features in cloud platforms can reduce the number of long-lived secrets you have to manage.
- Pipelines: Scope CI/CD secrets to the jobs and branches that need them. A deploy key that every pull request build can read is broader than most teams intend.
- Reviews: Include secret store access in your periodic user access review. Keep the review record, the changes it produced, and the tickets that closed them.
Evidence to keep includes access policy exports with dates, role assignments, review records, and removal tickets.
Getting Secrets Into Running Systems
How a secret reaches an application matters as much as where it is stored.
Common patterns include the application reading from the secret store at startup or at runtime, the platform injecting values as environment variables at deploy time, and the CI/CD platform injecting values into a job without writing them to logs. Patterns that usually create audit problems include secrets committed to the repository, baked into container images, copied into configuration files on servers, or printed in build output.
Evidence to keep:
- Configuration showing that applications and pipelines reference secrets by name from the approved store.
- CI/CD settings that mask secret values in logs.
- A sample of recent deployment or build logs showing masked values.
- Change management records for changes to secret injection configuration.
Rotating Secrets
SOC 2 does not set a rotation interval. Choose a cadence that fits each secret's risk, document it, and follow it.
Scheduled rotation
Many teams rotate high-impact credentials, such as production database passwords and payment or cloud provider keys, on a fixed schedule. Some stores support automatic rotation for certain secret types. Where rotation is automatic, keep the configuration and the rotation history. Where it is manual, keep a ticket or log entry for each rotation.
Event-driven rotation
Rotate when the risk changes: when someone with access to a shared credential leaves, after a suspected or confirmed exposure, after a vendor reports an incident, or when a secret was used outside its intended scope. Event-driven rotation is often the part auditors sample, because it tests whether the control actually triggers.
Exceptions
Some credentials cannot be rotated easily, such as a legacy integration that breaks on change. Record those through exception management with an owner, a reason, a compensating measure, and a review date.
Detecting Leaked Secrets
Detection is what turns a policy into a control you can prove.
- Repository scanning: Enable secret scanning across all in-scope repositories, not only the main ones. Many source control platforms offer built-in scanning, and open source tools are also common.
- Pre-commit and pull request checks: Blocking a secret before it reaches the main branch is cheaper than cleaning it up afterward.
- History: Removing a secret from the latest commit does not remove it from history. Treat any committed secret as exposed and rotate it.
- Logs and images: Check build logs, application logs, and container images for credentials as part of logging and monitoring and vulnerability work.
Evidence to keep includes scanner configuration showing coverage, alert history for the period, and the triage outcome for each alert, including false positives marked with a reason.
Responding to a Leaked Secret
When a secret is exposed, the evidence trail should show four steps, each with a timestamp:
- Detected: the alert or report, with the source and time.
- Contained: the secret revoked or rotated, and the new value placed in the approved store.
- Investigated: a check of whether the credential was used by anyone unexpected during the exposure window, based on access logs for the affected system.
- Closed: the ticket closed with root cause and any follow-up, such as adding the repository to scanning coverage.
If the exposure meets your incident criteria, it should also flow through incident management. See Incident Response Evidence for SOC 2 for the broader incident record.
Type 2 Sampling: What Auditors Commonly Request
Auditors decide their own procedures, but secrets testing commonly includes requests like these:
- The list of approved secret stores and who administers each.
- Access policies for production secrets and evidence they were reviewed during the period.
- A sample of in-scope repositories showing secret scanning was enabled across the period.
- Alert history from the scanner, with a sample of alerts traced to triage and closure.
- Rotation records for a sample of high-impact credentials, or rotation configuration and history for automated rotation.
- Evidence that credentials were rotated after a sample of relevant departures or exposures.
- CI/CD configuration showing secrets are injected from the store and masked in logs.
If a population is empty, for example no leaks were detected during the period, keep evidence that detection was running so the auditor can see the control was active.
Common Mistakes
- Scanning only some repositories and assuming coverage is complete.
- Deleting a committed secret from the file without rotating it.
- Using one shared credential across many services, so rotation becomes too risky to perform.
- Leaving secrets in long-lived environment files on laptops or servers.
- Granting broad read access to the secret store "for debugging" and never removing it.
- Rotating on schedule but keeping no record of when it happened.
- Treating false positives as noise instead of closing them with a reason.
A Practical Operating Model
A workable model for a growing team looks like this:
- Pick a small number of approved secret stores and write them into your information security policy or a supporting standard.
- Inventory in-scope secrets by system, owner, store, and last rotation date.
- Restrict and review access to the stores alongside privileged access.
- Inject secrets into applications and pipelines from the store, with masking in logs.
- Enable scanning on every in-scope repository and route alerts to an owner with a ticket.
- Rotate high-impact secrets on a schedule and after triggering events, and record each rotation.
- Track exceptions with owners and review dates.
- Retain the records across the full audit period.
Framework Notes
- SOC 2: Secrets controls typically support CC6.1, CC6.2, and CC6.3 for logical access, CC7.1 and CC7.2 for detection and monitoring, and CC8.1 for changes to configuration. Your control descriptions define what is tested.
- ISO 27001: ISO/IEC 27001:2022 Annex A includes controls for authentication information (5.17), access to source code (8.4), use of cryptography (8.24), and secure coding (8.28). One secrets program can often support both frameworks. See Mapping Controls Across SOC 2 and ISO 27001.
- NIST: NIST SP 800-53 addresses authenticator management in IA-5, including an enhancement against embedding unprotected authenticators in applications or scripts. Many teams use it as a design reference even when it is not a formal requirement.
- OWASP: The OWASP Secrets Management Cheat Sheet is a widely used practical reference for storage, rotation, and pipeline handling.
How AuditFlo.co Helps
AuditFlo.co helps teams retain continuous evidence collection and audit-period history for operational artifacts when those records are stored or linked through connected systems and workflows your team already uses, such as GitHub and Jira.
For secrets management, that can mean dated history for leak triage tickets, rotation tasks, access review tasks, exception tickets, and change records for secret injection configuration, so you can show the work across the period without rebuilding it from memory. Your secret stores, cloud platforms, and source control remain the systems of record for where secrets live and who can read them. AuditFlo.co does not store or rotate secrets, does not issue SOC 2 reports, does not certify compliance, and does not replace auditors.
To see the workflow for your stack, request a demo.
Final Thoughts
Secrets are a quiet dependency for most of your other controls, so they deserve their own evidence trail. Keep them in a small number of approved stores, restrict and review who can read them, inject them without copies in code, rotate them on a schedule and after events, scan for leaks everywhere, and close every exposure with a ticket. If you can answer "where, who, how delivered, how rotated, how detected, and how handled" with dated records, secrets testing becomes routine.
For the broader access picture, see What Is Least Privilege?, Privileged Access Management Evidence for SOC 2, Encryption and Key Management Evidence for SOC 2, and how to prepare for a SOC 2 audit.
FAQ
Does SOC 2 require a secrets manager?
No. SOC 2 does not require a specific product. Many companies use a cloud secrets manager, a vault product, CI/CD encrypted secrets, or a combination. Auditors test the controls your company describes.
How often should secrets be rotated for SOC 2?
SOC 2 does not set an interval. Define a cadence by risk, rotate after triggering events such as departures or exposures, and keep records that show you followed it.
Is a secret committed to a private repository still a problem?
Usually yes. Anyone with repository access, including former staff and integrations, may have seen it, and it stays in history. Common practice is to treat it as exposed, rotate it, and record the response.
Do we need to show secret values to the auditor?
No, and you should not. Show inventories, policies, configuration, logs, and tickets that prove the controls ran without revealing the secrets themselves.
What if we found no leaked secrets during the period?
Keep evidence that scanning was enabled and running across the period, such as coverage settings and scan history, so the auditor can see the control was active.
Does AuditFlo.co manage our secrets?
No. Your secret stores and platforms hold and rotate secrets. AuditFlo.co helps organize dated evidence such as tickets, tasks, and workflow history from systems you already use, and does not replace your engineers or your auditors.