SAST and DAST in the SDLC answer one question from two sides: SAST reads the code of every change before it merges and DAST attacks the running system on staging. This post follows one flaw, a database query built from user input, through both scans to show what each one sees, what each one misses and how a finding becomes a ticket in an AI SDLC. The wider method is covered in What is an agentic SDLC?
01The flaw: a search that builds its query from the search box
The sample project is an order management app. Its orders page has a search box and the search function adds the typed text straight into a database query. The line below is illustrative.
A person who types a quote character followed by a condition that is always true changes the meaning of the query. The safe version passes the text to the database as a value in a parameter, which keeps it from being read as part of the command.
02One flaw, two reports
In the sample project the SAST agent flagged the query on the pull request, rated it high and cited the file and the line. The same flaw would look different from staging, because DAST never reads the code: it sends requests to the running app and reports what comes back.
The two reports lead to different fixes. The first points a developer at a line to change. The second points at a route and a request that reproduces the behaviour, which a developer then has to trace back to the code.
03What each scan catches and misses
Each scan reaches what the other cannot, so the two together cover more than either alone.
04What the same flaw class did in the MOVEit breach
A query built from input is not a classroom example. From 27 May 2023 the CL0P ransomware gang exploited a previously unknown SQL injection flaw, CVE-2023-34362, in Progress Software's MOVEit Transfer file transfer product. The group used it to install a web shell on internet-facing MOVEit Transfer servers and to steal data from the databases behind them, according to the joint CISA and FBI advisory. The flaw is catalogued as CWE-89, a query assembled from input that an attacker controls, which is the class that both scans in this post are built to find and the one used as the worked example in this post.
05Where each scan runs in the pipeline
SAST sits inside Build, on every pull request and ahead of the merge. DAST sits in Verify, after the Stage wing has deployed the build and loaded test data and test accounts. Verify also runs the traced tests described in Test cases from requirements against the same staging build.
Each scan stands before a signed gate. A person approves the change at the Build gate with no high or critical security findings open and a person accepts the test evidence at the Verify gate with no critical or high findings open. The AI SDLC maturity model places scans on every change at level 4, the level at which a named person signs each hand-off.
06From finding to closed ticket
A finding from either scan becomes a ticket on the same board as the project's other defects, linked to the code it concerns and to the requirement or policy it touches, the same linking that keeps a requirements traceability matrix current. The ticket then follows one loop: the Dev agent fixes it, the Review agent checks the fix and the scan runs again. Keeping the reviewer separate from the author of the change is the practice described in what AI coding agents do well and where they need a spec.
In the sample project the SAST finding on the pull request went round the loop and ended fixed, rescanned and clear to merge. On staging the DAST run reported one medium finding, a missing content security policy header and one low finding, a session cookie without the SameSite setting. It found no blockers and each finding became a ticket.
07Where Orlian fits
In Orlian the SAST agent in the test-first AI coding agents wing scans every pull request before it merges and the DAST agent in the AI test automation wing attacks staging with the test accounts that the Stage wing creates. Both grade findings by severity and file them to the same board as every other defect and two of the five signed gates stop work while serious findings are open.
A query built from input is the weakness class behind the MOVEit breach. In the sample project the same class was flagged on a pull request, before the change merged, which is the reason an AI SDLC runs SAST on every change and keeps DAST for the staging checks that code alone cannot show.

