Security engineer interview questions, and how to answer them

Security engineer interviews test whether you can think like an attacker and still ship like an engineer. Expect a mix of fundamentals, a hands-on exercise and at least one story about a time something went wrong. Here's what each round looks for and how to handle the questions that come up again and again.

The process

What happens in each round

  1. 1

    Recruiter screen

    What happens

    Whether your background matches the flavour of security they need, such as cloud, detection or application security, and whether you can describe your work without hiding behind acronyms.

  2. 2

    Technical phone screen

    What happens

    Fundamentals: networking, how common attacks work, authentication, encryption basics. They're listening for whether you explain the mechanism or just name it.

  3. 3

    Hands-on exercise

    What happens

    Can you actually do the work. This might be reviewing a code snippet for bugs, writing a small Python script to parse logs, or finding the misconfiguration in a Terraform file.

  4. 4

    System design or threat modeling round

    What happens

    How you break down a real system, spot where trust boundaries sit, and rank risks so you fix the dangerous ones first.

  5. 5

    Behavioural round with the hiring manager

    What happens

    How you work with developers who don't want your findings, how you behave during an incident, and whether you own your mistakes.

Questions you're likely to get

1.Walk me through what happens when you type a URL into a browser and press enter, and where security fits in.

Why they ask

It's an open door to show breadth. They want to see whether you know DNS, TLS, HTTP and cookies well enough to point out where each can be attacked.

How to answer

  • Trace the request: DNS lookup, TCP connection, TLS handshake, HTTP request, server response, rendering
  • Name a risk at each step, like DNS spoofing, certificate validation, session cookie theft, cross-site scripting
  • Mention the defences that apply, such as HSTS, secure and HttpOnly cookie flags, Content Security Policy
  • Keep it paced and ask if they want you to go deeper on any layer
2.How would you threat model a new feature that lets users upload profile pictures?

Why they ask

File upload is a classic source of real bugs. They want to see a structured approach, not a random list of fears.

How to answer

  • Draw the data flow: browser, API, storage bucket, image processing, CDN
  • Use a framework like STRIDE to walk each component
  • Call out specifics: malicious file types, oversized files, server-side request forgery in image libraries, public bucket permissions
  • Rank the risks and propose fixes like content-type validation, re-encoding images and private storage with signed URLs
3.Explain the difference between authentication and authorization, and give an example of a bug in each.

Why they ask

Broken access control causes a lot of real breaches. Mixing these two up is an instant red flag.

How to answer

  • Authentication proves who you are; authorization decides what you can do
  • Authentication bug example: a password reset token that never expires or can be guessed
  • Authorization bug example: an insecure direct object reference where changing an ID in the URL shows another user's invoice
  • Say how you'd catch each: code review, automated tests for access rules, and testing with a second account
4.You get an alert that an AWS access key was used from an unfamiliar IP address. What do you do?

Why they ask

This tests incident response instincts in a cloud setting, which is where much of the job lives now.

How to answer

  • Confirm quickly with CloudTrail: which key, which user, what API calls, from where
  • Contain first: disable or rotate the key, and check for newly created users, keys or roles the attacker may have left behind
  • Scope the damage: look for data access, new compute resources or changed security groups
  • Communicate early to the right people and keep a timeline
  • Close with root cause, like a key committed to GitHub, and a fix such as secret scanning in CI
5.Here's a code snippet. What's wrong with it?

Why they ask

Most teams want engineers who can read code. Typical snippets hide SQL injection, missing access checks or unsafe deserialization.

How to answer

  • Read it out loud and say what it's meant to do before hunting for bugs
  • Point to the exact line and name the class of bug
  • Explain how an attacker would exploit it with a sample input
  • Suggest the fix, like parameterised queries, and mention how to stop the pattern repeating, such as a Semgrep rule
6.How would you secure a Kubernetes cluster that runs our customer-facing services?

Why they ask

Container platforms are common and easy to misconfigure. They want to hear layered thinking, not one magic tool.

How to answer

  • Control plane: restrict API server access and use RBAC with least privilege
  • Workloads: run as non-root, drop capabilities, use admission policies to block privileged pods
  • Network: network policies so pods can't talk to everything by default
  • Supply chain: scan images, pin versions, sign what you deploy
  • Secrets: pull from a secrets manager rather than plain environment variables
7.How do you decide which vulnerabilities to fix first when there are hundreds open?

Why they ask

Every security team drowns in findings. They want someone who prioritises by real risk, not by the scanner's colour coding.

How to answer

  • Start with exposure: internet-facing systems before internal ones
  • Weigh exploitability, such as whether there's a known public exploit
  • Consider what the system holds or can reach
  • Group fixes, like one base image update that clears dozens of findings
  • Agree on service-level targets with the owning teams so it isn't a fight every time
8.Write a script that finds IP addresses with more than a handful of failed logins in this log file.

Why they ask

Automation is a big part of the engineer title. They're checking you can write working code under light pressure.

How to answer

  • Clarify the log format and what counts as a failure
  • Parse line by line and count with a dictionary or Counter in Python
  • Handle messy lines without crashing
  • Talk through how you'd turn it into a real detection rule in the SIEM
9.Tell me about a time a developer pushed back on a security finding.

Why they ask

The job depends on influence. A security engineer nobody listens to fixes nothing.

How to answer

  • Set up the situation and what was at stake for both sides
  • Show how you understood their constraint, like a launch date
  • Explain the compromise, such as a temporary control plus a fix date
  • Share the result and what you'd do differently
10.Describe the worst incident you've worked. What went wrong in how it was handled?

Why they ask

They want honesty and learning, not a hero story.

How to answer

  • Give a short, clear timeline of what happened
  • Say what your role was specifically
  • Name a real mistake, like slow escalation or missing logs
  • Describe what changed afterward because of the postmortem
11.How do you keep up with new vulnerabilities and attack techniques?

Why they ask

The field shifts constantly, so they want to know you learn on your own.

How to answer

  • Name specific sources, like vendor advisories, the CISA Known Exploited Vulnerabilities catalog or particular researchers' blogs
  • Mention hands-on practice, such as a home lab, capture the flag events or HackTheBox
  • Give one recent thing you learned and how you applied it at work

Mistakes that sink good candidates

Claiming you'd block every risky launch

Interviewers want someone who can ship alongside developers.

Naming tools without explaining what they actually detect or prevent

Describing offensive techniques you've used on systems you didn't have permission to test

Bluffing on a question you don't know

Saying 'I'm not sure, here's how I'd find out' lands far better.

Need more Security Engineer interviews to prep for?

HeroApply applies to Security Engineer jobs that match you, every day. 2,379 jobs are open today.

Find Security Engineer jobs