Skip to content

Security Engineer interview questions

100 real questions with model answers and explanations for Security Engineer candidates.

See a Security Engineer resume example

Practice with flashcards

Spaced repetition · Hunter Pass

Questions

sessionsstride

I apply STRIDE to each data flow and trust boundary, then convert credible threats into testable security requirements.

  • I start from a data-flow diagram containing processes, stores, external entities, flows, and privilege transitions.
  • For each element I ask relevant STRIDE questions, such as spoofing at an identity boundary or tampering on a message queue.
  • I record an attack precondition, affected asset, impact, existing control, owner, and verification method for each accepted threat.
  • I discard impossible combinations explicitly so the team spends review time on reachable attack paths rather than filling every matrix cell.

Why interviewers ask this: The interviewer is checking whether you can turn STRIDE into evidence-backed engineering work rather than a generic threat list.

threat-modelingstridepasta

I choose PASTA when business impact and attacker simulation must drive a deeper risk analysis, while STRIDE is faster for design-level coverage.

  • PASTA links business objectives, technical scope, application decomposition, threat intelligence, weakness analysis, attack modeling, and risk decisions across seven stages.
  • It suits a high-value payment or identity system where fraud paths and likely adversaries matter more than broad category coverage.
  • It costs more workshop time and needs reliable architecture and threat data, so I would not impose it on every low-risk service.
  • The output should still become owned mitigations and tests, not remain a presentation of hypothetical attacks.

Why interviewers ask this: A strong answer distinguishes the methods by purpose, input cost, and expected decision quality.

attack-tree

I put account takeover at the root and decompose it into alternative and combined attacker goals until each leaf can be evaluated or controlled.

  • OR branches could include credential stuffing, password reset abuse, session theft, and malicious support-assisted recovery.
  • AND branches capture prerequisites, such as stealing a refresh token and bypassing device or risk checks before reuse.
  • I annotate leaves with required access, likelihood, detectable signals, and control coverage rather than assigning unsupported numeric precision.
  • The tree exposes shared mitigations, such as phishing-resistant WebAuthn blocking several credential-based branches at once.

Why interviewers ask this: The interviewer is evaluating whether you can model complete attack paths and use them to select efficient controls.

threat-modeling

A trust boundary is meaningful when data crosses into a context with different identity, privilege, ownership, or control guarantees.

  • Common boundaries include browser to API, workload to database, tenant to shared service, and company network to a third-party webhook.
  • A subnet line alone is not necessarily a boundary if both sides share the same compromised identity and authorization model.
  • I label the protocol, authentication, authorization, encryption, parser, and validation performed at each crossing.
  • I split diagrams until reviewers can see where untrusted input becomes trusted state or where privilege increases.

Why interviewers ask this: A strong answer defines boundaries through changed guarantees rather than through network topology alone.

I inventory data, capabilities, identities, and availability-sensitive functions, then classify them by concrete harm if confidentiality, integrity, or availability fails.

  • Assets include signing keys and admin actions as well as obvious records such as payment data or health information.
  • I trace where each asset is created, processed, stored, logged, backed up, and deleted to find overlooked copies.
  • Classification uses business and regulatory impact, such as account takeover, fraudulent payout, GDPR exposure, or missed recovery objectives.
  • I validate the inventory with product, operations, and data owners because architecture diagrams rarely capture every business-critical capability.

Why interviewers ask this: The interviewer is checking whether your asset model covers data and privileged capabilities across their full lifecycle.

Abuse cases describe how a hostile or unauthorized actor can misuse a valid feature, which exposes requirements that happy-path stories omit.

  • For a coupon feature, I model enumeration, replay, race conditions, self-referral, and use across accounts rather than only malformed input.
  • Each case names the actor, goal, preconditions, sequence, affected asset, and observable result.
  • I turn credible cases into controls such as single-use state, atomic redemption, per-account limits, and audit events.
  • Product owners help rank fraud loss and user friction, while engineers define enforceable server-side invariants.

Why interviewers ask this: A strong answer shows how business-logic abuse becomes specific controls and acceptance criteria.

validationthreat-modeling

I make every security-relevant assumption explicit, assign an owner, and link it to evidence or a verification task.

  • An assumption such as only the gateway can call this service needs proof in network policy, workload identity, and a direct-access test.
  • Third-party guarantees should cite a contract, configuration, or protocol property instead of relying on vendor reputation.
  • I give assumptions review triggers for architecture changes, new data classes, incidents, and expired dependencies.
  • An unverified assumption is tracked as risk because controls built on it may provide no real protection.

Why interviewers ask this: The interviewer is evaluating whether you treat architectural assumptions as testable dependencies of the security design.

vulnerabilitiesvuln-managementrisk-management

I use CVSS to describe technical severity and EPSS to estimate near-term exploitation probability, but neither replaces environment-specific impact and exposure.

  • CVSS captures properties such as attack vector, privileges, user interaction, and confidentiality, integrity, and availability impact.
  • EPSS is a probability model informed by observed exploitation signals, so a high score can raise urgency for an internet-facing asset.
  • I add reachability, deployed version, compensating controls, asset criticality, exploit evidence from CISA KEV, and blast radius.
  • The resulting decision and evidence go into the ticket so a score change or control change can be reassessed consistently.

Why interviewers ask this: A strong answer uses scoring systems as inputs while preserving business and deployment context.

severity-priorityagile

I prioritize the threat with the stronger combination of reachable attack path, likely exploitation, business impact, and weak current controls.

  • I compare prerequisites and exposure, such as an unauthenticated internet path versus an internal path requiring a privileged role.
  • I estimate affected users, data, transaction value, lateral movement, and recovery cost rather than relying on the severity label alone.
  • Active exploitation, a public proof of concept, CISA KEV listing, or poor detectability increases urgency.
  • I document the deferred threat with a temporary control, named owner, expiry date, and explicit risk acceptance.

Why interviewers ask this: The interviewer is checking whether you can make a defensible bounded risk decision instead of sorting by severity labels.

A finding is resolved only when the attack path, chosen treatment, implementation, and verification evidence are traceable.

  • The record names the affected component and asset, attacker preconditions, impact, and relevant diagram flow or boundary.
  • The decision states whether the risk is mitigated, avoided, transferred, or accepted, with an owner and deadline.
  • A mitigation links to a requirement and evidence such as a unit test, authorization integration test, policy check, or reviewed configuration.
  • Residual risk and assumptions remain visible, and material architecture changes reopen the finding for review.

Why interviewers ask this: A strong answer treats threat-model output as an auditable engineering artifact with closure evidence.

authoauthidentity-access

A modern client uses Authorization Code Flow with PKCE S256 so tokens stay out of the authorization response and a stolen code cannot be redeemed alone.

  • The front channel carries a short-lived, single-use code rather than an access token, reducing exposure through browser history, referrers, and redirect logs.
  • Every public and confidential client creates a high-entropy verifier per authorization request, sends its S256 challenge, and requires the authorization server to bind the code to that challenge.
  • A confidential client also authenticates at the token endpoint, while a public client does not rely on an embedded secret; client authentication does not replace PKCE.
  • Exact registered redirect URIs, secure transaction storage, and appropriate token storage remain required around the code exchange.

Why interviewers ask this: The interviewer is checking whether you apply current Authorization Code Flow guidance, including PKCE S256 for both public and confidential clients.

oauthcsrfidentity-access

PKCE binds the authorization request to the token exchange, preventing a stolen or injected code from being redeemed without the initiating client's verifier.

  • The client sends an S256 challenge derived from a fresh high-entropy verifier and presents that verifier only at the token endpoint.
  • PKCE can provide CSRF protection when the client has assured that the authorization server supports PKCE and that the returned code is bound to the initiating challenge, with downgrade prevented.
  • State remains useful for carrying or correlating application state, and an unpredictable validated state value is still needed when reliable PKCE challenge binding cannot be assured.
  • PKCE is recommended for confidential clients as well as public clients, but it does not replace redirect URI validation, confidential-client authentication, or protection of tokens after issuance.

Why interviewers ask this: A strong answer explains the conditions under which PKCE supplies transaction binding without treating state as either universally mandatory or obsolete.

oauthidentity-accessoidc

OpenID Connect adds a standardized authentication layer that lets a client verify an end user's identity through an ID token and provider metadata.

  • OAuth access tokens authorize API access and should not be interpreted by a client as proof of login.
  • The ID token carries claims for the client, including issuer, subject, audience, issue time, and expiry.
  • The client validates nonce when used to bind the ID token to its authorization request and prevent replay across login transactions.
  • Discovery and JWKS endpoints standardize provider configuration and signing-key retrieval, but their values still need trusted issuer configuration.

Why interviewers ask this: The interviewer is evaluating whether you separate delegated authorization from authentication and validate OIDC artifacts correctly.

jwttokensvalidation

The resource server treats RFC 9068 as a typed access-token profile rather than accepting any JWT with a valid signature.

  • It requires `typ` to be `at+jwt` in the protected JOSE header and explicitly rejects an OIDC ID token at the API, even if that token has a valid signature.
  • It verifies the signature with trusted issuer keys and an allow-listed algorithm, rejecting unsigned tokens, algorithm confusion, and keys from an unconfigured issuer.
  • It validates the configured `iss`, confirms `aud` names this resource server, requires an unexpired `exp`, honors `nbf` when present with bounded clock skew, and requires `client_id` plus the other mandatory profile claims.
  • It then enforces scopes and resource-level policy for the operation; an ID token is for a client to authenticate a user, not for an API to authorize access.

Why interviewers ask this: A strong answer applies the RFC 9068 access-token profile and keeps API authorization separate from OIDC ID-token validation.

tokens

I choose opaque tokens when centralized revocation and minimal information disclosure outweigh the latency and availability cost of introspection.

  • A resource server sends the reference token to an RFC 7662 introspection endpoint or checks a trusted cache.
  • Revocation and policy changes take effect quickly, while a JWT normally remains valid until expiry unless an extra deny list is added.
  • JWTs reduce authorization-server calls and suit distributed APIs, but claim staleness and leaked claim data require short lifetimes and careful audience scoping.
  • The choice must include introspection caching, failure mode, token lifetime, and authorization-server capacity.

Why interviewers ask this: The interviewer is checking whether you can trade decentralized validation against freshness, privacy, and availability.

sessionscookiesdesign

I use an opaque, high-entropy session identifier in a Secure, HttpOnly cookie and keep identity and authorization state on the server.

  • SameSite=Lax is a practical default, while cross-site flows require narrowly justified SameSite=None with Secure and separate CSRF protection.
  • I rotate the identifier after login and privilege changes to prevent session fixation and invalidate it on logout and administrative revocation.
  • Idle and absolute timeouts limit theft impact, with shorter reauthentication windows for payment or account-recovery actions.
  • The cookie has the narrowest Domain and Path possible, and state-changing requests use CSRF tokens or origin checks.

Why interviewers ask this: A strong answer combines cookie attributes with server-side lifecycle, fixation defense, and CSRF controls.

tokenssessionsrisk-management

Refresh token rotation makes each successful refresh replace the previous token, allowing reuse of an old token to reveal likely theft.

  • The authorization server stores the token family or a hashed reference and invalidates the presented token atomically when issuing the next one.
  • Reuse of an invalidated family member revokes the family or affected session and triggers user or security notification.
  • Rotation needs concurrency handling because two legitimate refreshes can otherwise look like replay.
  • Sender-constrained tokens such as DPoP or mTLS further reduce replay, while short access-token lifetimes limit the remaining exposure window.

Why interviewers ask this: The interviewer is evaluating whether you understand both replay detection and the operational edge cases of token rotation.

authrbacidentity-access

I use RBAC for stable job functions and add ABAC when decisions depend on resource, principal, or environment attributes that roles cannot express cleanly.

  • RBAC is easy to review for roles such as support-agent or billing-admin, but many exceptions cause role explosion.
  • ABAC can express tenant, data classification, ownership, device posture, or working-hours conditions through a policy engine such as OPA.
  • Attribute issuers and mutation paths become trust boundaries, so privilege-bearing attributes need controlled schemas and audit logs.
  • I keep default deny and test policies with allowed and forbidden cases because flexible policy syntax can hide broad access.

Why interviewers ask this: A strong answer compares operational simplicity with policy expressiveness and recognizes attribute governance risk.

rbacidentity-accessabac

ReBAC fits collaborative systems where access follows a graph of relationships such as owner, editor, team member, folder parent, or organization.

  • A document permission can derive from membership in a team that has viewer access to the containing project.
  • Systems such as Zanzibar-style engines, OpenFGA, and SpiceDB evaluate tuples and relation rewrites consistently across services.
  • The model must define inheritance, cycles, deletion, tenant isolation, and maximum traversal cost to avoid surprising grants or expensive checks.
  • I still use attributes for contextual conditions and roles for coarse administration rather than forcing every rule into the graph.

Why interviewers ask this: The interviewer is checking whether you can match a graph authorization model to real relationship semantics and its consistency costs.

kubernetes

I give each workload a short-lived identity bound to its runtime service account and authenticate service-to-service calls with mTLS or signed workload tokens.

  • SPIFFE IDs and SPIRE can issue rotating X.509 SVIDs based on attested workload attributes rather than static shared secrets.
  • A service mesh can enforce peer identity and encryption, but application authorization still decides which identified caller may invoke an operation.
  • Kubernetes service account tokens should use projected, audience-bound, short-lived tokens rather than legacy long-lived secrets.
  • Certificate issuance, trust-bundle rotation, clock health, and emergency revocation need monitoring because identity depends on that control plane.

Why interviewers ask this: A strong answer connects workload attestation and short-lived credentials to authorization and certificate operations.

Locked questions

  • 21

    Why does HTTP request smuggling occur, and which design controls reduce the risk?

    risk-managementhttpdesign
  • 22

    How do you prevent mass assignment in a JSON API?

    api
  • 23

    Where must authorization be enforced in a GraphQL API?

    graphqlauthidentity-access
  • 24

    How do you control resource exhaustion in a GraphQL service?

    graphql
  • 25

    How would you prevent HTTP cache poisoning when an API sits behind a CDN and a reverse proxy?

    proxyhttpapi
  • 26

    How would you roll out a Content Security Policy for an existing web application?

    csp
  • 27

    What layered controls would you use for a service that fetches user-supplied URLs?

  • 28

    How should an API validate and normalize incoming requests without creating parser inconsistencies?

    normalizationapivalidation
  • 29

    How would you design rate limiting for a login and password-reset API?

    rate-limitingpasswordsdesign
  • 30

    What controls make an inbound webhook endpoint trustworthy and replay-resistant?

    endpointswebhooks
  • 31

    Why should application encryption normally use an AEAD construction?

    encryptioncryptographyaead
  • 32

    What are the consequences of nonce reuse with AES-GCM, and how do you prevent it?

    cryptography
  • 33

    How does envelope encryption work for application data?

    encryptioncryptographyenvelope-encryption
  • 34

    How do managed KMS and a dedicated HSM differ in responsibility and use case?

    hsm
  • 35

    How would you separate cryptographic keys across tenants and purposes?

  • 36

    How do you rotate an encryption key without making existing data unreadable?

    encryptioncryptography
  • 37

    What stages should a secrets lifecycle cover?

    secrets
  • 38

    How should a containerized application receive secrets at runtime?

    secretscontainers
  • 39

    How would you stage an mTLS trust-bundle and certificate rotation without causing an outage?

    mtlscryptography
  • 40

    What roles do SPIRE, ACME, and cert-manager play in automating internal mTLS certificates?

    mtlscryptography
  • 41

    Where would you place security activities in a product delivery lifecycle?

  • 42

    What are the strengths and limitations of SAST in CI?

    sast
  • 43

    How do DAST and IAST differ, and when would you use each?

    dastiast
  • 44

    How do you make software composition analysis findings actionable?

    oop
  • 45

    What makes an SBOM useful rather than just a compliance artifact?

    supply-chaincomplianceartifacts
  • 46

    What problem does VEX solve alongside an SBOM?

    supply-chain
  • 47

    How would you establish build provenance in CI?

  • 48

    Which controls would you apply to a production container image?

    containers
  • 49

    How would you use policy as code for Kubernetes and infrastructure changes?

    kubernetespolicy-as-code
  • 50

    How would you define and operate vulnerability remediation SLAs?

    vulnerabilitiesvulnerability-management
  • 51

    A billing team is adding CSV exports to a REST API that handles 2 million customer invoices; how would you revise its threat model?

    threat-modelingrestapi
  • 52

    A payment webhook now retries for 24 hours and can arrive out of order; what would you add to its threat model and design review?

    threat-modelingwebhooksdesign
  • 53

    A recruiting product is adding PDF and DOCX resume uploads up to 20 MB; how would you threat-model the feature before launch?

  • 54

    A multi-tenant analytics service is adding Redis caching to reduce p95 latency from 900 ms; what security review would you perform?

    cachinglatencyredis
  • 55

    A support product will send conversation transcripts containing email addresses to a new AI summarization vendor; how would you revise the data-flow threat model?

    threat-modelingprocurement
  • 56

    A GraphQL API is adding a bulk user-role mutation for workspace administrators; what threats and controls would you document?

    graphql
  • 57

    The identity team is replacing emailed password-reset links with six-digit codes; how would you update the threat model?

    passwordsthreat-modeling
  • 58

    A collaborative editor is adding authenticated WebSocket presence and document updates; how would you threat-model the change?

    websockets
  • 59

    An internal admin API is being exposed through a zero-trust proxy for remote support staff; what would you revise in its threat model?

    threat-modelingzero-trustapi
  • 60

    A mobile application is adding OAuth login with universal-link callbacks; what would you require from the threat model and launch tests?

    oauththreat-modelingidentity-access
  • 61

    OAuth login succeeds in staging but production returns redirect_uri_mismatch after moving behind CloudFront; how would you debug it?

    oauthidentity-accesscloud-security
  • 62

    An API intermittently accepts JWTs from the wrong environment after a key rotation; how would you investigate?

    incident-responseapi
  • 63

    A browser sends a session cookie to an API, but credentialed CORS requests fail only for one customer domain; how would you debug it safely?

    corssessionscookies
  • 64

    After enabling CSP, checkout breaks and reports show a blocked inline script plus a third-party payment frame; how would you fix the policy?

    dependencies
  • 65

    After a CDN migration, some users receive a cached password-reset redirect to an attacker-controlled host; how would you debug possible cache poisoning?

    formsmigrationspasswords
  • 66

    Only requests passing through an older HAProxy tier produce duplicate backend requests with mismatched bodies; how would you investigate request smuggling?

    incident-response
  • 67

    A customer claims changing /api/orders/8421 to /api/orders/8422 exposes another tenant's order; how would you debug and validate the access-control flaw?

    validationapi
  • 68

    Users remain logged in under an attacker's known session ID after authenticating; how would you investigate possible session fixation?

    sessionsincident-response
  • 69

    OAuth telemetry shows successful callbacks whose state value belongs to a different browser session; how would you debug the issue?

    oauthsessionsidentity-access
  • 70

    A reverse proxy migration lets some requests reach admin routes without the expected role check; how would you isolate the failure?

    proxymigrations
  • 71

    Semgrep finds 1,800 SQL-injection results in a legacy Python service, but manual review shows most use parameterized wrappers; how would you tune the rollout?

    sqlinjectionpython
  • 72

    CodeQL adds 18 minutes to a 12-minute pull-request pipeline for a TypeScript monorepo; how would you preserve coverage without blocking feedback?

    monorepoci-cdcoverage
  • 73

    OWASP ZAP scans a staging API but reports only public endpoints even though an OpenAPI file includes authenticated routes; how would you tune it?

    endpointsopenapiowasp
  • 74

    SAST, DAST, and IAST each open a SQL-injection finding for the same checkout parameter, and their IDs change between scans; how would you correlate results reliably?

    injectionsastdast
  • 75

    An IAST agent flags the same deserialization sink thousands of times during integration tests; how would you reduce noise without losing coverage?

    integrationcoverageiast
  • 76

    A team asks which SAST and SCA findings should block merges in a repository shipping twice a day; how would you define the gate?

    sast
  • 77

    The codebase has 600 scanner suppressions, many without reasons; how would you clean them up and prevent recurrence?

  • 78

    Security scans run separately in 40 services within one monorepo and produce duplicate tickets; how would you redesign the workflow?

    monorepo
  • 79

    You wrote a custom Semgrep rule for unsafe subprocess use; how would you prove it is ready to block pull requests?

    code-review
  • 80

    A nightly DAST gate fails 20% of the time because ephemeral environments are still starting; how would you make the result reliable?

    dast
  • 81

    Gitleaks finds a production Stripe key committed three days ago and copied into 14 forks; what would you do?

  • 82

    Rotating a PostgreSQL password in HashiCorp Vault causes intermittent 401 and connection failures; how would you correct the rollout?

    passwordssecretspostgres
  • 83

    A Kubernetes API pod passes image scanning but runs with the default container security context; how would you harden runtime without breaking its upload workflow?

    kubernetescontainersapi
  • 84

    A Kubernetes team wants to enforce non-root workloads, but 12 legacy deployments currently fail that rule; how would you roll out the control?

    kubernetesdeployment
  • 85

    A compromised pod's service account can list secrets across its Kubernetes namespace; how would you contain and remediate it?

    secretsincident-responseidentity-access
  • 86

    Checkov blocks a Terraform change because an S3 bucket appears public, but the module later attaches a restrictive policy; how would you resolve the finding?

    terraformaws
  • 87

    A Kubernetes admission controller rejects a release because its provenance names a generic CI runner instead of the approved release builder; what would you do?

    kubernetesgenerics
  • 88

    A staging image is rebuilt under the same tag before production promotion, but the pipeline reuses the earlier SBOM; how would you prevent stale evidence from being promoted?

    supply-chainci-cd
  • 89

    A critical CVE affects a Java logging library, no vendor patch exists, and the vulnerable lookup feature is enabled; how would you remediate it?

    vulnerabilitiesvuln-managementcve
  • 90

    A distroless base-image update fixes critical CVEs but changes CA certificates and breaks outbound TLS in staging; what would you do?

    tlscryptography
  • 91

    A researcher privately reports that revoked API keys remain valid for up to an hour because authorization caches miss invalidations, and plans disclosure in ten days; how would you handle it?

    authidentity-accessapi
  • 92

    A development team disputes a critical command-injection finding because the endpoint is available only to administrators; how would you decide severity and next steps?

    injectionendpointsseverity-priority
  • 93

    A shared authentication library has an authorization bypass and is used by 18 services; how would you coordinate remediation?

    authidentity-access
  • 94

    A product owner requests a 60-day exception for a high-severity dependency because upgrading breaks a revenue-critical plugin; what would you require?

    severity-prioritydependencieserror-handling
  • 95

    WAF logs show exploitation attempts against a recently disclosed template-injection flaw, and one request returned 200; what basic incident response would you lead?

    injectionattacksincident-response
  • 96

    A storage-policy change made 340 customer support attachments publicly readable for six hours; how would you coordinate response and remediation?

  • 97

    After fixing an unrestricted file upload, an EDR alert finds a web shell in one application pod; what would you do next?

    endpointsalerting
  • 98

    Developers fixed an archive-extraction path traversal by removing ../ from entry names; how would you validate and complete remediation?

    validationpath-traversal
  • 99

    A patch adds tenant checks to one document endpoint; how would you prove the access-control issue is fully fixed without breaking valid sharing?

    endpoints
  • 100

    A critical deserialization vulnerability has been patched and deployed; what evidence would you require before closing remediation?

    vulnerabilitiesvulnerability-managementdeployment