61. What is DevSecOps, and how does it change a CI/CD pipeline?
A delivery process currently performs one security review immediately before production release. Explain how a DevSecOps approach changes ownership and places preventive, detective, and verification controls throughout planning, development, build, test, artifact publication, deployment, and operations. Distinguish continuous security integration from merely adding one scanner or making a separate security team the final gate.
DevSecOps moves security from one final review into every stage of delivery. Engineering and security teams share ownership. The pipeline continuously prevents, detects, and verifies security issues using identity controls, code and dependency checks, secret protection, trusted artifacts, policy enforcement, deployment verification, and runtime monitoring.
A traditional delivery process may wait until software is almost ready for customers before checking whether it is safe. That makes problems appear late, when they are harder and more expensive to fix. DevSecOps changes this by making safety part of everyday engineering work. The people who plan, build, test, release, and operate software share responsibility. Checks happen repeatedly as work moves forward. Some controls stop unsafe changes, some discover possible problems, and others confirm that the released software is the approved version. This gives teams earlier feedback, clearer ownership, and stronger evidence when problems occur.
- Which source-control, CI/CD, artifact registry, deployment, and cloud platforms are in scope?
- Which security or compliance findings must block a release, and which may be tracked for later remediation?
- Does the organization already use workload identity, artifact signing, provenance, dependency scanning, policy-as-code, or centralized secrets management?
- Who owns remediation after a security issue is found: the application team, platform team, operations team, or security team?
DevSecOps means integrating security into the normal development and operations workflow instead of performing one security review immediately before production. The biggest change is ownership. Developers, platform engineers, operations engineers, and security specialists share responsibility throughout the software lifecycle.
I would explain the pipeline using three kinds of controls.
- Preventive controls stop unsafe actions before they progress. Examples include protected branches, mandatory code review, least-privilege permissions, approved dependency rules, secret detection, infrastructure policy checks, and deployment authorization policies.
- Detective controls identify suspicious or unsafe conditions. Examples include static application security testing, dependency vulnerability scanning, container or artifact scanning, configuration checks, audit logs, runtime alerts, and monitoring for unexpected behavior.
- Verification controls confirm that the software being promoted is the software that passed the approved process. Examples include immutable artifacts, cryptographic signatures, build provenance, attestations, deployment verification, and post-deployment health and security checks.
The controls should appear throughout the lifecycle.
Planning: The team identifies important assets, trust boundaries, likely threats, required security controls, and ownership before implementation begins. Security requirements become normal engineering requirements instead of a last-minute checklist.
Development: Developers use peer review, protected branches, secure coding practices, secret detection, and focused static analysis. Authentication answers, "Who is this user or workload?" Authorization answers, "What is this identity allowed to do?" Human access should use the organization's reviewed identity service and phishing-resistant MFA where appropriate. Automation should prefer short-lived federated credentials or managed workload identity over embedded long-lived keys.
Build: CI runners should receive only the permissions required for the current job. Build environments should be isolated where practical. Dependencies should be pinned or otherwise reproducibly resolved and checked against organizational policy and known vulnerability information. Untrusted pull requests, configuration, webhooks, archives, artifacts, and serialized data should be treated as hostile input. Parsers should use constrained formats and explicit schemas where practical. Build scripts must avoid passing untrusted values directly to shells, file paths, deserializers, or network destinations because doing so can enable command injection, path traversal, unsafe deserialization, or server-side request forgery.
Test: Security checks run with the normal test process where they provide useful signal. This can include static analysis, dependency checks, infrastructure-policy tests, authorization tests, configuration validation, and application-specific security tests. No single scanner provides complete protection. Different controls address different threats, and scanner findings still require prioritization and ownership.
Artifact publication: The pipeline should build an artifact once and promote that same immutable artifact through environments rather than rebuilding separately for production. The artifact can be accompanied by provenance that records how it was built and by a cryptographic signature or attestation that deployment systems can verify. The registry should enforce appropriate access controls and preserve audit evidence.
Deployment: The deployment system verifies the artifact identity, required provenance or attestations, policy results, target environment, and caller authorization before promotion. Deployment credentials should be short lived and narrowly scoped. Network controls, admission policies, runtime privileges, and platform hardening should limit what a compromised workload can reach or change. Required high-confidence security verification should fail closed: if an artifact cannot be verified, the system should not silently deploy it.
Operations: Security continues after release. The team collects audit logs, deployment records, identity activity, runtime signals, and security alerts while avoiding secrets or sensitive credentials in logs. Findings must have owners and response procedures. Teams should be able to determine what changed, which human or workload identity performed an action, which artifact was deployed, and whether that artifact passed the approved delivery process.
This is different from adding one scanner to CI. A scanner provides only one type of detective control. It does not automatically provide secure authentication, correct authorization, least privilege, secrets management, artifact integrity, provenance, deployment policy, runtime monitoring, or ownership of findings.
It is also different from making the security team a separate final gate. Security specialists should define standards, build reusable controls, review high-risk exceptions, provide expertise, and help teams respond to threats. Application and platform teams still own the security of the systems they build and operate.
For 2026, I would assume a modern delivery platform can support protected source changes, centralized human identity, MFA, short-lived workload credentials or federation, centralized secret storage, immutable artifact registries, automated scanning, policy enforcement, artifact signing or attestations, and centralized audit logging. I would use repository-pinned tool and policy versions when the environment supplies them rather than assuming a particular vendor or importing one platform's security guarantees into another.
The main tradeoff is delivery speed versus assurance. If every low-confidence scanner warning blocks every build, teams can suffer alert fatigue and may try to bypass controls. If nothing blocks releases, serious risks can reach production. I would therefore use risk-based gates. Deterministic failures such as exposed secrets, unauthorized deployment attempts, invalid required signatures, failed required provenance verification, or clearly prohibited configurations should normally block progression. Lower-confidence findings can create tracked remediation work with an owner, severity, due date, and reviewed exception process.
Safe failure behavior is important. If a required authorization, signing, policy, or provenance check cannot complete, the pipeline should not silently treat that as success. The failure should be logged without secrets, visible to the responsible team, and recoverable through an approved and auditable exception process. Security controls should also be tested periodically so the organization knows they still work instead of assuming that a configured tool provides permanent protection.
- Map the delivery lifecycle from planning through production and identify important assets and trust boundaries.
- Assign shared ownership across application, platform, operations, and security teams.
- Add preventive controls such as protected changes, least privilege, secret protection, dependency rules, and policy-as-code.
- Add detective controls such as code, dependency, configuration, artifact, and runtime checks.
- Build once and publish an immutable artifact.
- Record build provenance and sign or attest artifacts when supported by the platform.
- Verify artifact identity, authorization, required policy, provenance, and environment conditions before deployment.
- Use short-lived workload identities and narrowly scoped permissions instead of embedded long-lived credentials.
- Monitor production with audit logs and runtime security signals without exposing secrets.
- Assign owners to findings and define blocking, remediation, exception, and incident-response paths.
- Regularly test and review controls to confirm that they remain effective.
DevSecOps does not have normal algorithmic time or memory complexity. Its main costs are pipeline duration, CI compute, storage for logs and evidence, operational effort, and maintenance. More scanners and verification steps can slow builds and consume more resources. Security policies, identities, signing systems, exceptions, and tools also require maintenance. Teams usually keep feedback fast by running inexpensive high-confidence checks early and heavier checks at appropriate later stages. They also avoid rebuilding artifacts unnecessarily. Too many noisy findings create alert fatigue, while too few controls leave gaps. The long-term cost includes updating tools and policies, reviewing exceptions, fixing findings, retaining required audit evidence, and verifying that controls still function.
Interviewers want to know whether the candidate understands that DevSecOps is an engineering and ownership model, not a single security product. They evaluate whether the candidate can distribute appropriate security controls across the delivery lifecycle, use least privilege and secure identities, protect the software supply chain, distinguish preventive, detective, and verification controls, define safe release gates, and explain why product and platform teams must share responsibility with security specialists.
A common mistake is saying DevSecOps means adding a vulnerability scanner to CI. That provides only one detective control. Another mistake is leaving all security ownership with a separate security team or making that team the only final approval gate. Other mistakes include giving CI runners excessive privileges, confusing authentication with authorization, storing long-lived credentials in repositories or pipeline variables, rebuilding a different artifact for production, trusting artifacts without required provenance or integrity verification, accepting untrusted pipeline inputs without safe parsing, passing untrusted values into shell commands or file paths, logging secrets, blocking releases on every low-confidence finding, allowing required verification failures to fail open, and assuming one CI, cloud, or Kubernetes platform's security guarantees automatically apply to another.
Start with the ownership change: security becomes part of every engineering stage instead of a final handoff. Then organize the answer around preventive, detective, and verification controls. Give concrete examples such as least-privilege workload identity, dependency checks, immutable signed artifacts, policy enforcement, and runtime monitoring. Finish by explaining why one scanner is not DevSecOps and why release gates should be risk based.










