Secrets management is the practice of securely storing, accessing, distributing, and rotating sensitive credentials like API keys, database passwords, encryption keys, and access tokens. It replaces hardcoded credentials in source code and configuration files with centralized, auditable systems that control who and what can access each secret.
Secrets management is the set of tools, practices, and policies that govern how your organization handles sensitive credentials. A "secret" in this context is any piece of information that grants access to a system or resource: API keys, database passwords, SSH keys, encryption keys, OAuth tokens, service account credentials, TLS certificates, and similar sensitive data.
The core problem secrets management solves: credentials need to be available to the applications and services that use them, but they should never be visible to anyone or anything else. Without a deliberate secrets management practice, credentials end up hardcoded in source code, committed to version control, pasted into Slack messages, stored in plaintext configuration files, or embedded in Docker images. Each of these locations is a breach waiting to happen.
A proper secrets management system:
The scale of credential leakage is staggering. GitHub reported finding 39 million secret leaks across its platform in 2024 alone.
Here's why startups are especially vulnerable:
Fencer's SAST scanning detects hardcoded secrets in your codebase, including API keys, passwords, tokens, and private keys committed to your repositories. Rather than just flagging the file and line number, Fencer contextualizes the finding within your code-to-cloud risk picture.
What makes Fencer's approach different:
A secret is any credential or piece of sensitive data that grants access to a system, service, or resource. Common examples include API keys, database passwords, SSH private keys, OAuth tokens, encryption keys, TLS/SSL certificates, service account credentials, webhook signing keys, and cloud provider access keys (AWS, GCP, Azure). If someone could use it to authenticate, decrypt, or access something they shouldn't, it's a secret and needs proper management.
Environment variables are better than hardcoding secrets in source code, but they're not a complete solution. Environment variables can still leak through logging, error messages, process listings, and CI/CD configurations. They don't provide access controls (anyone with shell access can read them), rotation capabilities, or audit trails. For production systems, a dedicated secrets manager (HashiCorp Vault, AWS Secrets Manager, Doppler, or similar) provides encryption, access policies, automatic rotation, and audit logging that environment variables alone can't offer.
Deleting the file or overwriting the value in a new commit doesn't remove the secret from git history. The credential remains accessible to anyone who can view the repository's commit log. To properly remediate: first, rotate the secret immediately (generate a new credential and revoke the old one). Then, use tools like git-filter-repo or BFG Repo Cleaner to rewrite git history and remove the secret from all commits. Finally, force-push the cleaned history and ensure all team members re-clone. The most important step is rotation, since you should assume the old credential was compromised the moment it was committed.