SAST/DAST Interview Questions

Reviewed by Mark Dickie · Last updated

SAST and DAST are two complementary security testing approaches that scan applications for vulnerabilities—SAST analyzes source code statically without running it, while DAST probes a running application from the outside. For an interview on this topic, you should know the core tradeoffs: SAST catches injection paths and hardcoded secrets early but produces false positives and cannot see runtime configuration issues, whereas DAST finds exposed endpoints and misconfigurations that only appear when the app is live but has no visibility into source-level flaws. You should be able to explain how each fits into a CI/CD pipeline, how to triage and suppress findings, and what categories of vulnerability each method can and cannot detect.

DimensionSASTDAST
When it runsPre-deployment, on source or bytecodeAgainst a running app, any environment
What it seesCode paths, taint flows, secrets in sourceHTTP responses, exposed endpoints, runtime config
Typical false-positive rateHigh (needs tuning and suppression)Lower but narrower scope
Language dependenceNeeds language-specific analyzersLanguage-agnostic, black-box
Best at findingSQL injection sinks, XSS in templates, hardcoded credentialsOpen redirects, missing auth checks, misconfigured headers

What does a SAST/DAST interview typically test?

Interviews on security testing tooling tend to probe a few recurring areas:

  1. Tool selection and tradeoffs — when to reach for SAST vs. DAST vs. IAST, and what blind spots each leaves.
  2. Pipeline integration — how to break builds on critical findings, how to gate on severity without drowning the team in low-priority noise.
  3. False-positive management — suppression strategies, baselining, and how to keep scan results actionable over time.
  4. Vulnerability taxonomy — mapping findings to CWE or OWASP categories and explaining remediation for each.
  5. Tool-specific knowledge — configuration of tools like Semgrep, Bandit, Checkmarx, ZAP, or Burp Suite in an automated context.

How do SAST and DAST complement each other in a security pipeline?

Most mature security programs run both. SAST runs on every commit or pull request, catching issues before they reach a deployed environment. DAST runs against staging or production on a schedule or per release, catching problems that only manifest at runtime—things like insecure HTTP headers, exposed admin panels, or auth bypasses that depend on server configuration. The overlap is small: a SQL injection found by SAST at the code level may or may not be exploitable at runtime, and DAST will not find the injection if the input path is not reachable in the running app. Treating the two as independent signals, then correlating findings by vulnerability class, gives the clearest picture of real risk.

Key facts

  • Tarmac has 96 SAST & DAST Tooling interview questions on this topic, 25 of them on this page, at difficulty 1–5 of 5.
  • Tarmac last reviewed these SAST & DAST Tooling interview questions on 31 August 2026.

At a glance

Questions25 shown · 96 in the bank
Difficulty1–5 of 5
FormatsMultiple choice, Flashcard, True / false, Fill in the blank, Multiple answer, Short answer, Ordering, Find the bug, Design exercise

What you'll review

  1. sast vs dast
  2. shift left
  3. sast tools
  4. active passive scanning
  5. dast scanning
  6. pipeline gating
  7. iast hybrid approaches
  8. false positive triage
  9. taint analysis

Practice questions

Try one before you open the answer. Pick an option and press Check; it's marked on the spot.

SAST & DAST Tooling/fundamentals/sast-vs-dast

What most fundamentally distinguishes SAST from DAST?#

Options

Show answer

SAST analyzes source code or bytecode without running the application — a white-box technique usable as soon as code exists, able to point to an exact file and line — while DAST tests an actually running application from the outside by sending real requests, the way an attacker would, without needing any source code access. Because they observe the system from opposite vantage points, they catch different classes of flaw, which is why mature pipelines run both rather than substituting one for the other.

Why:

SAST (Static Application Security Testing) inspects source, bytecode, or binaries without executing them, so it can run the moment code exists — on a pull request, even in an editor — and it can point to an exact file and line. DAST (Dynamic Application Security Testing) instead exercises the running application from the outside, the way an attacker would, sending crafted HTTP requests and observing responses; it needs a deployed, reachable instance but no source access at all. Because the two techniques observe the system from opposite vantage points, they catch different flaw classes — SAST finds injection-prone code paths early, DAST finds runtime/config issues like a missing security header — which is why mature pipelines run both rather than treating either as a substitute for the other.

SAST & DAST Tooling/cicd-integration/shift-left

What does SAST (Static Application Security Testing) do, and at what point in the CI/CD pipeline does it typically run?#

Show answer

SAST analyzes source code, bytecode, or binaries without executing the application to find security vulnerabilities early in development. In CI/CD it typically runs on every commit or pull request so issues surface before code is merged.

Why:

SAST is a white-box technique that inspects code statically. Integrating it at commit or PR time supports a shift-left strategy by catching vulnerabilities before they reach later pipeline stages or production.

SAST & DAST Tooling/fundamentals/sast-vs-dast

DAST testing requires read access to the application's source code in order to run.#

Options

Show answer

False. DAST tests a running application from the outside, the same way an attacker would — sending real HTTP requests and analyzing the responses — so it needs a reachable, deployed instance but no visibility into the source code at all. SAST is the opposite: it analyzes source or bytecode directly and never needs the app to be running.

Why:

False. DAST tests the running application from the outside, the same way an attacker would — sending real HTTP requests and analyzing the responses — so it needs a reachable, deployed instance of the app but no visibility into its source at all. That's the opposite of SAST, which analyzes source or bytecode directly and never needs the app to be running. This is exactly why DAST is a natural fit for testing a vendor's application or any black-box target where source access simply isn't available.

SAST & DAST Tooling/tooling/sast-tools

Semgrep lets teams write custom static-analysis rules using a pattern syntax that closely resembles the target language's own code, without requiring them to learn a separate declarative query language the way CodeQL's QL does.#

Options

Show answer

True. Semgrep rules are written in a pattern syntax that closely resembles the target language's own code, with metavariables standing in for the parts that vary, so an engineer can write and tune custom rules without learning a separate query language. CodeQL instead requires learning QL, a purpose-built declarative query language, which is more powerful for deep cross-file analysis but a steeper barrier to a team's first custom rule.

Why:

True. A Semgrep rule's pattern field is written to look almost exactly like the code it's meant to match — for example $USER_INPUT = request.args.get(...) — with metavariables standing in for the parts that vary, so an engineer who already reads the target language can write and tune rules without a separate query-language on-ramp. CodeQL takes a different approach: it compiles code into a relational database and requires learning QL, a purpose-built declarative query language, to express the same kind of check — more powerful for deep cross-file data-flow analysis, but a steeper barrier to a team's first custom rule.

SAST & DAST Tooling/cicd-integration/shift-left

What does "shift-left" mean in the context of SAST/DAST tooling in a CI/CD pipeline, and why is it valuable?#

Show answer

Shifting security testing earlier in the SDLC (e.g., running SAST on every pull request in CI) so vulnerabilities are found at the developer's desk — close to when the code is written — rather than waiting for a late-stage or post-deployment scan. The goal is faster, cheaper feedback: fixing a flaw minutes after writing it costs far less than catching it in production.

Why:

Shift-left is the practice of moving security checks (especially SAST, which can run on source code before build) as early as possible in the development lifecycle — ideally on every commit or pull request in CI. This gives developers near-instant feedback so they can fix issues while the context is fresh, reducing remediation cost and preventing defects from reaching later stages where they are more expensive to address.

SAST & DAST Tooling/dynamic-analysis/active-passive-scanning

In DAST, _____ scanning analyzes HTTP requests and responses as they occur naturally between the client and the application, without injecting any test payloads or probes into the target. Because it never sends modified traffic, it is safe to run against production systems.#

Show answer

In DAST, Passive scanning analyzes HTTP requests and responses as they occur naturally between the client and the application, without injecting any test payloads or probes into the target. Because it never sends modified traffic, it is safe to run against production systems.

Why:

Passive scanning in DAST is defined by observation only: it inspects traffic that flows naturally through the proxy or sensor without generating any additional or modified requests. This contrasts with active scanning, which deliberately sends crafted payloads to probe for vulnerabilities.

SAST & DAST Tooling/dynamic-analysis/active-passive-scanning

In DAST, _____ scanning sends crafted attack payloads to the target application to probe for vulnerabilities such as SQL injection and cross-site scripting, whereas _____ scanning only inspects existing traffic without sending any additional or modified requests.#

Show answer

In DAST, Active scanning sends crafted attack payloads to the target application to probe for vulnerabilities such as SQL injection and cross-site scripting, whereas Passive scanning only inspects existing traffic without sending any additional or modified requests.

Why:

Active scanning is characterized by deliberately injecting payloads into the application to elicit vulnerability signals, which can cause side effects. Passive scanning, by contrast, restricts itself to observing traffic that already exists between users and the application, sending nothing extra.

SAST & DAST Tooling/dynamic-analysis/dast-scanning

A DAST scanner operates against a live, running instance of an application and treats it as a _____ box, meaning it has no access to the source code, internal structure, or design documents of the target.#

Show answer

A DAST scanner operates against a live, running instance of an application and treats it as a black box, meaning it has no access to the source code, internal structure, or design documents of the target.

Why:

DAST tools are categorized as black-box testing tools because they interact with the application solely through its external interfaces (e.g., HTTP requests) and have no visibility into the internal source code, architecture, or data flows. This is the opposite of white-box tools like SAST, which have full access to source code. The single widely accepted term is 'black.'

SAST & DAST Tooling/tooling/sast-tools

CodeQL's core static-analysis approach is best described as which of these?#

Options

Show answer

CodeQL's core analysis approach compiles the codebase into a queryable relational database representing its structure and data flow, then runs semantic QL queries against that database to trace whether untrusted input can reach a dangerous operation across function and file boundaries. That database-and-query model gives it real semantic understanding rather than superficial text matching, at the cost of needing a build step first, which makes it slower to run than a lightweight pattern-matching scanner.

Why:

CodeQL builds a relational database that models a codebase's abstract syntax tree, control flow, and data flow, then answers security questions by running declarative QL queries against that database — for example, 'is there a path from an HTTP request parameter to a raw SQL execution call with no sanitizer in between'. That database-and-query model is what lets it trace taint across function and file boundaries with real semantic understanding of the code, rather than matching superficial text patterns — the tradeoff is that building the database requires compiling the project (for compiled languages), which makes CodeQL slower to run than a lightweight pattern-matching tool.

SAST & DAST Tooling/dynamic-analysis/active-passive-scanning

In OWASP ZAP, what's the core difference between passive scanning and active scanning?#

Options

Show answer

OWASP ZAP's passive scanning only analyzes traffic it has already observed through its proxy or spider — flagging things like a missing security header — without sending any additional requests, while active scanning deliberately sends crafted attack payloads such as SQL injection or XSS strings at discovered endpoints and can modify server-side data. That intrusiveness is exactly why active scanning should never be pointed at a production environment without explicit authorization.

Why:

Passive scanning is safe to run continuously — it never sends a request ZAP wasn't already going to send anyway (via its proxy observing normal traffic, or the spider crawling links), so it only ever inspects responses for issues visible in what's already there, like missing headers or verbose error messages. Active scanning is intrusive by design: for every parameter ZAP discovers, it fires a library of attack payloads (SQL injection strings, XSS markers, path traversal sequences) and inspects the response for signs the payload succeeded, which is how it finds injection-class bugs — but it's also why active scanning should never be pointed at a production environment without authorization, since it can genuinely create or corrupt data.

SAST & DAST Tooling/cicd-integration/pipeline-gating

A team configures its CI pipeline to block merges only on critical/high-severity SAST findings, routing lower-severity findings to a backlog instead of failing the build on any finding at all. Which of these are legitimate reasons for that choice? Select all that apply.#

Options

Pick every one that applies.

Show answer

Gating a CI pipeline only on critical/high-severity SAST findings, rather than failing on any finding, is a legitimate choice because blocking on every low-severity finding trains developers to bypass or ignore the gate once it stops feeling actionable, and because blocking merges only on high-confidence, exploitable findings preserves developer trust in the tool, which is what sustains its long-term adoption. Lower-severity findings still reach a backlog for scheduled triage rather than being lost. SAST tools do not produce zero false positives, and no universal compliance mandate requires a hard build failure on every finding regardless of severity.

Why:

Severity-based gating is a deliberate tradeoff between coverage and developer trust: SAST tools routinely surface a meaningful volume of lower-confidence or lower-impact findings, and failing every build on every one of them is the fastest way to get the check disabled, suppressed wholesale, or routed around — the tool only helps if people keep trusting and using it. Routing lower-severity findings to a backlog rather than dropping them preserves visibility without stalling delivery. SAST tools do not produce zero false positives — false positives are one of the field's persistent, actively-worked-on challenges, not a solved problem — and no universal compliance mandate requires a hard fail on every finding regardless of severity; specific frameworks set their own bars, and teams commonly implement those bars as severity-scoped gates like this one.

SAST & DAST Tooling/fundamentals/sast-vs-dast

Which of these are genuine strengths of SAST relative to DAST? Select all that apply.#

Options

Pick every one that applies.

Show answer

SAST's genuine strengths relative to DAST are pointing to the exact file and line responsible for a flagged issue, running on a pull request before the application is ever deployed or fully built, and being able to flag a vulnerable code path even in functionality not reachable through the app's exposed UI or API — since it examines all the code, not just what's externally discoverable. Directly observing a runtime issue like a missing security header is a DAST strength instead, since SAST has no running server to inspect, and SAST is not reliably lower in false positives than DAST — both generate them, and the ratio depends on tuning.

Why:

SAST's advantages come from operating on source before deployment: it can cite an exact file/line (a), can run the moment code exists rather than waiting for a deployed environment (b), and — because it examines all the code, not just what's reachable from the outside — can surface a flaw in dead code, an internal admin route, or disabled functionality that a black-box DAST scan would never even discover (d). Observing runtime configuration issues like a missing security header (c) is a DAST strength — SAST has no running server to inspect. And SAST is not reliably lower in false positives than DAST; both tool classes generate false positives, and the ratio depends heavily on tuning, not on which technique is used.

SAST & DAST Tooling/cicd-integration/shift-left

What does 'shift-left' mean in the context of application security tooling, and what tradeoff do teams accept in exchange for the earlier feedback?#

Show answer

Shift-left means moving security testing — SAST, dependency/secrets scanning — as early as possible in the development lifecycle: into the IDE or the pull request, rather than waiting for a DAST scan or pentest against a fully deployed system late in the release cycle. The payoff is that a flaw found on a PR is far cheaper to fix than one found in staging or production, both in engineering time and in how fresh the author's mental model of the code still is. The tradeoff is coverage and confidence: static tools running against incomplete, freshly-written, not-yet-integrated code lack full runtime context, so they tend to surface more false positives and lower-confidence findings than a DAST scan or pentest run against the assembled, running system — which means shifting left only pays off if the team also invests in triage capacity, or the noise trains developers to ignore the gate.

Why:

The core idea is timing: catching a flaw while the code is still on a branch is cheaper than catching it after deployment, both in fix cost and in the author's context being fresh. The honest cost is that early-stage static analysis is working with less information — no running system, no real traffic, sometimes incomplete code — which is exactly why static tools skew toward more false positives than a scan against a fully assembled, running application. A team that shifts left without also building triage capacity just moves the noise earlier instead of eliminating it.

SAST & DAST Tooling/fundamentals/iast-hybrid-approaches

What is IAST (Interactive Application Security Testing), and how does it differ from SAST and DAST?#

Show answer

IAST instruments the running application itself — typically via an agent inside the app server or language runtime — and observes real code execution as the app is exercised, whether by QA's functional tests, a DAST scanner driving traffic, or a human clicking through it. That gives it SAST's visibility into the exact vulnerable code path, combined with DAST's advantage of watching an actually running system with real data flowing through it, which tends to produce fewer false positives than SAST alone since a finding is only raised when the flagged code path is confirmed to have actually executed.

Why:

IAST sits between SAST and DAST rather than replacing either: it needs the app instrumented and running (unlike SAST), but it needs that running app to be genuinely exercised by some other activity — tests, a DAST crawl, manual QA — to generate coverage, so it's typically deployed alongside a functional test suite rather than run standalone. Its main selling point in practice is confirmed, low-noise findings during QA, at the cost of requiring an in-process agent most teams have to explicitly adopt.

SAST & DAST Tooling/cicd-integration/pipeline-gating

Order the typical stages of running a SAST scan inside a pull-request CI pipeline, from commit to merge decision.#

Put these in order

Show answer

A pull-request SAST pipeline runs in a fixed order: a commit triggers the pipeline, the code is built if the scanner needs a compiled analysis database, the SAST engine scans and produces raw findings, those findings are triaged against severity thresholds and an accepted baseline, and finally the pipeline gate passes or fails the merge based on the triaged results. Triage has to sit between the raw scan and the gate — otherwise the gate would be re-litigating already-accepted findings on every single pull request.

Why:

The commit is what triggers the pipeline in the first place, so it has to come first. Some scanners (CodeQL in particular, for compiled languages) can't analyze code without a build step constructing their analysis database, so build precedes scan when that's required. The scan itself only produces raw findings — triage against a baseline and severity threshold is what turns raw output into an actionable signal, filtering out already-accepted findings so the gate isn't re-litigating history on every PR. The gate has to run last, since it's the step that actually determines whether the merge is allowed, based on everything upstream of it.

SAST & DAST Tooling/triage/false-positive-triage

A teammate's PR silences a SAST finding to unblock their merge. Which line is the actual security problem left in the codebase?#

1| # nosemgrep: python.django.security.injection.sql
2| query = f"SELECT * FROM orders WHERE id = {order_id}"
3| cursor.execute(query)

Options

Show answer

Line 1 — suppressing the SAST finding with a nosemgrep comment instead of fixing the underlying string-interpolated query on line 2 leaves the SQL injection vulnerability in the shipped code; a suppression comment silences the tool, it doesn't change what the database executes

Why:

A nosemgrep (or any suppression) comment tells the scanner to stop reporting a specific finding at that location — it does nothing to the runtime behavior of the code underneath it. Line 2 builds the SQL string by directly interpolating order_id into an f-string, so if order_id is ever attacker-controlled (a URL parameter, for instance), the attacker can close the intended string/number literal and inject arbitrary SQL — f-strings are just as vulnerable as %-formatting or plain concatenation when used this way; the format mechanism was never the issue. Suppressing the finding to unblock a merge, without replacing line 2 with a parameterized query (e.g. cursor.execute("SELECT * FROM orders WHERE id = %s", (order_id,))), ships the injection flaw with a paper trail proving someone saw and dismissed it — a pattern that shows up repeatedly in real post-incident reviews.

SAST & DAST Tooling/dynamic-analysis/dast-scanning

This is the DAST job wired into CI for a staging app where nearly every page requires login. Which line is the reason this scan gives a false sense of security?#

1| dast-scan:
2|   script:
3|     - zap-baseline.py -t https://staging.example.com -r report.html

Options

Show answer

Line 3 — zap-baseline.py is invoked with no authentication or login sequence configured, so ZAP's spider and scanner can only ever discover and test the handful of pages available before login, and never touch the authenticated application surface where nearly all real functionality lives

Why:

A DAST scan can only find issues on pages and endpoints it actually reaches. Pointed at a login-gated app with no configured authentication — a login macro, session token, or credentials flag — the scanner is stuck on the public login page and whatever else is reachable pre-auth; it never crawls into the authenticated app, so a clean report here means 'nothing wrong with the login page,' not 'the application is safe.' A team that treats this green check as meaningful coverage is trusting a scan that structurally never looked at where the risk actually is — fixing it means configuring ZAP with a login script or a pre-authenticated session (a context file with authentication configured, or a valid session token) before the scan runs.

SAST & DAST Tooling/static-analysis/taint-analysis

Explain what taint analysis is in a SAST tool, and why it produces fewer false positives than plain pattern/regex matching for injection-style bugs.#

Show answer

Taint analysis tracks the flow of untrusted data — a 'source', like an HTTP request parameter, form field, or file upload — through a program's execution paths, checking whether that data can reach a dangerous operation — a 'sink', like a raw SQL query, a shell exec call, or an eval — without first passing through a sanitizer or validator on the way. Because it reasons about whether a real, reachable path actually connects a genuine source to a genuine sink, it rules out the classic false positive that plain pattern matching produces: flagging every call to a risky-looking function (any execute(), any exec()) even when the argument passed in that specific call site is a hardcoded constant that user input can never reach.

Why:

Taint analysis is a data-flow technique, not a text-matching one: it models how a value moves through assignments, function calls, and branches from where it enters the program (the source) to where it's used dangerously (the sink), and it only flags a path where no sanitizer sits in between. That reachability requirement is precisely what plain regex or AST-pattern matching lacks — matching only on the shape of a risky call site, with no notion of where its arguments actually came from, is what produces the classic 'flagged a hardcoded string passed to execute()' false positive that erodes trust in a scanner.

SAST & DAST Tooling/cicd-integration/pipeline-gating

In a CI/CD pipeline that gates merges on security scan results, SAST can serve as a pre-build gate because it analyzes source code directly, whereas DAST cannot occupy the same pre-build gate because it requires a running, accessible instance of the application to exercise live endpoints.#

Options

Show answer

True. SAST analyzes source code directly and can gate the pipeline at the commit or build stage, while DAST requires a deployed, running application to probe live endpoints, so DAST cannot serve as a pre-build gate and typically runs after deployment to a staging environment.

Why:

SAST operates on source code or bytecode without needing a compiled artifact or running service, so it can execute and gate at the commit or build stage. DAST sends HTTP requests (or other protocol probes) against a live, deployed application to discover runtime vulnerabilities such as injection or misconfiguration; without a running instance there is nothing to probe, so DAST inherently runs post-deployment to a staging or test environment and cannot block at the same pre-build stage. This architectural distinction is why SAST is positioned as a shift-left build gate while DAST typically gates later-stage promotion or release.

SAST & DAST Tooling/dynamic-analysis/active-passive-scanning

You are architecting a DAST platform for a large engineering org that runs 200+ web applications behind a mix of classic server-rendered apps and modern SPAs (React/Vue). The platform must support both passive scanning (observing traffic without injecting payloads) and active scanning (sending crafted requests to probe for vulnerabilities like XSS, SQLi, SSRF, path traversal). Design the scan orchestration system. Cover: (1) how you decide when to use passive vs active scanning for a given target, (2) how you prevent active scans from corrupting production data or triggering destructive side effects, (3) how you handle authentication/session management so scans reach authenticated surface area, and (4) how you reconcile findings across passive and active modes to avoid duplicate noise. Assume scans run against pre-production environments that mirror production but are not always clean-slate.#

Show answer

I would design a scan orchestrator with four subsystems: a traffic observer, a crawl engine, a scan policy engine, and a finding correlator.

(1) Passive vs Active Decision: The platform ingests traffic passively via a proxy sidecar or CI replay harness. For every target, passive scanning runs first — it analyzes observed request/response pairs for issues detectable without injection: missing security headers, verbose error messages, cookie attribute problems, sensitive data exposure, TLS misconfigurations. Active scanning is enabled only for pre-prod environments registered in the platform with an explicit opt-in flag. The policy engine checks environment metadata: if the target is tagged 'production', only passive scanning is permitted. If tagged 'staging' or 'qa', active scanning is authorized but subject to safety controls. The rationale: passive covers observed traffic surface area efficiently and safely; active is required to probe parameter values and injection vectors that normal traffic never exercises.

(2) Active Scan Safety: The active scanner enforces several controls. First, an HTTP method allowlist — by default only GET and HEAD are used for active probing; POST/PUT/DELETE require per-endpoint opt-in. Second, an exclusion list of destructive or sensitive endpoints (payment, account deletion, admin reset) that are never actively scanned. Third, every active payload includes a canary marker (e.g., a unique prefix like 'dastscan-<uuid>') so any data written by the scan can be identified and cleaned up post-scan. Fourth, a configurable rate limiter caps requests per second per target to avoid overload. Fifth, for pre-prod environments, the orchestrator triggers a database snapshot before the scan and a restore after, guaranteeing that any data mutations are rolled back. For environments where snapshot/restore is not feasible, the scanner is restricted to read-only method allowlist.

(3) Authentication & Session Management: Each target registers an authentication profile specifying either a scripted login flow (sequence of HTTP requests to obtain a session cookie/token) or a static bearer token with a refresh mechanism. The scanner maintains a cookie jar per scan session. Before each batch of requests, a session health check pings a known authenticated endpoint; if it returns 401 or redirects to login, the orchestrator re-runs the login script to obtain a fresh session. For multi-role coverage, the platform runs parallel scan sessions under different roles (anonymous, standard user, admin), each with its own auth profile. Token expiry is handled by a background refresh timer that proactively re-authenticates before the token's stated expiry, and reactively on session health check failure.

(4) Finding Correlation: All findings — passive and active — are normalized into a common schema: {endpoint, HTTP method, parameter, vulnerability_class, evidence, confidence, source: passive|active}. The correlator groups findings by (endpoint, parameter, vulnerability_class). When a passive finding and an active finding map to the same group, they are merged into a single finding with combined evidence and a higher confidence score. For example, passive scanning might flag a missing Content-Security-Policy header on /search, and active scanning might confirm a reflected XSS in the 'q' parameter on the same endpoint — these merge into one XSS finding with both the header-gap signal and the injection proof. Findings that cannot be correlated remain standalone. A deduplication hash based on the group key prevents the same issue from being reported multiple times across scan runs; only the most recent evidence is retained.

Why:

This question tests senior-level understanding of when and how to apply passive versus active DAST scanning, the safety guardrails required for active scanning in shared environments, session/auth lifecycle management for authenticated scanning, and finding deduplication across scan modes — all core concerns for anyone architecting a DAST platform.

SAST & DAST Tooling/dynamic-analysis/active-passive-scanning

You are building the crawling and dynamic-analysis engine for a DAST tool that must achieve high vulnerability coverage on modern single-page applications (SPAs). SPAs present challenges that traditional DAST crawlers (designed for server-rendered multi-page apps) do not handle well: client-side routing, dynamic DOM updates, state-dependent navigation, and API calls triggered by JavaScript rather than form submissions. Design the crawl-and-scan architecture. Cover: (1) how the crawler discovers and navigates SPA routes and client-side state transitions, (2) how it identifies and fuzzes API endpoints (REST/GraphQL) called by the frontend, (3) how it manages application state (e.g., a shopping cart, wizard flows) to reach deeper functionality, and (4) how it decides when crawling has reached sufficient coverage to stop or move to the next seed URL.#

Show answer

I would build the crawler on top of a headless browser (Playwright/Puppeteer controlling Chromium) with four components: a DOM explorer, a network interceptor, a state tracker, and a coverage evaluator.

(1) SPA Crawl Strategy: The crawler loads each seed URL in the headless browser, waits for network idle, then begins DOM exploration. A MutationObserver watches for DOM changes as the crawler interacts with the page. The crawler extracts candidate interactive elements (anchors, buttons, inputs with onchange handlers, elements with role=button or onclick) from the rendered DOM — not from raw HTML, since SPA content is injected by JavaScript. For each candidate, the crawler clicks or triggers the element and observes the result: a DOM diff reveals new content, a URL change (via History API pushState or hashchange) reveals a new route. Each new route is added to the crawl frontier. The crawler explicitly handles both hash-based routing (#/products) and History API routing by listening to popstate and hashchange events. Traditional static-HTML crawlers that parse href attributes fail here because SPA navigation is triggered by JavaScript event handlers, not anchor hrefs.

(2) API Endpoint Discovery & Fuzzing: The crawler enables Chrome DevTools Protocol (CDP) Network domain to intercept all XHR and fetch requests the SPA makes. Each intercepted request is logged with its URL, method, headers, and body. The network interceptor builds a catalog of discovered API endpoints. For REST endpoints, the catalog records observed parameters (query params, path params, JSON body fields) and the crawler fuzzes each parameter with injection payloads (XSS, SQLi, SSRF, path traversal markers). For GraphQL, the crawler first attempts schema introspection (querying __schema). If introspection is disabled, it parses observed query/mutation bodies to extract operation names, field selections, and variable types, then uses this to construct modified queries with injected payloads in variables and inline arguments. Discovered API calls are replayed directly via HTTP (outside the browser) for faster fuzzing, while the browser context is reserved for crawl-time discovery.

(3) Application State Management: The state tracker maintains a graph of application states. A state is defined by the current route plus salient application data (e.g., items in cart, current wizard step). When the crawler performs an action (e.g., 'Add to Cart'), it records a state transition: (route-A, action) → (route-B, cart=[item1]). The crawler uses this graph to explore deeper states by chaining actions: navigating to a product page → adding to cart → proceeding to checkout → entering shipping info. Form fields are auto-filled with heuristic values (text fields get a canary string, numeric fields get a safe integer, selects get their first option). When the crawler reaches a dead-end (no new interactive elements or routes), it backtracks to a prior state and tries an unexplored action from that state. If backtracking is not possible in the current browser session (e.g., state is irrevocably changed), the crawler resets by reloading the seed URL and replaying the action chain to return to the desired state.

(4) Coverage & Termination: The coverage evaluator tracks four metrics: (a) unique routes visited (normalized URL paths), (b) unique API endpoints discovered (method + normalized path), (c) interactive DOM elements triggered vs total discovered, and (d) unique parameters fuzzed. The crawler terminates a seed URL's exploration when it hits a coverage plateau — defined as N consecutive crawl steps (default 50) with zero increase in any of the four metrics — or when a configurable budget is exhausted (default: 15 minutes or 5,000 requests per seed). The plateau heuristic is critical because SPAs can have effectively infinite interaction paths (e.g., infinite scroll, dynamic filters), so a pure budget limit may waste time on low-value exploration. The coverage metrics are also used to prioritize the frontier: seed URLs and routes with higher estimated unexplored interactive elements are crawled first.

Why:

This question assesses senior-level knowledge of the architectural challenges DAST tools face with SPAs — browser-based crawling, API interception, stateful flow modeling, and coverage-based termination — distinguishing candidates who understand why traditional crawlers fail and how modern DAST engines must adapt.

SAST & DAST Tooling/cicd-integration/shift-left

You are designing a shift-left security program for a CI/CD pipeline. Place the following security activities in the order they can first execute during the software development lifecycle — from earliest possible (leftmost) to latest (rightmost). Each activity depends on an artifact or state produced by the preceding stage.#

Put these in order

Show answer

The SDLC ordering from earliest to latest is: IDE real-time analysis → pre-commit scanning → CI SAST gate → container image scanning → DAST against staging → manual pentesting. Each activity requires an artifact produced by the prior stage—source being written, staged changes, pushed source, a built image, a running deployment, and a production-like environment respectively.

Why:

Each activity requires an artifact or environmental state that is only available after the prior stage has produced it. IDE analysis requires only source being typed. Pre-commit scanning requires staged (formed) changes. CI SAST requires source pushed to a remote repository. Container scanning requires a built image artifact. DAST requires a live, deployed application reachable over the network. Manual pentesting requires a production-like deployment with realistic data and configuration. This dependency chain creates a strict, uncontested total order.

SAST & DAST Tooling/cicd-integration/pipeline-gating

In a monorepo with 500+ services and a shared CI pipeline, a SAST tool takes 25 minutes for a full scan. The platform team wants to enforce a hard gate on critical findings but cannot afford 25-minute builds on every push. Describe the two technical mechanisms (and their combination) that allow the pipeline to run a fast pull-request gate scan while still guaranteeing that no critical finding in the merged codebase goes undetected before it reaches production. Name each mechanism and explain how they interact.#

Show answer

Use incremental/differential scanning combined with baseline suppression. Incremental (diff-based) scanning analyzes only files changed in the pull request relative to the merge-base, reducing scan time to seconds. Baseline suppression (also called baseline gating or findings baseline) stores the set of known pre-existing findings in a baseline file; the gate then only fails on NEW critical findings introduced by the diff — pre-existing ones are suppressed. To guarantee full coverage, a scheduled nightly full scan of the entire monorepo runs the SAST tool without diff mode and without baseline suppression, feeding any newly discovered findings back into the baseline or triggering alerts. This way: (1) PR gates are fast and actionable (only new, critical, diff-scoped findings block merge), and (2) the nightly full scan ensures the entire codebase is periodically covered so no critical finding persists undetected long-term.

Why:

The two mechanisms are incremental/differential scanning and baseline suppression (baseline gating). Incremental scanning restricts analysis to changed files relative to the merge-base, making PR-gate scans fast. Baseline suppression persists known findings so only NEW findings gate the build. The nightly full scan without suppression closes the coverage gap, ensuring no critical issue in unmodified code goes undetected indefinitely. This combination is the industry-standard pattern (used by tools like Semgrep CI, Checkmarx incremental, SonarQube pull-request decoration) for balancing speed and coverage in large monorepos.

SAST & DAST Tooling/cicd-integration/shift-left

You are designing a fail-fast, shift-left security pipeline for a containerized web application deployed to Kubernetes. The pipeline must enforce security gates at the earliest stage where each gate's required input artifact exists.#

Put these in order

Show answer

In a shift-left pipeline, the six security gates fire in this order: pre-commit SAST on staged source → PR-level SCA on the resolved dependency tree → post-build container image scan → Kubernetes admission controller verifying the signed image → DAST against the deployed staging app → IAST under live production traffic. Each gate depends on an artifact (source, lockfile, built image, signed image, running app, production traffic) produced by the preceding stage.

Why:

Each gate maps to a distinct pipeline phase defined by the earliest artifact it can act upon. Pre-commit SAST (p1) runs on staged source files before the developer pushes — the earliest possible point. SCA (p2) resolves the transitive dependency tree from lockfiles during CI on the pull request; it operates on source-level metadata before the application is built, so it precedes any artifact-level analysis. Container image scanning (p3) requires the built image artifact — it cannot run until compilation and packaging produce the image layers, placing it after SCA. The Kubernetes admission controller (p4) evaluates the image at scheduling time inside the cluster; the image must already exist in the registry with its signature and SBOM attestation, so this gate fires after the image is built and scanned. DAST (p5) crawls and fuzzes live HTTP endpoints, which requires the application to be deployed and running in staging — it cannot execute until the admission controller has permitted the staging deployment. IAST (p6) instruments runtime data flows under live production traffic, which only exists after the application passes staging validation and is promoted to production. Every adjacent pair has a strict dependency: source → lockfile resolution → built image → deployable signed image → running staging app → production traffic.

SAST & DAST Tooling/fundamentals/sast-vs-dast

Consider the fundamental detection capabilities of SAST (Static Application Security Testing) and DAST (Dynamic Application Security Testing). Which of the following statements are TRUE?#

Options

Pick every one that applies.

Show answer

Statements (a), (b), and (d) are true. SAST scans source code directly, so it finds hardcoded secrets never transmitted on the wire, which DAST cannot see. DAST actively injects payloads to confirm exploitable reflected XSS, whereas SAST only flags suspicious taint flows. DAST also detects runtime misconfigurations like missing security headers without source access. Statement (c) is false because path explosion and undecidability prevent SAST from achieving full path coverage—real tools approximate and prune.

Why:

Option (a) is true: SAST analyzes source code directly and can find hardcoded secrets even if they are dead code or never transmitted. DAST only observes HTTP traffic and responses, so a secret that never appears on the wire is invisible to it. Option (b) is true: DAST actively sends exploit payloads and observes the rendered response, confirming exploitation. SAST performs taint analysis on data flows and flags potential vulnerabilities but cannot confirm runtime exploitability, leading to higher false-positive rates. Option (c) is false: SAST does NOT achieve full path coverage. Path explosion—a combinatorial blow-up in the number of feasible paths through non-trivial code—and theoretical undecidability (the halting problem) mean real-world SAST tools use approximations, abstraction, and pruning, inevitably missing or over-approximating some paths. Option (d) is true: DAST interacts with the running application from the outside and can observe response headers, accessible endpoints, TLS configuration, and exposed administrative interfaces without any source code access.

Related interview questions

The other 71 questions

This page shows 25 and marks what you pick. That's as far as a page can go. A free account opens the other 71 and keeps every answer. What you miss comes back until it's right: after a day, then at longer gaps.

Start with this topic

Free · the whole bank · 100 marked answers per 30 days · written feedback on the paid plan

What moved, monthly

One email a month when the bulletin comes out: what moved in the markets we track, and the new question topics we published. Confirm your address to join. Unsubscribe any time.