Security Engineer Interview Prep: Questions and a Mock Test
Security engineering interviews reward specificity more than almost any other technical loop. Saying that you would "sanitise the input" is the answer that ends a conversation; naming the parameterised query, saying which layer performs the encoding, and explaining what the encoding is for continues it. This page covers what the rounds test, one very current detail that catches people out, and finishes with a graded mock across six areas.
How the process is structured
| Round | Length | What it tests |
|---|---|---|
| 1.Application security[1] | Not published | Vulnerability classes and their real fixes, usually anchored on the OWASP Top 10. Expect to be asked about a specific class in depth rather than to recite the list, and to review a short piece of code and say what is wrong with it. |
| 2.Cryptography and authentication[3] | Not published | Password storage and why a general-purpose hash is the wrong tool, symmetric versus asymmetric use cases, TLS at the level of what the handshake achieves, session and token handling, and the difference between encryption, hashing, MACs and signatures. |
| 3.Secure design and supply chain[4] | Not published | Threat modelling a described system, trust boundaries, and how you would secure a build and release path. Software supply chain failures rank third in the OWASP Top 10 2025, and NIST's Secure Software Development Framework, SP 800-218 v1.1, is the usual reference for organisation-level process. |
| 4.Detection and incident response[1] | Not published | What you would log and alert on, how you would detect a described attack, and how you would run an incident. The 2025 category name, Security Logging and Alerting Failures, signals the emphasis: collection without detection is not a control. |
Bracketed markers point to the dated sources at the end of this article. Loops change; check the retrieval dates before relying on a round count.
Know which OWASP Top 10 you are quoting
This is the fastest currency check an interviewer has, and a lot of preparation material is out of date. The OWASP Top 10 was revised, and the 2025 edition is now the current release. Its order is: A01 Broken Access Control, A02 Security Misconfiguration, A03 Software Supply Chain Failures, A04 Cryptographic Failures, A05 Injection, A06 Insecure Design, A07 Authentication Failures, A08 Software or Data Integrity Failures, A09 Security Logging and Alerting Failures, A10 Mishandling of Exceptional Conditions.
Compare that with the 2021 edition: A01 Broken Access Control, A02 Cryptographic Failures, A03 Injection, A04 Insecure Design, A05 Security Misconfiguration, A06 Vulnerable and Outdated Components, A07 Identification and Authentication Failures, A08 Software and Data Integrity Failures, A09 Security Logging and Monitoring Failures, A10 Server Side Request Forgery.
The movements tell a story worth being able to narrate. Broken access control stayed at number one. Injection fell from third to fifth, which reflects parameterised queries and ORMs becoming the default rather than injection ceasing to matter. Misconfiguration rose to second. The vulnerable-components category broadened into software supply chain failures at third, which is the single most visible change in the industry's threat model over the past few years. And server-side request forgery no longer stands as its own category, while mishandling of exceptional conditions appears as a new one.
Quoting the 2021 order confidently is not a disaster. Quoting it while insisting it is current is.
Injection, and the answer that actually scores
Injection remains a staple question even at fifth place, because the quality of the answer varies so widely.
The weak answer is escaping. The strong answer is separating code from data so the parser never treats attacker input as syntax. For SQL that means parameterised queries or prepared statements, where the query structure is fixed before any value is bound. Escaping is a fallback for the cases where parameterisation is genuinely impossible, such as a dynamic table name, and those cases need an allowlist rather than a filter.
The follow-up is usually cross-site scripting, and the correct framing is contextual output encoding rather than input sanitisation. The same string is safe in one context and dangerous in another, so encoding belongs at the point of output and has to match the context: HTML body, HTML attribute, JavaScript, URL, CSS. A single sanitising function applied on the way in cannot know where the value will eventually land. Content Security Policy is the defence in depth layer, not the fix.
Be ready for the variants: second-order injection where the payload is stored and executed later, and injection into things that are not SQL at all, such as LDAP filters, OS commands, template engines, and NoSQL query documents.
Password storage and cryptography, precisely
Password storage is where interviewers separate people who have read about cryptography from people who have used it.
General-purpose hash functions such as SHA-256 are the wrong tool, because they are designed to be fast and hardware can compute them in enormous quantities. Password hashing needs a function that is deliberately slow and memory-hard, so the current answers are Argon2id, scrypt, or bcrypt, with parameters tuned to the hardware. A salt, unique per password and stored alongside the hash, defeats precomputed rainbow tables and stops identical passwords producing identical hashes. A pepper is a secret held outside the database, which helps only if the database leaks and the secret does not.
On transport, TLS 1.3 is the current baseline and the useful things to know are the shape rather than the byte layout: a reduced handshake, forward secrecy by requiring ephemeral key exchange, and the removal of the older cipher suites and negotiation options that produced a decade of downgrade attacks.
One distinction interviewers probe often: encryption provides confidentiality, hashing is one-way and provides integrity when combined with a key as a MAC, and a signature provides integrity plus authenticity plus non-repudiation. Candidates who use "encrypt" for all three tend to be probed until it shows.
The supply chain, now near the top
Software supply chain failures sitting at A03 in the 2025 list is a good prompt for what to prepare. The threat model runs from dependencies you chose, through dependencies you did not know you had, to the build system itself.
Worth being able to discuss concretely: transitive dependencies and why a lockfile matters, typosquatting and dependency confusion where a public package shadows a private name, compromised maintainer accounts, and post-install scripts that execute at install time rather than at run time. On the build side, the risk is that a compromised build produces a signed artefact that every downstream check trusts, which is why reproducible builds, provenance attestations and a software bill of materials have become mainstream asks rather than niche ones.
NIST's Secure Software Development Framework, published as SP 800-218 version 1.1 in February 2022, is the reference to name when an interviewer asks how you would structure secure development across an organisation rather than fix one bug.
The judgement question underneath this is usually about patching. A scanner reporting hundreds of vulnerable dependencies is normal, and treating them all as equally urgent is a way of achieving nothing. Being able to reason about exploitability, whether the vulnerable code path is reachable, and what compensating controls exist is what a security engineer is actually for.
Detection, logging and the incident round
The 2025 list renames the logging category to Security Logging and Alerting Failures, and the word alerting is the point. Logs that nobody looks at are an archaeology tool, not a control.
Expect questions about what you would log for a given feature, and the good answers cover authentication events including failures, authorisation denials, changes to permissions and to security configuration, and access to sensitive data. Equally important is what not to log: credentials, tokens, full card numbers, and personal data that the logging pipeline then spreads across systems with weaker controls than the original store.
Detection questions usually want a threat-informed answer. Being able to describe an attack in stages, initial access, execution, persistence, privilege escalation, lateral movement, exfiltration, and to say what evidence each stage leaves, is more valuable than naming tools. MITRE ATT&CK is the shared vocabulary for exactly that decomposition.
The incident round is behavioural. Interviewers listen for containment before eradication, for preserving evidence before rebuilding a host, for knowing who has authority to disconnect a production system, and for a communications path that includes legal and regulatory obligations. A candidate whose first instinct is to reimage the machine has destroyed the only copy of how the attacker got in.
What they actually ask
1.Threat model a web application that lets users upload documents and share them by link.
What a strong answer coversStrong answers start by drawing trust boundaries and enumerating assets rather than listing vulnerabilities. On upload: file type validation that does not rely on the extension or the client-supplied content type, size limits, storing files outside the web root or in object storage so they are never executed, and scanning. On sharing: whether an unguessable link is being used as an access control, which makes it a bearer credential that leaks through referrers, browser history and chat previews. On access control: verifying authorisation server-side on every request rather than hiding the UI, which is the core of the A01 category. Also worth raising are stored XSS through file names and document contents, server-side request forgery if the app fetches remote URLs, and the privacy question of what the URL reveals.
2.A dependency scanner reports 340 vulnerabilities in your service. What do you do on Monday morning?
What a strong answer coversThe expected instinct is triage rather than mass upgrade. Good answers separate direct from transitive dependencies, check whether the vulnerable code path is actually reachable from the application, and weight by exposure: is the component in a service reachable from the internet, does it process untrusted input, does an exploit exist in the wild. They then split the work: a small set that needs fixing now, a larger set that goes into normal maintenance, and a structural fix so the number does not regrow, usually automated dependency updates with good test coverage. The senior signal is saying out loud that a backlog of 340 undifferentiated findings is itself the problem, because it trains everyone to ignore the scanner.
3.How would you store user passwords, and how would you migrate an existing SHA-256 based store?
What a strong answer coversFor the target state: a memory-hard, deliberately slow function, Argon2id, scrypt or bcrypt, with parameters tuned so verification takes a meaningful fraction of a second on production hardware, plus a unique per-user salt stored with the hash. The migration is the interesting half, because you cannot recover the plaintext. The standard approaches are to wrap the existing hash, storing Argon2 applied to the SHA-256 output and recording the scheme version, which upgrades every record immediately, or to rehash opportunistically at next successful login and force a reset for accounts that never return. Strong answers record an algorithm identifier and parameters alongside each hash so future migrations are possible, and mention rate limiting and breached-password checks as the controls that matter more than the hash for real attacks.
4.Your monitoring shows a service account authenticating successfully from a country you have no presence in. Walk me through the next hour.
What a strong answer coversExpected structure: confirm before acting, since a false positive that disables a production service account is its own incident. Then containment scoped to the blast radius, rotating the credential and revoking active sessions and tokens, rather than immediately rebuilding hosts. Preserve evidence first, memory and logs before reimaging, because the reimage destroys the answer to how they got in. Scope the compromise: what that account can reach, what it actually did, whether anything else authenticated with the same credential. Strong answers name the human process too, who declares an incident, who can authorise disconnecting production, and when legal and regulatory notification clocks start.
5.A developer asks why they cannot just check permissions in the front end, since the buttons are hidden anyway.
What a strong answer coversThe answer is that the browser is under the attacker's control, so anything enforced there is a suggestion. Every request must be authorised server-side against the authenticated principal, and the check must be on the specific object being acted on, not merely on the route, which is what makes insecure direct object references the most common form of broken access control. Strong answers go further and describe how to make this structurally hard to get wrong: authorisation as a single enforced layer rather than a check copy-pasted into each handler, deny by default, and tests that assert a user of one tenant cannot read another's object. It helps to note that broken access control has been the number one category in both the 2021 and 2025 Top 10.
6.How would you secure the build and release pipeline for a service?
What a strong answer coversCoverage should span source, build and deploy. Source: protected branches, mandatory review, signed commits, and no long-lived credentials in the repository. Build: isolated ephemeral runners, pinned and checksummed dependencies via a lockfile, no arbitrary network access during build, and reproducibility so an artefact can be independently verified. Artefacts: signing, provenance attestation, and a software bill of materials. Deploy: short-lived scoped credentials issued at deploy time rather than static secrets, and an audit trail. The framing that earns marks is recognising that a compromised build system defeats every downstream check because it produces legitimately signed output, which is precisely why software supply chain failures now rank third in the OWASP Top 10.
Three sample questions, answered
These three show the level the mock is pitched at, with the answer and the reasoning in the open. The graded paper keeps its answer key server-side.
- Injection
- Broken Access Control
- Cryptographic Failures
- Security Misconfiguration
Why: Broken Access Control is A01 in both editions. Injection fell from A03 in 2021 to A05 in 2025, cryptographic failures from A02 to A04, and security misconfiguration rose from A05 to A02. The stability of access control at the top is why interviewers keep asking about server-side authorisation on every request.
- It produces a digest that is too short to be secure
- It is reversible if the input length is known
- It has been formally broken by collision attacks
- It is fast by design, so an attacker with a leaked database can try billions of guesses cheaply
Why: Speed is a feature for general hashing and a liability for passwords. Password hashing needs a deliberately slow and memory-hard function such as Argon2id, scrypt or bcrypt, so that each guess costs the attacker real time and memory. SHA-256 is not reversible and has no practical collision break; its unsuitability here is entirely about cost per guess.
- Stripping quote characters from all user input on arrival
- Running the database with a read-only user
- Parameterised queries, so the query structure is fixed before values are bound
- Encoding output before rendering it in HTML
Why: Parameterisation separates code from data: the database parses the statement first and then binds values that can never be interpreted as syntax. Character stripping is fragile and repeatedly bypassed. A least-privilege database user limits blast radius but does not prevent injection, and output encoding addresses cross-site scripting, a different class.
An 18-question knowledge check
This is a knowledge check, not a simulation. The real loop happens on a whiteboard, in an editor, and in conversation. What this paper does measure is the underlying knowledge those rounds draw on: each question is tagged with a topic, grading happens per topic, and a weak topic points you at the course that fixes it.
- 1.Which category is new in the OWASP Top 10 2025 and had no equivalent entry in 2021?Web application vulnerabilities
- 2.An API endpoint reads an id from the URL and returns the matching record after checking only that the user is logged in. What is this?Web application vulnerabilities
- 3.Why is input sanitisation an inadequate defence against cross-site scripting on its own?Web application vulnerabilities
- 4.What does a per-user salt on a password hash actually prevent?Passwords, sessions and authentication
- 5.How does a pepper differ from a salt?Passwords, sessions and authentication
- 6.Why does a short-lived access token paired with a refresh token improve security over one long-lived token?Passwords, sessions and authentication
- 7.Which property does TLS 1.3 guarantee by requiring ephemeral key exchange?Applied cryptography and TLS
- 8.You need to prove a message came from a specific party and was not altered, and the recipient must be able to demonstrate this to a third party. What do you use?Applied cryptography and TLS
- 9.What is the practical risk of reusing a nonce with AES in GCM mode under the same key?Applied cryptography and TLS
- 10.What is a dependency confusion attack?Supply chain and secure builds
- 11.Why is a compromised build system considered worse than a compromised dependency?Supply chain and secure builds
- 12.Which NIST publication is the standard reference for secure software development practices across an organisation?Supply chain and secure builds
- 13.The OWASP Top 10 2025 renames the logging category to Security Logging and Alerting Failures. What does the change emphasise?Logging, detection and response
- 14.Which of these should NOT be written to application logs?Logging, detection and response
- 15.During an incident, why preserve memory and logs from a compromised host before rebuilding it?Logging, detection and response
- 16.A service fetches a URL supplied by the user to generate a preview. What is the primary risk?Network and infrastructure hardening
- 17.Why should containers generally run as a non-root user even though they are isolated?Network and infrastructure hardening
- 18.Which statement about network segmentation is most accurate?Network and infrastructure hardening
Sources
Hiring loops change. Every claim above carries a retrieval date so you can judge how current it is.
- [1]OWASP, Top 10:2025 · retrieved 2026-08-13
- [2]OWASP, Top 10:2021 · retrieved 2026-08-13
- [3]OWASP, Top Ten project page · retrieved 2026-08-13
- [4]NIST SP 800-218, Secure Software Development Framework (SSDF) Version 1.1 · retrieved 2026-08-13
Refresh your memory
Free learning paths covering the ground this loop tests, whatever your score. Each one ends with a shareable certificate.
- Computer ScienceHow hackers get in (and how to stop them)
A practical, example-driven tour of security from basics to advanced. Start by thinking like an attacker and following a real breach through its five stages, then dig into the human layer of phishing and passwords, then the technical layer where web apps get hacked with real code for SQL injection and XSS, and finally the defender's playbook of least privilege, zero trust, detection, and response. Every attack is paired with its concrete defense.
4 lessons - ProgrammingApplied Modern Cryptography
Build the cryptographic judgment to evaluate any system's security posture. You will be able to choose the right primitive for each job (AES-GCM, HMAC, Argon2, ECDH, Ed25519), explain why common constructions fail (ECB, textbook RSA, nonce reuse, bare CTR), read a TLS 1.3 handshake trace, and audit real code for the most dangerous cryptographic misuses.
4 lessons - BusinessCybersecurity for Small Business: What Actually Matters
Small businesses are told to do everything and can afford almost nothing. This cursus starts from what actually happens to organisations of ten people, which is a short list, and identifies the six controls that address nearly all of it in about a weekend. Then ransomware: how it really unfolds, why backups no longer make you immune, what the first day looks like, and how the payment decision is settled months in advance. It ends on data you should delete, devices you do not manage, and the customer questionnaire you cannot answer.
3 lessons - ProgrammingContainers From First Principles
There is no container object in the Linux kernel and no container system call. A container is an ordinary process with several isolation features switched on, all of which predate the technology by years. So the thing that actually changed practice was not the kernel: it was an image format that is immutable, content-addressed and shippable, built on the same idea as Git's object store. This path covers the primitives, the format and its consequences, where data and traffic have to go, and the honest answer on how much the isolation is worth.
4 lessons - Computer ScienceHow Computer Networks Actually Work
A request leaves your browser and arrives somewhere across the world in tens of milliseconds. This path follows it the whole way down. You will learn how headers nest as a packet is built, why MTU mismatches cause the classic bug where small requests work and large ones hang, how routers choose a path by longest prefix match and how a BGP mistake can take a network off the internet, how TCP turns an unreliable network into an ordered stream and what congestion control is really negotiating, and why HTTP/3 abandoned TCP for QUIC.
4 lessons

