Blog
DevOps security: what DevSecOps changes in your pipeline
DevOps security, or DevSecOps, builds security into the same pipeline that ships the code. Where each control sits, and how to protect the pipeline itself.
DevOps security is the part of DevOps that keeps a fast release habit from becoming a fast way to ship a breach. The usual name for it is DevSecOps. The idea is simple to state: the checks that used to happen once, near the end, by a separate team, now run inside the same pipeline that builds and releases the software, and the people who write and run the code share responsibility for what those checks find.
This guide is for anyone who owns or pays for software that is released often and wants to know what DevSecOps asks of a team in practice. It covers where each security control sits between a commit and a running system, why the pipeline itself has become a target, what to automate and what to leave to people, the benefits and the common problems, and the questions worth asking whoever runs your releases.
The worked example is an invented bike-share operator with a rider app and a back office. No such company exists, and neither does its software.
What is DevOps security?
Red Hat’s explainer puts the name plainly: “DevSecOps stands for development, security, and operations.” It describes the practice in terms of culture, automation and how the platform is designed, with security a duty everyone shares, built in from start to finish. NIST, the US standards body, uses the same expansion in SP 800-204C (March 2022), a guide to running DevSecOps with CI/CD pipelines for cloud-native applications.
Microsoft’s guide to security in DevOps adds the part that is easy to skip. It says no service can be made completely secure, and calls DevSecOps a continuous effort that needs the attention of everyone in development and IT operations. The same guide asks teams to plan both ways: to prevent breaches, and to assume one will happen, so they already know how they would detect it, respond and recover.
So the term covers three things at once:
- Controls in the pipeline. Checks on code, packages, configuration and builds that run on every change, without anyone having to remember them.
- Protection of the pipeline. The repository, the build service and the deploy credentials are guarded as carefully as production, because whoever controls them controls what reaches production.
- Ownership. A finding has a named owner and a deadline, and a security problem is treated like any other defect in the backlog, sorted by how much harm it could do.
DevSecOps vs DevOps
DevOps joined development and operations so that small changes could move to users quickly and safely. Our guide to DevOps principles traces that idea to its sources. DevSecOps keeps all of that and puts the security work into the same flow, so a release no longer waits for a separate review that only a few specialists can run.
What changes in practice is where the security work sits and who does it. In an older model, a security team receives a nearly finished release, reviews it, and sends back a list. In a DevSecOps model, the routine checks run automatically on every change, the developers fix what they find in the normal course of work, and security specialists spend their time on design reviews, threat models and the problems that tools cannot see.
Where each security control sits in the pipeline
A delivery pipeline has a small number of stages, and each has its own controls. The table follows one change from the moment it is planned to the time it is running for users.
| Stage | Control | What it stops |
|---|---|---|
| Plan | A short threat model for any feature that touches money, personal data or access rights | A design that no amount of later checking can make safe |
| Commit | Secret blocking on push; a second engineer reviews each change before merge | Keys pasted into code, and changes nobody but their author has read |
| Build | Pinned package versions checked against published vulnerabilities; static analysis | A known-bad library, and common coding faults, reaching a release |
| Package | A record of how the release was built (provenance) and a list of what is inside it (an SBOM) | A tampered artifact passing as genuine, and not knowing which releases hold a newly flawed package |
| Deploy | Short-lived deploy credentials; infrastructure changes reviewed like code; production kept apart from test | A leaked key that works for months, and a test system used as a way into production |
| Run | Logs and alerts on sign-ins, permission changes and errors; patches applied on a schedule | An intrusion nobody notices, and a package flaw published after launch staying open |

Testing runs through several of these rows. Our guide to security testing covers which kinds of security test exist, what each one finds and misses, and when each runs. The decisions a web build should settle before and during design, mapped to the risks they prevent, are in secure web application development. This guide stays with the pipeline and the people around it.
Securing the DevOps tools themselves
A pipeline that can deploy to production is a target in its own right. In June 2023, CISA and the NSA published joint guidance on defending CI/CD environments, describing common risks in pipelines and the attack surfaces in them that could be exploited, and encouraging all organizations to review it and apply its recommendations.
Microsoft’s guide makes the risk concrete with one question: if an attacker had a developer’s credentials, what could they do? If those credentials can change the source, the attacker can inject code. If they can change the build or release process, the attacker can inject code and run scripts. One of the lessons Microsoft lists from its own exercises is blunt: “Control of the engineering system leads to control of everything.”
The controls that answer this are mostly about access, and none of them needs a large team.
- Keep every secret in a vault. Microsoft’s list of secrets includes passwords, keys, tokens and certificates, and also the credentials used in shared non-production environments.
- Prefer short-lived credentials for deploys. On GitHub Actions, for example, OpenID Connect lets a workflow ask the cloud provider for a token that is valid for a single job, so long-lived cloud keys never need to be stored as pipeline secrets.
- Block secrets before they land. A check such as GitHub’s push protection refuses a push that contains a credential, rather than raising an alert after it is already in the history. A key that did get pushed should be treated as exposed and replaced, whatever happens to the commit.
- Review pipeline changes like code changes. The build definition and deploy scripts live in the repository and need the same second reader as the application.
- Limit who can touch production. Microsoft notes that limiting production access and requiring two-factor authentication contains the damage from phishing, and that production should never trust anything in test.
Proving how a release was built
Once a pipeline is trusted, the next question is whether a given release really came out of it. The SLSA framework answers with build levels, each built on the one below.
| SLSA build level | What it means |
|---|---|
| Level 0 | No guarantees |
| Level 1: provenance exists | Each package carries a record of how it was built. It can be used to prevent mistakes, but SLSA says it is trivial to bypass or forge |
| Level 2: hosted build platform | Builds run on a hosted platform that signs the record, so forging it takes a deliberate attack, though SLSA notes the attack may be easy to perform |
| Level 3: hardened builds | Builds are isolated from one another and the signing secrets are kept away from the build steps, so forging the record means exploiting a vulnerability |
The record itself, which SLSA calls provenance, states what built the artifact, by what process and from which inputs. For a small team, a hosted build service that produces signed provenance, which is Level 2, is a realistic first target. SLSA intends Level 3 for most software releases, and notes that reaching it usually takes significant changes to an existing build platform.
Knowing what is inside each release
A software bill of materials (SBOM) is the list of components in a release. The US NTIA’s minimum elements report (July 2021) defines it as a formal record of the components used in building software and how they relate, and names seven fields for each component: supplier name, component name, version, other unique identifiers, dependency relationship, author of the SBOM data and a timestamp.
Its everyday use is speed of answer. When a vulnerability is published in a popular package, a team with an SBOM for every release can say within minutes which releases include it. A team without one has to rebuild that list by hand while the clock runs.
DevOps security automation: what to automate and what not
Automation is what lets security keep pace with frequent releases, but it suits some checks better than others.
Automate whatever gives the same answer for every application: secrets in code, package versions with published vulnerabilities, risky settings in infrastructure files, an unsigned artifact, a pipeline change without a review. These checks are cheap to run on every change, and a failed check should stop the merge or the deploy rather than file a note.
Keep for people whatever depends on what this business allows. A tool cannot know that one rider must never see another’s trip history, or that a refund needs a second approval above a certain amount. Those rules belong in requirements and in reviews by someone who has read them.
Give every finding an owner and a deadline. For the risks its war game exercises turn up, Microsoft’s guide recommends a backlog of repair items and a service level for how quickly they are fixed: severe risks as soon as possible, while minor issues may get a deadline of two sprints. The same rule suits scanner findings. A finding with no owner is just noise, and a scanner that produces too much noise is soon ignored.
Benefits of DevSecOps
NIST published its Secure Software Development Framework (SSDF) as SP 800-218, version 1.1, in February 2022. It is a set of secure development practices meant to fit into any development process. Its stated aims are the benefits most teams want from DevSecOps:
- Fewer vulnerabilities in released software, because the routine flaws are caught on the change that introduced them.
- Less harm from the flaws that get through, because there is a plan for detecting and fixing them, and the pipeline can ship a fix quickly.
- Fewer repeats, because each flaw’s root cause is looked at and the check that would have caught it is added.
Two more follow in practice. Microsoft suggests watching mean time to detection and mean time to recovery, so the team can see whether it is getting faster at noticing and fixing a breach. And the SSDF gives buyers and suppliers a common vocabulary, so a team that follows its practices can answer a client’s security questionnaire with evidence rather than reassurance. For US government systems, NIST’s SP 800-204C also links DevSecOps pipelines to continuous authority to operate (C-ATO), an approval kept current as the system changes.
DevOps security challenges
Most of the difficulty is not technical. Microsoft’s guide lists the arguments a team should expect when it first raises the subject: doubt that the threat is real, a feeling that a security review questions the team’s skill, a belief that the goal is impossible, the claim that nothing has ever been breached (to which the guide asks how anyone would know), and endless debate about whether the effort pays. Each of these is easier to answer with a short, specific plan than with a general warning.
The practical problems tend to be these:
- Too many findings. A new scanner run on an old codebase can return a long list of results on its first day. Start by blocking only new problems on new changes, then work the old list down in severity order.
- Secrets in many places. Keys copied into CI settings, laptops and old scripts are hard to find and harder to rotate. Moving them into one vault, and making deploys use short-lived credentials, shrinks the list.
- A pipeline that grew by accident. Build scripts written years ago often run with broad permissions nobody remembers granting. Reviewing who and what can deploy is often the cheapest fix on this list.
- Checks that slow every change. A security stage that takes far longer than the rest of the build gets skipped. Fast checks belong on every change; slower scans can run on a schedule, with findings fed to the same backlog.
- No one owns the result. Without a named owner and a deadline, findings accumulate. The service-level rule above is the fix.
Applying it: an invented bike-share operator
The operator runs docking stations in one mid-sized city. Riders use an app to unlock bikes and pay; staff use a back office to move bikes, issue refunds and manage accounts. Three developers share the work, and one of them also looks after the servers; they release changes several times a week. Everything below is invented to show the order of work, and it has no outcome figures.
- Week one: secrets. They search the repository history and the CI settings for keys, move every key into the cloud provider’s secrets store, replace any key that had been in the code, and turn on secret blocking for pushes.
- Week two: who can deploy. Only the pipeline can deploy to production now. Personal production keys are removed, deploys use short-lived credentials, and the test database is moved to its own account so production no longer reaches into it.
- Weeks three and four: checks on every change. Package versions are pinned and checked on each build, static analysis runs on each pull request, and a failed check blocks the merge. The existing backlog of findings is sorted by severity and given owners.
- Week five: reviewed pipeline changes. The build and deploy files can no longer be changed without a second engineer’s approval, the same rule as the app.
- Week six: records of each release. The hosted build service signs provenance for each release and stores an SBOM beside it.
- From then on: watching it run. Alerts fire on admin sign-ins from new places and on permission changes in the back office, and package updates are applied on a fixed day each month, sooner for a severe one.
A rider sees no difference after any of this. What has changed is how far a stolen password or a leaked key can reach.
Questions to ask whoever runs your pipeline
These questions apply whether your own staff run the pipeline or an outside team does. The answers tell you how it is set up.
- Where are the deploy credentials kept, and how long does each one stay valid?
- What happens when someone tries to push a key into the repository?
- Which checks can stop a merge or a deploy, and who can override them?
- Can anyone change the build or deploy definition without a second person approving it?
- For a given release, can you show how it was built and list every package inside it?
- When a severe vulnerability is published in a package you use, how soon is it patched, and who decides?
- Who is told about an unusual admin sign-in, and how fast?
Look for answers that point to a specific setting or a named person. An answer that relies on everyone being careful is a reason to ask more.
How this looks on our builds
Five security practices run on the systems we build: each change is reviewed by a second engineer, secrets are managed outside the code, access is controlled, the delivered system keeps an audit log, and every dependency is checked against published vulnerabilities. For software we look after once it is live, the monthly work of a software maintenance and support retainer covers security patches and dependency updates. If you have a question about a system you want built or looked after, we reply within one business day.
Common questions
Is DevSecOps a tool?
No. It is a way of working that uses tools. Scanners, secret blocking and signed builds are parts of it, but the parts that decide whether it works are the owners, the deadlines and the rules about who can change what.
Does a small team need DevSecOps?
A small team often needs it more, because nobody there has a full-time security role. The invented bike-share team has three people, and most of its steps are settings in services it already used, so the main cost is a few weeks of attention.
Who is responsible for security in DevSecOps?
Everyone who changes or runs the software has a share. Developers fix what the checks find in their own changes, operations staff guard the pipeline and production access, and security specialists, where a team has them, design the controls and review the risky features. Each finding still has one named owner.
The full service behind this post: Software Maintenance Services & Support.
Ready to scope your project?
Send us two sentences about what you need. We reply within one business day with the next step and any questions we need answered first.