DevSecOps and Secret Handling
Preventing secrets from being committed into source code repositories requires a multi-stage process without which your organization may inadvertently leak credentials or access keys that lead to your next data breach. Above, we identify the key areas you should consider as you develop a comprehensive prevention strategy to strengthen your secret management practices.
Secret management requires a strategy:
Assess & Remediate
Identify code repositories; owners; and an assessment methodology
Develop a comprehensive process, Tooling and Remediation Runbooks, and consider all stages of the assessment from identification to cleanup. Modus has helped many customers with this process.
This should include:
When developing an initial assessment and remediation plan, most organizations are surprised to find just how many egregious instances of spilled credentials and secrets actually have occurred and are not prepared for the volume and level of effort required to resolve these initial problems. For this, we suggest leveraging your existing vulnerability management process if they already exist.
If a vulnerability management program does not already exist which you can leverage consider developing a process built around a standard incident response playbook which would include the following major functions:
Deploy & Train
Secrets need to be deployed securely into environments
Where do we store secrets and safely access them?
The deployment must include proactive training for engineers and developers.
Recommended by LinkedIn
As part of your strategy to prevent secrets from being committed into source control systems, you must have a secure platform for managing those secrets many options exist to satisfy requirements however while evaluating and selecting a technology you should consider the following:
Once a system is vetted, selected, provisioned, brought online a comprehensive effort to document usage of the system as a standard and train engineers and developers to use the system must be made.
Build
Getting to DevSecOps requires creating automation to prevent secrets from being committed in the first place
Prevent secrets from making it into source control
Your first line of defense is ensuring API keys, passwords and similar don’t end up in source control and while we list this step last; once you've gone through the process of automating checks and building the foundation of secret management this is your first line of defense.
Many vendors offer in-repository secrets scanning and remediation tools
Major vendors such as GitLab and GitHub can scan and lock secrets directly in source control
Building custom pipelines for secret scanning
If not shifting left, custom pipelines can be built
Summary
Eliminating secrets from source control systems and throughout serverless and containerized systems requires a comprehensive strategy. That strategy must include a process to identify your current state; technology to securely store secrets; training for engineers and developers, and build automation to automate the prevention of secrets moving forward.
Learn more about how Modus Create can help identify and solve the security challenges in your development pipelines by visiting https://moduscreate.com/services/security/