Secrets
Secrets is designed to detect sensitive information (secrets) that may be accidentally committed into source code or embedded in build artifacts. These secrets can include exposed tokens, API keys, passwords, private keys, certificates, and other confidential data that should never be publicly accessible or stored in plain text.
It continuously scans codebases and artifacts to identify such exposures early, helping teams prevent security risks before they escalate.
Why Are We Using This in OpsMx?
This capability is a key part of the OpsMx code security framework. In modern DevOps and GitOps workflows, developers frequently interact with multiple systems (cloud providers, CI/CD tools, databases), increasing the risk of unintentionally exposing secrets.
By integrating secret detection:
We proactively identify leaks before they reach production
We reduce the risk of unauthorized access and data breaches
We enforce secure coding and compliance practices
We minimize incident response time and remediation effort
Ultimately, it shifts security left—catching issues early in the development lifecycle rather than after deployment.
Use Cases
Code Scanning
Secret detection scans source code repositories (e.g., Git-based systems) to identify hardcoded or exposed credentials.
How it works:
Scans commits, pull requests, and branches in real time or periodically
Uses pattern matching, entropy detection, and known secret signatures
Flags secrets such as API keys, tokens, SSH keys, and passwords
Examples:
A developer accidentally commits an AWS access key in a config file
A database password is hardcoded in application code
A private key is checked into a public repository
Outcome:
Immediate alert or PR comment
Option to block the merge (policy enforcement)
Guidance on remediation (e.g., revoke key, rotate secret, move to vault)
Image Scanning
Secrets can also be embedded in container images during the build process. This feature scans container images to detect such hidden exposures.
How it works:
Analyzes image layers and filesystem contents
Detects secrets left in environment variables, config files, or build artifacts
Scans both base images and application layers
Examples:
Credentials stored in
.envfiles inside the imageTokens accidentally copied during Docker build steps
Secrets cached in intermediate layers
Outcome:
Alerts during CI/CD pipeline execution
Prevents deployment of compromised images
Helps enforce secure image-building practices
Last updated