Skip to content
_CORE
AI & Agentic Systems Core Information Systems Cloud & Platform Engineering Data Platform & Integration Security & Compliance QA, Testing & Observability IoT, Automation & Robotics Mobile & Digital Banking & Finance Insurance Public Administration Defense & Security Healthcare Energy & Utilities Telco & Media Manufacturing Logistics & E-commerce Retail & Loyalty
References Technologies Blog Know-how Tools
About Collaboration Careers
CS EN DE
Let's talk

DevSecOps — Security in CI/CD Pipelines from First Commit

28. 01. 2026 Updated: 27. 03. 2026 15 min read CORE SYSTEMSai
DevSecOps — Security in CI/CD Pipelines from First Commit

In 2025, security incidents cost the global economy over $10.5 trillion. Average time from exploit to detection? 204 days. Meanwhile, according to Sonatype’s 2025 study, 96% of downloaded open-source components contain known vulnerabilities. The traditional model — write code, deploy, then have the security team audit — is dead. DevSecOps shifts security to the beginning of the development cycle, directly into the CI/CD pipeline, where fixing a vulnerability is 100× cheaper than in production. This article is a practical guide: which tools to use, where to integrate them in the pipeline, and how to build a security-first culture without slowing down delivery.

What is DevSecOps and Why “DevOps + Security Team” Isn’t Enough

DevSecOps isn’t about adding a security scan to the end of your CI/CD pipeline. It’s a fundamental shift in who is responsible for security — the answer is: everyone. Developers, ops engineers, and security specialists share responsibility for ensuring that code going to production is secure. Security stops being a gate at the end and becomes an integral part of every step from the first commit.

Historical context: DevOps emerged as a response to rigid handoffs between development and operations. DevSecOps is a natural evolution — it removes the same type of handoff between development and security. The traditional model looked like this: developers write code → QA tests → security audit at the end → list of findings → developers fix → re-audit → deploy. The entire cycle took weeks. In 2026, when teams deploy tens to hundreds of releases daily, this model is unsustainable.

The key principle of DevSecOps is shift-left — moving security controls as early as possible in the development cycle. The earlier you discover a vulnerability, the cheaper it is to fix. A vulnerability found in the IDE costs developers minutes. The same vulnerability found by penetration testing in production costs a sprint. And a vulnerability found by an attacker costs millions.

Shift-Left Security Pyramid — 6 Layers of Protection

Effective DevSecOps implementation builds on the principle of defense in depth — multiple layers of security controls, each catching what the previous one missed. The following 6 layers cover the entire software development lifecycle from IDE to runtime.

1

Pre-commit — Security Starts in the IDE

The first line of defense is the developer’s IDE. Plugins like Snyk IDE Extension, Semgrep, and GitLeaks scan code in real-time, even before committing. Pre-commit hooks (pre-commit framework) automatically trigger checks for secrets (API keys, passwords in code), basic SAST rules, and linting of security anti-patterns. Developers get feedback in seconds, not days. Implementation: detect-secrets for secrets scanning, semgrep --config auto for lightweight SAST, and gitleaks protect --staged as a pre-commit hook.

2

SAST — Static Application Security Testing in CI Pipeline

SAST analyzes source code without executing it. In 2026, key tools are Semgrep (open-source, custom rules, 30+ languages), SonarQube (code quality + security), CodeQL (GitHub-native, semantic analysis), and Snyk Code (AI-powered, real-time). SAST runs on every pull request — results are displayed directly in code review as inline comments. Critical: define a quality gate — PRs with Critical or High severity findings cannot be merged. But beware of false positives — overly strict rules initially lead to alert fatigue and developers start ignoring findings.

3

SCA — Software Composition Analysis and Supply Chain Security

Modern applications contain 70–90% open-source code. SCA tools scan dependencies for known vulnerabilities (CVE), licensing issues, and malicious packages. Snyk Open Source and Trivy are the de facto standards in 2026. Snyk monitors the dependency tree in real-time and automatically creates pull requests with fixes. Trivy scans not only dependencies but also container images, IaC configuration, and Kubernetes manifests — all in one tool. Supply chain security became priority number one after attacks like SolarWinds, Log4Shell, and xz-utils. Implement SBOM (Software Bill of Materials) — mandatory for U.S. government suppliers (Executive Order 14028), required by the EU’s Cyber Resilience Act.

4

Container & IaC Security — Infrastructure as Code, Vulnerabilities as Code

Every Docker image in the pipeline must pass vulnerability scanning. Trivy scans both OS packages and application dependencies in containers, Grype (from Anchore) offers a fast CLI-first approach. For Infrastructure as Code, Checkov (Bridgecrew) is critical — it scans Terraform, CloudFormation, Kubernetes, Helm, and Dockerfile for misconfigurations. tfsec (now part of Trivy) checks Terraform specifically. Typical findings: S3 buckets without encryption, security groups with 0.0.0.0/0, containers running as root, missing resource limits. All these checks belong in the CI pipeline as mandatory steps — deployment doesn’t proceed until they pass.

5

DAST — Dynamic Application Security Testing in Staging

DAST tests running applications from the outside — simulating an attacker. Unlike SAST, it finds runtime vulnerabilities: XSS, SQL injection, CSRF, broken authentication, SSRF. OWASP ZAP (open-source) and Nuclei (ProjectDiscovery) are the most widespread open-source tools. Commercially, Burp Suite Enterprise and Snyk API Security dominate. DAST typically runs on staging environments after deployment — either as scheduled jobs (nightly full scans) or lightweight smoke tests within the CI pipeline. Important: DAST is slower than SAST (minutes to hours vs. seconds) — don’t block the main pipeline with it, but parallelize and report asynchronously.

6

Runtime Security — Protection in Production

The final layer protects what slipped through all previous ones. Falco (CNCF) monitors container syscall activity in real-time — detecting anomalies like shell spawns in containers, unexpected network traffic, or file system changes. KubeArmor enforces security policies at the Kubernetes pod level. Admission controllers (OPA Gatekeeper, Kyverno) enforce policy-as-code: no pods without resource limits, no images without signatures, no privileged containers. Runtime security is a safety net — it’s not meant to replace previous layers but to catch zero-days and configuration drift.

DevSecOps Ecosystem Tools in 2026

The DevSecOps toolchain has dramatically consolidated over the past two years. Instead of dozens of point solutions, platforms are emerging that cover the entire lifecycle. Nevertheless: start with one tool per layer and expand as needed.

SAST & Code Analysis

Semgrep

Open-source SAST. Lightweight, custom rules in YAML, 30+ languages. Ideal for custom security rules.

Snyk Code

AI-powered SAST with real-time IDE scanning. Low false positives, developer-friendly UX.

CodeQL

GitHub-native semantic analysis. Advanced queries for finding vulnerability patterns across codebase.

SonarQube

Code quality + security. Quality gates, technical debt tracking, enterprise integration.

SCA & Supply Chain

Snyk Open Source

Dependency scanning with auto-fix PRs. Monitors post-deployment — alerts on new CVEs in existing deps.

Trivy

All-in-one scanner from Aqua Security. OS packages, deps, container images, IaC, SBOM generation. Open-source.

Sigstore / Cosign

Keyless signing for container images and artifacts. Provenance and attestation for supply chain integrity.

Syft

SBOM generator from Anchore. CycloneDX and SPDX formats. Integrates with Grype for vulnerability matching.

Container & Infrastructure Security

Checkov

IaC scanning — Terraform, K8s, Helm, Dockerfile. 1000+ built-in policies, custom policies in Python.

Falco

CNCF runtime security. Kernel-level syscall monitoring, real-time alerting on container anomalies.

Kyverno

Kubernetes-native policy engine. Validate, mutate, generate — without Rego (YAML-only policies).

OPA Gatekeeper

Policy-as-code for Kubernetes. Rego language, admission control, audit mode for gradual rollout.

Secrets Management & DAST

HashiCorp Vault

Enterprise secrets management. Dynamic secrets, PKI, encryption as a service, audit log.

OWASP ZAP

Open-source DAST. Automated spider + active scan. CI integration via Docker image.

Nuclei

Template-based vulnerability scanner. 8000+ community templates, fast, parallelizable.

GitLeaks

Secrets detection in git history. Pre-commit hook + CI scan. Detects API keys, tokens, passwords.

Reference CI/CD Pipeline with Integrated Security

The following architecture shows exactly where in the pipeline individual security controls belong. Key principle: fast feedback first — the fastest checks run first, slower ones in parallel or asynchronously.

Stage 1 — Pre-commit & Local

Secrets detection + lightweight SAST

Tools: GitLeaks, detect-secrets, Semgrep (IDE plugin)

Time: <5 seconds

Blocking: Yes — commit does not proceed if a secret is found

Developers get immediate feedback before pushing code. The pre-commit framework manages hooks centrally — the team shares configuration via .pre-commit-config.yaml in the repo.

Stage 2 — Pull Request / Merge Request

SAST + SCA + IaC scan

Tools: Semgrep CI, Snyk Open Source, Trivy (IaC mode), Checkov

Time: 30–120 seconds

Blocking: Yes for Critical/High, informational for Medium/Low

Results are displayed as inline comments in the PR. Code review includes security review — the reviewer sees findings directly alongside the relevant code. Auto-fix PRs from Snyk suggest specific versions without vulnerabilities.

Stage 3 — Build & Package

Container image scan + SBOM generation + signing

Tools: Trivy (image scan), Syft (SBOM), Cosign (signing)

Time: 30–60 seconds

Blocking: Yes — an image with a Critical CVE is not published to the registry

After the build step, the image is scanned for OS and application vulnerabilities. Syft generates an SBOM in CycloneDX format, stored as a build artifact. Cosign signs the image in a keyless manner via Sigstore — the admission controller in the cluster then rejects unsigned images.

Stage 4 — Deploy to Staging

DAST + smoke security tests + admission control

Tools: OWASP ZAP (baseline scan), Nuclei, Kyverno/OPA Gatekeeper

Time: 5–30 minutes (in parallel)

Blocking: ZAP baseline is blocking, full scan is informational

After deploying to staging, DAST runs. ZAP baseline scan (passive + spider) takes minutes and catches the OWASP Top 10. Full active scan runs in parallel and reports asynchronously. Kubernetes admission controllers validate manifests — no pod without labels, no image without a signature, no container running as root.

Stage 5 — Production

Runtime monitoring + continuous scanning + incident response

Tools: Falco, Snyk Container Monitor, Trivy Operator

Time: Continuous

Blocking: Alerting + auto-remediation

Falco monitors runtime behavior — detecting shell spawns in containers, crypto mining, data exfiltration. Snyk Container Monitor alerts when new CVEs appear in images running in production. Trivy Operator periodically scans the entire cluster. Integration with SIEM (Elastic SIEM, Splunk, Microsoft Sentinel) provides a centralized view and automated incident response.

Supply Chain Security — The Biggest Risk of 2026

Attacks on the software supply chain have become the fastest-growing attack vector. From SolarWinds (2020) through Log4Shell (2021), the xz-utils backdoor (2024) to the explosion of malicious npm/PyPI packages (2025) — attackers realized it is easier to compromise one dependency than thousands of end systems. In 2026, supply chain attacks are responsible for an estimated 45% of security incidents in enterprise environments.

Essential measures every organization should have:

  • SBOM for every artifact — generate Software Bill of Materials in CycloneDX or SPDX format with every build. Store them as build artifacts and regularly scan against an updated CVE database.
  • Dependency pinning and lock files — never latest, always explicit versions. Lock files (package-lock.json, Pipfile.lock, go.sum) must be part of the repository and code review.
  • Private registry with proxy/mirror — Artifactory or Nexus as a proxy for npm, PyPI, Maven. Enables caching, scanning, and policy enforcement at the entry point.
  • Image signing and verification — Cosign + Sigstore for keyless signing. Admission controller rejects unsigned images. SLSA (Supply-chain Levels for Software Artifacts) framework for provenance attestation.
  • Renovate/Dependabot with auto-merge — automated dependency updates with conditional auto-merge for patch versions if all tests pass.

Policy-as-Code — Security Rules as Versioned Code

Policy-as-code is the principle where security and compliance rules are not documents in Confluence, but executable code versioned in Git. The advantages are significant: rules are testable, auditable, versioned, and automatically enforced. Three dominant approaches in 2026:

  • OPA (Open Policy Agent) + Rego — a universal policy engine. Used for Kubernetes admission control (Gatekeeper), API authorization, Terraform plan validation (Conftest), and CI/CD pipeline decisions. Rego is a declarative language — powerful but with a steeper learning curve.
  • Kyverno — a Kubernetes-native alternative to OPA. Policies are written in YAML — validate, mutate, generate, and verify image resources. Lower barrier to entry for teams that don’t need Rego.
  • Sentinel (HashiCorp) — a policy-as-code framework integrated into Terraform Cloud/Enterprise. Enforcement at the Terraform plan level — checks what will change before it is applied.

Practical implementation: start in audit mode — policies log violations but don’t block. Analyze findings, eliminate false positives, then switch to enforce. Typical policies: no container running as root, mandatory resource limits, mandatory labels (owner, team, environment), mandatory network policy for every namespace, no LoadBalancer service without an annotation for internal load balancer.

Regulatory Context — NIS2, DORA, Cyber Resilience Act

In 2026, DevSecOps is not just a best practice — for many organizations, it is a regulatory requirement. Three key European regulations directly require practices that DevSecOps implements:

  • NIS2 (Network and Information Security Directive 2) — effective since October 2024 for essential and important entities. Requires supply chain security, vulnerability management, incident response, and risk management. A DevSecOps pipeline with SCA, SBOM, and continuous monitoring directly addresses these requirements.
  • DORA (Digital Operational Resilience Act) — effective since January 2025 for financial institutions. Requires ICT risk management, incident reporting, digital operational resilience testing, and third-party risk management. Automated security testing in CI/CD pipelines is the most efficient way to demonstrate continuous testing compliance.
  • Cyber Resilience Act (CRA) — taking effect gradually 2025–2027. Requires security by design for products with digital elements, a vulnerability handling process, and a mandatory SBOM. If your company develops software or hardware with a digital component for the EU market, the CRA directly applies to you.

A DevSecOps pipeline with integrated SAST/DAST, SCA, SBOM generation, policy-as-code, and audit logging provides a demonstrable and automated compliance framework. An auditor can see: every commit passed a security scan, no artifact has a critical vulnerability, every image is signed, policies are versioned in Git with a change history. This is a vastly better position than manual checklists and annual penetration tests.

Artificial intelligence is transforming DevSecOps in three key areas:

  • AI-assisted vulnerability triage — tools like Snyk and Semgrep use ML models to prioritize findings based on reachability analysis, exploitability scores, and application context. Instead of hundreds of findings, developers receive only the truly critical ones — reachable and exploitable vulnerabilities.
  • AI-generated fix suggestions — Snyk DeepCode AI and GitHub Copilot Autofix offer automated vulnerability fixes. Developers receive a PR with a specific fix, including an explanation of why the original code is vulnerable and what the fix addresses. Triage-to-fix time drops from hours to minutes.
  • LLM-powered security review — custom Semgrep rules generated using LLMs for specific codebase patterns. AI identifies business logic vulnerabilities that traditional SAST cannot see — such as incorrect access control checks or race conditions in payment workflows.

Important note: AI in security is a force multiplier, not a replacement. AI-generated fixes must be reviewed, AI triage can have false negatives, and LLM-based tools can themselves be targets of adversarial attacks (prompt injection in code). Use AI as an accelerator, not as an autonomous security reviewer.

Practical Implementation — From Zero to Mature DevSecOps in 12 Weeks

Don’t try to implement all 6 layers at once. The following roadmap is iterative — each step delivers immediate value and builds on the previous one.

Weeks 1–2 — Quick Wins

Secrets detection + dependency scanning

Deploy GitLeaks as a pre-commit hook and CI step. Activate Dependabot or Renovate for automated dependency updates. Enable GitHub Advanced Security or GitLab SAST (built-in, zero config). These three steps resolve 60% of the most common vulnerabilities with minimal effort. Output: no secrets in code, automated dependency updates, basic SAST coverage.

Weeks 3–4 — SAST & SCA Quality Gates

Security gates in pull request workflow

Deploy Semgrep or Snyk Code as a mandatory CI check on pull requests. Define a quality gate: Critical = block, High = block, Medium = warn, Low = info. Deploy Snyk Open Source or Trivy for SCA with automated fix PRs. Important: communicate the changes to the team — explain why, show examples of findings, hold a workshop. DevSecOps without developer buy-in is security theater.

Weeks 5–8 — Container & IaC Security

Image scanning, SBOM, IaC validation

Add Trivy image scan to the build pipeline. Implement SBOM generation using Syft. Deploy Checkov for IaC scanning. Set up Cosign image signing. On the Kubernetes cluster, deploy Kyverno in audit mode — monitor violations but don’t block yet. After 2 weeks of analysis, switch critical policies to enforce.

Weeks 9–12 — DAST, Runtime & Metrics

Dynamic testing, runtime monitoring, security dashboard

Deploy OWASP ZAP baseline scan on staging after every deploy. Set up nightly full DAST scans with Nuclei. Deploy Falco for runtime security monitoring. Create a security dashboard (Grafana + data from all tools) — MTTR for security findings, number of critical findings over time, SCA coverage, percentage of signed images. This dashboard is your compliance evidence and continuous improvement tool.

Success Metrics — What to Measure

<24h

MTTR for Critical findings

100%

SAST/SCA coverage in CI

0

Secrets in codebase

<5%

False positive rate

Additional key metrics: Mean Time to Remediate (MTTR) per severity level, vulnerability escape rate (findings discovered in production vs. in the pipeline), dependency freshness (average age of dependencies), SBOM coverage (percentage of artifacts with SBOM), and policy compliance rate (percentage of pods meeting all policies). Measure these metrics continuously, report monthly, and set improvement targets on a quarterly basis.

Conclusion: Security as a Competitive Advantage

DevSecOps in 2026 isn’t optional — it’s table stakes. Regulations require it, attackers demand it, and customers expect it. But organizations that implement DevSecOps correctly gain more than compliance: faster delivery (fewer security blockers at the end), lower costs (fixes in IDE vs. production), higher customer trust, and security as a competitive advantage.

The key to success? Developer experience. Security tools must be fast, accurate, and integrated where developers work — IDE, pull requests, CLI. If security slows down delivery, developers will circumvent it. If security accelerates delivery (auto-fix, clear guidance, no false positives), developers become your best security champions.

Start small: GitLeaks + Dependabot + Semgrep. Three tools, one day’s work, immediate value. Then iterate.

Our Experience: DevSecOps Pipeline for a Fintech Client

For a fintech client, we designed and implemented a complete DevSecOps pipeline. Concrete results:

  • SAST (Semgrep), DAST (ZAP), SCA (Trivy), secrets scan (Gitleaks) — fully automated security toolchain in CI/CD
  • Vulnerabilities caught in CI from 15% to 94% — shift-left detection before merge to main branch
  • Mean-time-to-remediate from 12 days to 4 hours — automated tickets with fix guidance directly in PRs
  • Zero critical CVEs in production — no critical vulnerability passed through security gates
  • Policy-as-code — OPA policies enforce standards automatically without manual reviews
devsecopsshift-left securityci/cdsast/dastsupply chain
Share:

CORE SYSTEMS

We build core systems and AI agents that keep operations running. 15 years of experience with enterprise IT.

Need help with implementation?

Our experts can help with design, implementation, and operations. From architecture to production.

Contact us
Need help with implementation? Schedule a meeting