DevSecOps engineer interviews test whether you can make a delivery pipeline safer without slowing it down, so the strongest candidates answer with pipeline designs, trade-offs and evidence rather than lists of tools. This guide sets out the questions hiring managers ask in each part of the loop, what a strong answer contains, and the mistakes that cost candidates offers. It assumes you already know what the job involves; if you are still deciding whether the role suits you, start with the DevSecOps Engineer Career Guide, which covers skills, routes in and progression.
The questions below are grouped the way most loops run: pipeline and build security, secrets and pipeline identity, software supply chain, testing and vulnerability flow, infrastructure as code and containers, then culture and scenarios. Use them to rehearse aloud, and for each one prepare a short story from your own work that shows a decision you made and what changed as a result.
Key takeaways
- Interviewers want to hear how you think about risk in a pipeline, not how many scanners you can name. Lead with the threat, then the control, then how you measured it.
- Pipeline identity is now a core topic. Expect questions on long-lived tokens, short-lived federated credentials, runner isolation and who can change what a pipeline does.
- Supply chain questions usually cover provenance, signing, dependency pinning and SBOMs. Know what each one proves and what it does not.
- Strong answers mention developer experience. A control that developers route around is a failed control, and hiring managers listen for that awareness.
- Bring numbers where you can: time to fix, percentage of builds with a gate, false positive rate, number of secrets removed. Vague claims of "improving security" are weak.
- Prepare two or three questions for the interviewer about how security work is prioritised and who owns pipeline configuration.
How DevSecOps engineer interviews are structured
Most loops for this role have four or five stages. A recruiter or hiring manager screen checks motivation and broad fit. A technical screen, often with a senior engineer, walks through your background and probes one or two areas in depth. A practical exercise follows: sometimes a take-home review of a pipeline file or a Dockerfile, sometimes a live session where you are shown a repository and asked what you would change. A system design round asks you to secure a delivery platform end to end. A final round covers collaboration, influence and how you handle disagreement with development teams.
The practical exercise is where most candidates win or lose. Interviewers usually plant a handful of issues: a secret in plain text, a third-party action referenced by a mutable tag, a container running as root, a pipeline that runs untrusted pull request code with write permissions, an infrastructure template with a public storage bucket. They score you on how many you find, how you rank them, and whether your fixes are practical. Talk through your reasoning as you go, and say which issue you would fix first and why.
Seniority changes the emphasis. Junior and mid-level candidates are judged mainly on hands-on fluency with one CI system, one cloud and common scanning tools. Senior candidates are expected to design guardrails for many teams, choose between central and team-owned controls, and explain how they would roll out a change across hundreds of repositories without breaking delivery.
Pipeline and build security questions
"Walk me through how you would secure a CI/CD pipeline from commit to production."
A strong answer moves through the stages in order and names a threat at each one. Source: branch protection, required reviews, signed commits where useful, and restrictions on who can edit pipeline definitions. Build: isolated, ephemeral runners, least privilege job permissions, pinned dependencies and actions, and no secrets exposed to untrusted code. Test: security checks with clear thresholds and an owner for every finding. Release: signed artefacts with provenance, and promotion between environments rather than rebuilding. Deploy: separate credentials per environment, approvals for production, and audit logs that show who deployed what. Close by explaining how you would check that the controls stay in place, for example by policy checks on pipeline configuration.
Mention the OWASP Top 10 CI/CD Security Risks as a way to structure a review. Interviewers like candidates who can map their own experience to a recognised list without reciting it.
"What is poisoned pipeline execution and how do you prevent it?"
Explain that an attacker who can change pipeline configuration or files the pipeline runs, often through a pull request, can make the build execute their commands with the pipeline's privileges. Prevention includes running untrusted contributions with read-only permissions and no secrets, requiring approval before workflows run for outside contributors, separating build jobs that handle untrusted code from jobs that publish, and protecting the files that define the pipeline with code owner review.
"Self-hosted runners or managed runners?"
There is no single right answer, and saying so is part of a good response. Managed runners are usually ephemeral and patched by the provider, but may not reach private networks. Self-hosted runners give network access and control but bring risks: persistence between jobs, shared credentials on the host and lateral movement from a compromised build. A strong answer favours ephemeral self-hosted runners, one job per runner, separate runner groups for sensitive repositories, and no long-lived cloud credentials on the host. Our guide to Self-hosted CI/CD Runners and Build Agents covers the controls in detail.
Secrets and pipeline identity questions
This is the area where candidates most often fall short, and it is increasingly where breaches start. Pipelines hold some of the most powerful non-human identities in an organisation: deploy keys, cloud roles, registry tokens and signing keys.
"How do you stop secrets leaking into source code?"
Cover prevention, detection and response. Prevention: a secrets manager with runtime injection, short-lived credentials, developer tooling that blocks commits containing secrets. Detection: scanning on push and across history, plus scanning of build logs and container images. Response: a documented process to revoke and rotate, then to check whether the secret was used. The key point interviewers listen for is that deleting a secret from the repository is not enough; once committed, it must be treated as exposed and revoked. Our Git Secret Scanning Guide covers tooling and triage.
"How should a pipeline authenticate to a cloud provider?"
The modern answer is federation: the CI platform issues a short-lived signed token for the job, and the cloud provider exchanges it for temporary credentials after checking claims such as the repository, branch and environment. This removes stored cloud keys from the CI system. A strong candidate adds that trust conditions must be tight. A trust policy that accepts any branch, or any repository in an organisation, lets a feature branch or a forked workflow assume a production role. Mention that each environment should have its own role with only the permissions that stage needs.
"Who owns the identities your pipelines use?"
This question tests governance thinking. Good answers describe an inventory of pipeline credentials, a named owner for each, an expiry or rotation rule, and a review when a repository is archived or a team changes. Candidates who can explain why orphaned deploy keys and personal access tokens tied to former staff are dangerous stand out. For a wider view, see the CI/CD Pipeline Identity Security Guide.
Software supply chain questions
"What does an SBOM give you, and what does it not?"
An SBOM lists the components in a piece of software so you can answer "are we affected?" quickly when a new vulnerability is published. It does not prove the components are safe, does not show whether vulnerable code is reachable, and is only as accurate as the tool that generated it. Strong answers say where SBOMs are generated (at build time, from the artefact), where they are stored, and how they are queried during an incident.
"Explain provenance and signing."
Provenance is a signed record of how an artefact was built: the source, the build platform and the steps. Signing proves the artefact has not changed since it was signed and links it to an identity. Mention SLSA v1.0 Security Levels as a way to describe increasing assurance about the build, and explain that verification at deploy time is what turns signing into a control. An artefact that is signed but never verified gives little protection.
"How do you manage third-party dependencies?"
Cover pinning versions and using lock files, pinning actions and base images by digest rather than by tag, using an internal proxy or mirror, automated update pull requests with tests, and a policy for new dependencies. Senior candidates also discuss typosquatting, dependency confusion between internal and public package names, and maintainer account takeover as threats the controls address.
The NIST guidance SP 800-204D on integrating supply chain security into DevSecOps pipelines is a useful reference to name if asked which frameworks you follow.
Security testing and vulnerability flow questions
"Which security tests run where in the pipeline?"
Interviewers want placement and reasoning. Fast checks such as secret scanning, linting and lightweight static analysis run on every pull request. Dependency and container image scanning run on build. Dynamic testing runs against a deployed test environment. Deeper static analysis and infrastructure scanning may run on a schedule if they are slow. A strong answer explains which results block a merge and which create a ticket, and why.
"How do you deal with false positives and alert fatigue?"
Describe tuning rules, suppressing with a recorded reason and an expiry date, starting new gates in report-only mode before enforcing, and measuring the false positive rate so you can show improvement. Say that developers should be able to see why a finding matters and how to fix it in the same place they see the failure.
"A critical vulnerability is published in a library you use everywhere. What do you do?"
Walk through finding affected services from SBOMs or dependency data, checking exploitability and exposure, prioritising internet-facing and high-privilege services, coordinating patches through automated pull requests, and confirming deployment. Mention communication: a status channel, a single owner and a clear finish line.
Infrastructure as code and container questions
"How do you stop insecure infrastructure reaching production?"
Policy as code checks on infrastructure templates before merge, a second check on the planned change before apply, and detection of drift in the live environment. Strong answers mention that the pipeline identity applying infrastructure changes is extremely powerful and should be restricted to the pipeline, with break-glass access for humans that is logged and reviewed.
"What would you look for in a Dockerfile review?"
Base image source and pinning, running as a non-root user, minimal packages, no secrets in build arguments or layers, multi-stage builds to keep build tools out of the final image, and health checks. Add runtime points: read-only file systems, dropped capabilities and resource limits set in the orchestrator.
"How do workloads in Kubernetes get access to cloud services?"
Explain workload identity: a service account in the cluster is mapped to a cloud identity, and pods receive short-lived credentials without stored keys. Mention scoping each service account to one workload and avoiding shared accounts across namespaces.
Culture, collaboration and scenario questions
DevSecOps is as much about influence as tooling. Expect behavioural questions such as "tell me about a time a development team pushed back on a security control." Use a short structure: situation, what you did, the result and what you learned. The best stories show you changed the control to fit the workflow without dropping the security outcome.
Scenario: "A team wants to bypass a failing security gate to ship a release tonight."
A strong answer avoids both extremes. Assess the finding quickly; if it is a real high-risk issue in reachable code, hold the release and help fix it. If the risk is low or a false positive, allow a documented, time-limited exception with an owner and a follow-up ticket. Then ask why the gate surprised the team at release time and move the check earlier.
Scenario: "You discover a pipeline token with organisation-wide admin rights that has existed for three years."
Check whether it has been used and from where, identify every pipeline that depends on it, replace it with scoped or federated credentials, revoke it, and review logs for misuse. Then explain the process change that stops this happening again, such as expiry rules and an inventory of pipeline credentials.
Scenario: "Design security for a new internal developer platform."
Senior candidates should describe paved road templates with security built in, central policy checks, golden base images, shared identity patterns for pipelines and workloads, and metrics on adoption. Explain how teams that leave the paved road are handled.
Questions to ask the interviewer
- Who owns pipeline configuration today: platform, security or each product team?
- How are security findings prioritised against feature work, and who decides?
- Which security gates block merges today, and how were they introduced?
- How do pipelines authenticate to cloud and registries now, and is there a plan to change that?
- What would success look like for this role after six months?
Common failure patterns
- Tool lists instead of reasoning. Naming scanners without saying what risk they reduce or where they run.
- Ignoring pipeline identity. Treating secrets as a storage problem and missing token scope, federation trust conditions and ownership.
- Blocking everything. Proposing hard gates for every finding with no thought for false positives or developer experience.
- No measurement. Unable to say how you would know a control works.
- Signing without verification. Describing artefact signing but not where signatures are checked.
- Weak stories. Behavioural answers that describe what the team did rather than your own decisions.
Practitioner checklist
- Prepare one end-to-end pipeline security walkthrough you can deliver in five minutes.
- Rehearse explaining federated pipeline credentials and trust conditions on a whiteboard.
- Practise reviewing a pipeline file and a Dockerfile against the clock and ranking what you find.
- Have numbers ready for at least two improvements you delivered.
- Prepare three behavioural stories: a pushback, an incident and a rollout across many teams.
- Read the employer's engineering blog or public repositories to learn their CI system and cloud.
- Write down three questions for the interviewer about ownership and prioritisation.
For general preparation that applies to any security role, see the Cyber Security Interview Preparation Guide. Candidates moving between application and platform roles may also find the Application Security Engineer Interview Questions useful.
Standards and references
- NIST SP 800-218 Secure Software Development Framework (SSDF) Version 1.1
- NIST SP 800-204D, Strategies for the Integration of Software Supply Chain Security in DevSecOps CI/CD Pipelines
- OWASP Top 10 CI/CD Security Risks
- OpenSSF SLSA v1.0 Security Levels
- NIST SP 800-53 Rev. 5 (SA-11 Developer Testing and Evaluation, SR-3 Supply Chain Controls and Processes)
- NIST NICE Framework current versions
Related NHI Mgmt Group resources: DevSecOps Engineer Career Guide · DevSecOps Guide · CI/CD Security Guide · Cloud Security Engineer Interview Questions