DevSecOps is an approach to software delivery that makes security a shared responsibility of development, security and operations teams and integrates it into every stage of the lifecycle. Instead of a security review at the end, automated checks such as static analysis, dependency scanning, secret scanning and infrastructure-as-code scanning run in the pipeline, and production is monitored for attacks and vulnerabilities. The goal is to find and fix security problems early, quickly and continuously.
What is DevSecOps?
DevSecOps combines development, security and operations. It extends the DevOps idea of small, frequent and automated releases with the insight that security cannot be checked once at the end if software changes every day. Security becomes part of the normal workflow: in design discussions, in code review, in the CI/CD pipeline and in production monitoring.
The term is often summarised as shift left: move security checks to an earlier point in the lifecycle, where problems are cheaper and easier to fix. A vulnerable query that is flagged in a pull request costs a few minutes. The same query found by an attacker in production can cost an incident, a disclosure and a lot of trust. DevSecOps also means shift right: watching the running system, because not every problem can be found before release.
Core principles
- Shared responsibility: developers own the security of their code, security teams provide expertise, tools and guardrails, and operations teams own secure configuration and monitoring.
- Automation: checks that can run on every change should run on every change, with results where developers already work.
- Fast feedback: findings arrive in minutes, with enough context to act, not weeks later in a PDF report.
- Security as code: policies, infrastructure and detection rules are versioned, reviewed and tested like application code.
- Continuous improvement: incidents and findings flow back into rules, templates and training.
DevSecOps practices along the lifecycle
| Stage | Practice | What it finds |
|---|---|---|
| Plan and design | Threat modelling, security requirements | Design flaws, missing controls, trust boundaries |
| Code | Static analysis (SAST), secure coding guidelines, code review | Insecure patterns such as SQL injection or XSS |
| Dependencies | Software composition analysis (SCA), SBOM | Libraries with known CVEs, licence risks |
| Secrets | Secret scanning in code and Git history | Passwords, API keys and tokens in the repository |
| Infrastructure | IaC scanning, policy as code | Public buckets, missing encryption, overly broad permissions |
| Build and release | Container image scanning, artifact signing, provenance | Vulnerable base images, tampered artifacts |
| Test | DAST, IAST, penetration tests | Vulnerabilities that only appear in the running application |
| Operate | Runtime detection, logging, SIEM, configuration monitoring | Attacks, misuse, configuration drift |
A pipeline example
A minimal security stage in a CI pipeline might look like this, here using open source tools as an illustration:
# .github/workflows/security.yml (illustrative)
name: security
on: [pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history for secret scanning
- name: Static analysis
run: semgrep scan --config auto --error
- name: Dependencies, secrets and IaC
run: trivy fs --scanners vuln,secret,misconfig --severity HIGH,CRITICAL --exit-code 1 .
The important parts are not the specific tools but the decisions: which checks run on every pull request, which findings break the build, and who handles exceptions. Breaking the build on every low-severity finding quickly teaches people to ignore or bypass the checks.
DevSecOps and the software supply chain
Modern applications consist largely of third-party code: libraries, base images, build tools and CI actions. Supply-chain attacks target exactly these components. DevSecOps answers with inventory and integrity: an SBOM that shows what is inside each release, pinned versions, verified sources, signed artifacts and pipelines with least-privilege credentials. Frameworks such as the NIST Secure Software Development Framework (SSDF, SP 800-218) and SLSA (Supply-chain Levels for Software Artifacts) describe these practices in more detail.
DevOps vs. DevSecOps
DevOps is about removing the wall between development and operations to deliver faster and more reliably. DevSecOps removes the second wall, the one to security. In practice it is less a new discipline than a mature form of DevOps: if you already automate tests, deployments and rollbacks, adding security checks and runtime detection to the same automation is the natural next step.
Common mistakes
- Tool sprawl without ownership: many scanners, overlapping findings and nobody who decides what to fix.
- Too many findings, too little context: hundreds of warnings per repository create the same fatigue as noisy alerts.
- Security as a gate only: a blocking check at the end of the pipeline, but no help for developers to fix the issue.
- Ignoring production: everything is scanned before release, but nobody watches for attacks or new CVEs in already deployed code.
- Secrets "fixed" by deleting the line: a leaked key stays in the Git history and must be rotated.
- Renaming without change: calling the team DevSecOps without changing responsibilities or workflows.
Best practices
- Start with a small set of high-value checks, typically secrets, dependencies and the most critical code patterns, and expand from there.
- Define clear severity thresholds for blocking and a documented exception process.
- Show findings in the pull request, with a fix suggestion where possible.
- Keep an SBOM per release so you can answer quickly whether a new CVE affects you.
- Use secure defaults: templates for services, pipelines and infrastructure that are secure from the start.
- Close the loop: when production detection finds an attack pattern, add a check that would have caught it earlier.
- Track a few meaningful metrics, such as time to fix critical findings, instead of the total number of findings.
Measuring DevSecOps
Metrics help to see whether the approach works, as long as they describe outcomes rather than activity. Useful examples are the time from detection to fix for critical findings, the share of repositories with the agreed checks enabled, the number of open critical findings older than an agreed limit, the number of leaked secrets that reached the main branch and the time it takes to answer "are we affected?" when a new critical CVE is published. Combined with delivery metrics such as the DORA metrics, they show whether security and speed improve together or whether one is traded for the other.
The observability perspective
Pipeline checks answer the question "is this code safe to ship?". Production telemetry answers "is this system being attacked, and is the vulnerable code actually reachable?". Both are needed. Access logs show injection attempts against specific endpoints, traces show which services and dependencies are involved in a request, and deployment markers show whether a new release changed the error or attack pattern. Linking security findings to services, owners and deployments turns a static list of findings into something a team can prioritise and act on.
How Obseria helps
Obseria bundles several DevSecOps checks in one place. Static code analysis finds insecure patterns in source code, software composition analysis checks libraries for known vulnerabilities and licences and can create an SBOM, secret scanning finds credentials in code and in the Git history, and IaC security checks Terraform, Kubernetes manifests and similar files. Runtime code analysis (IAST) detects vulnerabilities in the running application. In production, app and API threat detection recognises attacks such as SQL injection from access logs, and deployment tracking links changes to their effects. Detection only: Obseria does not block requests.