Lesson 1 of 5
Security in Interviews
"You do not rise to the level of your goals. You fall to the level of your systems." — James Clear, Atomic Habits
There is a persistent belief that security only matters if you are interviewing for a security role. It is wrong in a way that costs ordinary candidates offers, because it confuses where security is named with where it is assessed.
Consider a five-stage loop: recruiter screen, coding round, system design, code review or debugging, and behavioural. Exactly one of those five — the system design round — is likely to name security as an explicit topic. That is 20%. But security signal is available to the interviewer in four of the five — 80% — because in every round after the recruiter screen you are making decisions about input, trust, identity and failure, and those decisions are visible whether or not anyone asks about them.
This asymmetry is the whole chapter. Candidates prepare for the 20% and are evaluated on the 80%. And the evaluation is not "did they recite OWASP". It is a much simpler judgement the interviewer makes almost unconsciously: does this person think about what happens when the input is hostile, or do they only think about the happy path? You demonstrate that in a forty-five minute coding round with about five minutes of talking — roughly 11.1% of the round — and it changes the write-up more than a faster algorithm does.
The mistake in the other direction is just as costly. A candidate who has read a security book and now interrupts a string-reversal exercise to discuss threat models is not showing judgement; they are showing they cannot tell which problems are which. Security awareness that fires indiscriminately reads as noise, and noise is a negative signal. The skill being assessed is proportionality.
You are forty minutes into a forty-five minute coding round. Your solution works and the tests pass. You have noticed that the function trusts its input completely. Do you say something, and what exactly do you say?
Where the signal actually lives
Run to execute the tests…
A driving test has one section explicitly called the emergency stop. Candidates rehearse it obsessively. But the examiner is assessing observation continuously — mirrors before signalling, awareness at junctions, whether you look at the road you are turning into — across the entire drive, and the notes they write are mostly about that. Fail the emergency stop and you have failed one manoeuvre; drive the whole route without checking a mirror and you have failed the test even if every manoeuvre was clean. The parallel is exact. There is one round that names security, and there is a continuous assessment of whether you notice things, which runs the whole way through and which most candidates do not know is happening.
Five minutes that change the write-up
Run to execute the tests…
I have sat on both sides of this and the thing that surprised me most as an interviewer is how rarely the security note is about security. When a candidate says "this trusts the caller's ID — in production I would check ownership", what I write down is not "knows about IDOR". It is that they are modelling the production system while solving the toy problem, which is the single most reliable predictor I have found of how someone behaves on a real codebase. The candidates who never say anything like it are not necessarily ignorant; they have decided the exercise is a game with its own rules, and that decision is the thing I am worried about. The inverse is real too. I once had a candidate spend eleven minutes of a forty-five minute round on the threat model of a function that sorted integers in memory, and I could not recommend them, because on a real team that instinct fires in code review constantly and someone has to absorb the cost. What I want, and what I now say out loud when I brief people, is one sentence at the right moment. Not a lecture, not silence.
Talking about it in the behavioural round
Run to execute the tests…
The technical interview as we know it — the whiteboard, the algorithmic exercise, the structured loop — comes largely from Microsoft in the 1980s and Google in the early 2000s, and it was designed to answer one question: can this person program. That was the binding constraint at the time. The industry has since discovered, repeatedly and expensively, that it was not the only one, and the loop has been accreting rounds ever since — system design when services got distributed, behavioural rounds when teams got large enough that a brilliant engineer could be net negative, code review rounds when it became clear that reading code is most of the job. Security has never received a round of its own outside security roles. What happened instead is that it dissolved into the existing rounds as a quality of the answers rather than a topic, which is why it is simultaneously true that most loops never ask a security question and that most loops assess it. If you are waiting for the round where it comes up, you have already been graded.
Common Mistakes
- Preparing only for the round that names it. Security is explicit in 1 of 5 stages and observable in 4 of 5.
- Assuming it only applies to security roles. Any role touching input, identity or data access is assessed on it.
- Saving the security comment for the end. Asked during clarification it frames the solution; asked at minute forty it is an afterthought.
- Raising it on every problem. Threat-modelling a string reversal reads as noise, not judgement.
- Lecturing instead of noting. One sentence naming the assumption, the fix and the bug class is the whole move.
- Implementing the hardening uninvited. Offer it and let the interviewer choose; the clock is theirs to spend.
- Writing only happy-path tests. One hostile case costs nothing and signals more than the other four.
- Having no incident story ready. The behavioural round is where the strongest security answers go unsaid.
- Telling a story with no structural change. "We were more careful afterwards" is not a fix; a CI check is.
- Framing security as a veto. "We can't ship" gets you routed around; exposure, mitigation and accepted risk does not.
Interview Corner
Take the last coding exercise you did — from a practice site, an old interview, anything — and reread it for a trust boundary. Where does data enter, and what does the function assume about it? Write the single sentence you would have said aloud, in under twenty words, naming the assumption and the fix. Then do the harder half: find a practice problem that genuinely has no security dimension, and confirm you can say so. Finally, write out one incident story you could tell in a behavioural round, and check that it ends in a structural change rather than a resolution to be more careful.
Run to execute the tests…
Summary
- Security is named in 1 of 5 stages (20%) and observable in 4 of 5 (80%). Candidates prepare for the smaller number.
- The judgement being made is simple — do you consider hostile input, or only the happy path?
- It applies outside security roles. Any role touching input, identity or data access is assessed on it.
- Ask during clarification. "Can this input be attacker-controlled?" costs nothing at minute three and everything at minute forty.
- Budget roughly 5 minutes of 45 — about 11.1% — spread through the round as sentences, not a lecture.
- One sentence: assumption, fix, bug class. Then hand the clock back: implement it, or note it and move on?
- Write one hostile test case. You are writing tests anyway; that one carries the signal.
- Proportionality is the skill. Roughly half of typical exercises have no security dimension, and raising it there is a negative.
- The behavioural round is unclaimed territory — a real incident story, ending in a structural change, is the strongest answer available.
- Never frame security as a veto. Exposure, cheapest mitigation, and what you would accept if you shipped anyway.
The next chapter narrows to the round where this is most concentrated and most winnable: being handed unfamiliar code and asked what is wrong with it, with a clock running and no ability to execute anything.
Writing this chapter forced me to admit something slightly uncomfortable about interviews generally, which is that the most valuable signals are almost always the unrequested ones. Nobody is impressed by a correct answer to the question they asked; that is the floor. What moves a write-up is the thing the candidate noticed that was not on the sheet — and security is the richest available source of those, because it is the one dimension of software quality that is simultaneously universal and unasked. That also explains why the advice here is so unglamorous. There is no framework to memorise and no vocabulary to acquire. There is a habit of asking where the input comes from, a willingness to name an assumption out loud, and — the part most people miss — the restraint to say nothing when there is nothing to say. I keep returning to the fact that the same instinct, applied without proportion, is a liability rather than a strength. Very few things in engineering are like that. Most virtues are monotonic; more testing is better than less, more clarity is better than less. Security attention is not, and learning where its ceiling sits is most of what separates someone who has read about this from someone who has done it.
Q&A · 0
Enrol to ask questions and join the discussion.
No questions yet — be the first to ask.