DevSecOps means security is part of the pipeline, not a gate at the end of it. The same CI/CD system that builds, tests and deploys your code also scans it for vulnerabilities, leaked secrets, vulnerable dependencies and risky infrastructure configuration, on every change. And the people who write the code own fixing what the pipeline finds.
That is the short answer to what is DevSecOps. The rest of this guide covers how it differs from DevOps, what "shift-left" really means, the five practices that make up a DevSecOps pipeline, a GitHub Actions example you can adapt, and a realistic way for a small team to start.
DevOps vs DevSecOps
DevOps broke the wall between development and operations: small changes, automated tests, continuous delivery, shared ownership of production. It made teams ship much faster. The problem is that security often stayed in the old model: a separate team, a review or pentest before a big release, a PDF of findings weeks after the code was written.
When you deploy many times a day, that model breaks. Either security becomes the bottleneck, or (more commonly) it gets skipped. DevSecOps fixes this by applying the DevOps playbook to security itself.
| DevOps | DevSecOps | |
|---|---|---|
| Goal | Ship fast and reliably | Ship fast, reliably and securely |
| Security ownership | Separate team, often at the end | Shared, developers fix their own findings |
| When security runs | Before major releases | On every commit and pull request |
| How | Manual reviews and audits | Automated checks in CI, humans for design and logic |
| Feedback | Weeks later, in a report | Minutes later, in the pull request |
Shift-left: why earlier is cheaper
"Shift-left" means moving security checks toward the left of the delivery timeline: into the editor, the pull request and the CI build, instead of pre-release audits or production incidents. The reasoning is practical. When a scanner comments on a pull request that you opened ten minutes ago, you still have the context and the fix is often one line. When the same bug surfaces six months later in a pentest report, someone has to rediscover the code, the fix may touch other features, and it has been exploitable the entire time.
Shift-left does not mean "only left". You still need checks against the running application and occasional human testing. It means the cheap, automatable checks happen as early as possible.
The core DevSecOps practices
1. SAST (Static Application Security Testing)
Analyzes source code without running it, looking for patterns like SQL injection, unsafe deserialization, missing authorization checks or weak cryptography. It runs fast and points to the exact file and line, which makes it ideal for pull requests. Traditional rule-based SAST is known for false positives; newer AI SAST approaches try to reason about whether a finding is actually reachable and exploitable.
2. SCA (Software Composition Analysis)
Most of the code you ship is open source you did not write. SCA reads your lockfiles (package-lock.json, poetry.lock, Gemfile.lock, go.sum) and matches every dependency version against databases of known CVEs. This directly addresses Software Supply Chain Failures, now #3 in the OWASP Top 10 2025.
3. Secrets scanning
API keys, database passwords and cloud credentials committed to git are one of the fastest paths to a breach. A secret scanner should check the full git history, not just the current files: deleting a key in a later commit does not remove it from the repository. If a secret leaks, rotate it; scanning only tells you it happened.
4. IaC scanning
Infrastructure as Code (Terraform, Kubernetes manifests, Dockerfiles, CI workflow files) is code, and it can be misconfigured: public storage buckets, containers running as root, security groups open to 0.0.0.0/0, workflows with write permissions they do not need. IaC scanners catch these before they are applied.
5. DAST (Dynamic Application Security Testing)
Tests the running application from the outside, like an attacker would: missing security headers, exposed error pages, injection points, authentication weaknesses. It complements SAST rather than replacing it; our SAST vs DAST comparison explains the trade-offs. For business logic flaws that no scanner finds, you still need penetration testing, manual or AI-assisted.
A practical DevSecOps pipeline with GitHub Actions
Here is a minimal pipeline using well-known open source tools. It runs secrets, SAST, dependency and IaC checks on every pull request and on pushes to main. Adapt the tools to your stack; the structure is what matters.
# .github/workflows/security.yml
name: security
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
secrets:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # full history, so old commits are scanned too
- name: Secrets in git history (Gitleaks)
run: |
docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/repo" \
zricethezav/gitleaks:latest detect --source /repo -v
sast:
runs-on: ubuntu-latest
container: semgrep/semgrep
steps:
- uses: actions/checkout@v4
- name: SAST (Semgrep, OWASP Top 10 rules)
run: semgrep scan --config p/owasp-top-ten --error
dependencies-and-iac:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Dependencies with known CVEs (Trivy)
run: |
docker run --rm -v "$PWD:/src" aquasec/trivy \
fs --scanners vuln --severity HIGH,CRITICAL --exit-code 1 /src
- name: IaC misconfigurations (Trivy)
run: |
docker run --rm -v "$PWD:/src" aquasec/trivy \
config --severity HIGH,CRITICAL --exit-code 1 /srcAnd a DAST job that runs after you deploy to staging, since it needs a live URL:
dast:
needs: deploy-staging
runs-on: ubuntu-latest
steps:
- name: Baseline DAST (OWASP ZAP)
run: |
docker run --rm -t ghcr.io/zaproxy/zaproxy:stable \
zap-baseline.py -t https://staging.example.comA few details that matter more than the tool choice:
permissions: contents: readat the top. Workflows get a token; give it the least privilege it needs.- Pin third-party actions and images to a commit SHA or digest in production pipelines. Tags like
@mainor:latestcan change under you, which is itself a supply chain risk. - Only fail on HIGH and CRITICAL at first. A pipeline that fails on every low-severity note gets disabled within a week.
- Enable branch protection so the security jobs are required checks before merging.
DevSecOps tool categories
| Category | What it covers | Open source / common examples |
|---|---|---|
| SAST | Vulnerabilities in your own code | Semgrep, CodeQL, SonarQube |
| SCA | Dependencies with known CVEs | Dependabot, Trivy, OWASP Dependency-Check |
| Secrets | Credentials in code and git history | Gitleaks, TruffleHog, GitHub secret scanning |
| IaC | Terraform, Kubernetes, Docker misconfigurations | Checkov, Trivy, KICS |
| Container | Vulnerable OS packages in images | Trivy, Grype |
| DAST | Running application from outside | OWASP ZAP, Burp Suite |
Stitching five or six tools together works, but each one has its own configuration, output format and false positives. That is why many teams prefer a single GitHub security scanner that covers several categories in one report. Nurbak, for instance, connects to GitHub and scans a repo with its own self-hosted AI model (your code is not sent to OpenAI or Anthropic for the analysis): exploitable vulnerabilities with file and line, dependencies checked against known CVEs, GitHub Actions, Docker, Terraform and Kubernetes misconfigurations, and secrets in git history, summarized in a 0-100 security score with plain-language explanations.
How to start DevSecOps in a small team
You do not need a security team to do DevSecOps. You need a few automated checks, a rule for what blocks a merge, and the habit of fixing findings like any other bug. A realistic order:
- Week 1: secrets. Turn on secret scanning with push protection, and scan the full history once. Rotate anything real you find. Highest impact, almost zero false positives.
- Week 1: dependencies. Enable automated dependency update PRs and CVE alerts. Merge the critical ones first.
- Week 2: SAST on pull requests, in non-blocking mode. Read the results for two weeks, tune out noisy rules, then make HIGH/CRITICAL blocking.
- Week 3: IaC. If you have Terraform, Kubernetes, Dockerfiles or non-trivial workflows, add IaC scanning to the same pipeline.
- Week 4: DAST baseline against staging after each deploy.
- Ongoing: a triage rule. For example: critical fixed within 7 days, high within 30, everything else reviewed monthly. Track the backlog like any other tech debt.
- Periodically: a human (or AI-assisted) pentest on the flows that matter most: auth, payments, multi-tenant data access.
The most common failure mode is not picking the wrong tool, it is noise. If developers learn that the security job is usually wrong, they stop reading it. Favor fewer, higher-confidence findings and make every finding actionable: where it is, why it matters, how to fix it.
That last step, fixing, is where teams stall. Some tools now close the loop: when Nurbak confirms a finding, it can open a pull request with the fix and a security regression test (the fix is generated with Claude, only with your explicit consent), so the remediation goes through your normal review. If you want a quick baseline before setting up a whole pipeline, the free GitHub repo scan shows the 3 most important findings in full.
Key takeaways
- DevSecOps is DevOps with security automated inside the pipeline and owned by the whole team.
- Shift-left: catch issues in the pull request, when fixing them is cheapest.
- The five core practices are SAST, SCA, secrets scanning, IaC scanning and DAST, plus periodic pentesting for logic flaws.
- Start small: secrets and dependencies first, SAST non-blocking, then tighten.
- Noise kills DevSecOps programs. Optimize for findings developers trust and can fix.
