Threat Modeling in Agentic Development: What Changes and How to Adapt

|

Educational

Team Seezo

When coding agents write the code, design decisions move into tickets and prompts. Here’s how threat modeling changes, and five steps to adapt.

Abstract blue and purple paint texture

In 2025, two security researchers logged into McHire, McDonald’s AI-powered recruitment platform, using 123456 as both the username and password. They discovered an API that let them access other applicants’ records simply by changing an ID in the request. The records included applicants’ contact information and chat histories. The researchers identified more than 64 million applicant ID numbers, though Paradox.ai says only a fraction of those records contained personal information.

Their investigation had initially focused on Olivia, McHire’s chatbot, and whether it could be manipulated through prompt injection. Instead, they found a dormant test account that hadn’t been decommissioned and an API that didn’t check whether users were authorized to access applicants’ records.

The test account shouldn’t have remained active, and the API shouldn’t have returned another applicant’s data without verifying access. Both are issues threat modeling could have caught at the design stage.

Design gap at McHire
Requirement that would have caught it
Staff login path skipped SSO and MFA
All staff logins go through SSO with MFA
Test account with 123456 still live
No test or default accounts in production
API returned any applicant by ID
Verify the caller can see that record

McHire is a reminder that security requirements need to be considered before implementation, not after vulnerabilities surface. This matters even more as coding agents take on more of the development work, making decisions about how features are built based on the requirements they receive. If security isn’t part of those requirements, it can easily be missed.

But how does threat modeling change when AI agents are writing the code? And how can security teams adapt?

How is threat modeling different when agents are writing the code?

Threat modeling hasn’t changed in its fundamental purpose: understand the system, identify the assets, name threat actors, identify threats, decide on mitigations and verify whether the identified security requirements are implemented.

The conditions under which it operates have changed: where design decisions are made, when they’re made, how many changes are produced, how quickly code is generated, and who uses the output.

Traditional
Agentic development
Where decisions are made
Architecture docs and diagrams
Tickets, prompts and agent plans
Timing
Design review before build
Decided while the agent codes
Volume
High-risk features only
More PRs, bigger changes
Speed
Days or weeks per change
Reworked within one session
Who uses the output
Engineers read a report
The agent needs it in context

Where design decisions are made

Traditional threat modeling usually starts from an architecture document or diagram that describes the system’s components and data flows. Reviewers model the system as that document describes it.

In agentic development, design decisions also emerge from tickets, specifications, prompts and implementation plans. Coding agents interpret these inputs and fill in gaps where requirements are incomplete. But an agent’s assumptions about how a feature should work don’t necessarily account for how it could be abused.

In an experiment conducted in December 2025, the security company Tenzai had five coding agents build the same three applications from identical prompts. When the prompts didn’t specify that order quantities had to be positive, four of the five agents accepted negative quantities. The agents implemented the functionality without accounting for an input that could be abused.

This means threat modeling can’t be limited to reviewing architecture documents. It also needs to examine the instructions agents work from and the assumptions they make when turning those instructions into a design.

Timing

In a traditional process, threat modeling is tied to a point in the lifecycle, usually a design review before implementation. Days or weeks of development follow, so the review’s output can still shape the code.

With coding agents, the plan and the working code often come out of the same session. An agent makes security-relevant decisions while it writes code. A review scheduled after implementation sees those decisions only once they are already in the code.

Volume

Traditional threat modeling is often reserved for high-risk systems or major features because security teams have limited capacity. BSIMM16 reports that 46% of participating firms conduct design reviews for high-risk applications, while Google’s security team acknowledges that it can complete only a finite number of threat models each year.

Coding agents add to the work that limited capacity has to cover. More teams are using them: a 2026 study of 128,018 GitHub projects estimated coding agent adoption at 22.20% to 28.66%, and rising. Teams that use them also produce more changes. At Microsoft, engineers who adopted Claude Code and GitHub Copilot CLI merged roughly 24% more pull requests than they would have otherwise.

In a study of merged GitHub pull requests, agent-authored PRs averaged 18.3 commits, against 4.6 for human-authored PRs, by our calculation from the study’s data.

Speed

In a traditional review cycle, a design is reviewed before implementation, and the code takes days or weeks to write. Threat modeling has that time to influence what gets built.

Coding agents shorten this process. They can generate, modify and rework code within a single development session, making security-relevant implementation decisions outside formal design-review cycles. In a Harvard study of 655 firms, pull requests opened rose by 35.7% within 12 months of adopting AI coding agents. The review step did not keep up. The time from submitting code for review to approving it rose by 56.1%. More code reaches review and waits there longer.

Who uses the output

A traditional threat model ends as a report or a list of threats and related mitigations for engineers and security reviewers. Engineers turn those mitigations into security controls and considerations for new features.

In agentic development, the coding agent also needs those requirements, and it can only act on what is in its context. In the same Tenzai experiment, all five agents introduced SSRF in a link preview feature when they were given no security guidance. A 2026 study of secure code generation found that the security of generated code depends on whether prompts include actionable mitigations matched to the weakness.

This means the coding agent is now a consumer of the threat model’s output. The security requirements have to reach the agent, in a form it can act on.

How do you threat model software built by AI agents?

Threat modeling follows four fundamental questions: What are we working on? What can go wrong? What are we going to do about it? Did we do a good job?

In agentic development, security requirements need to reach the coding agent, and the implementation needs to be checked against them. Here’s a five-step approach:

  1. 1. Threat model the ticket
    Ticket, spec or agent plan
  2. 2. Map trust boundaries
    Identify threats at each boundary
  3. 3. Write testable requirements
    Each mitigation gets a test
  4. 4. Put requirements in the agent’s context
    Ticket, plan or AGENTS.md
  5. 5. Check the pull request
    Code against each requirement
Before the agent builds
While and after it builds
Revisit step 2 if the PR adds new components

Step 1: Threat model the ticket, spec or agent plan

Threat modeling traditionally begins with a design document or architecture diagram. In agentic development, the ticket, specification or implementation plan can be equally important, because these are often the inputs an agent uses to build a feature.

Consider a ticket for an applicant records API like McHire’s: an endpoint that returns an applicant’s profile and chat history to a hiring dashboard. The ticket might specify the endpoint, the fields and the response format without saying which users may see which applicants.

Review the inputs the agent will work from. Understand what the feature does, what data it handles, which systems it interacts with, who can access it and what assumptions the implementation depends on. If the agent has already generated a plan, examine it for architectural decisions not explicit in the original ticket.

Step 2: Map trust boundaries and identify threats

Identify the components involved, the data moving between them and the trust boundaries where data or control passes between security contexts.

For the applicant API, the components might include the hiring dashboard, the login service, the API, the applicant database and the chat history store.

Consider what could go wrong at each boundary. Could a user retrieve another applicant’s record by changing the ID in the request? Could someone sign in through a login path that bypasses SSO or MFA? Could a test account with default credentials remain active in production? Could the response include data the dashboard doesn’t need?

Use a framework such as STRIDE to systematically identify threats across components and data flows. Focus on threats relevant to the feature’s architecture rather than generic security concerns.

Step 3: Write each mitigation as a testable requirement

Threats need mitigations that can be implemented and verified. Vague recommendations such as “ensure secure access” or “validate user input” leave too much room for interpretation.

For the applicant API:

Threat: A user could retrieve another applicant’s record by changing the ID in the request.
Security requirement: The API must verify that the requesting user is authorized to view the applicant’s record. It must reject the request otherwise, even when the ID is valid.
Test: Request a record the user is not authorized to view, using a valid ID. The request must be rejected.

Threat: A test account with default credentials could remain active in production.
Security requirement: Production must not contain test or default accounts, and test accounts must expire automatically.
Test: Attempt to sign in to production with known test or default credentials. The attempt must fail.

Requirements should describe expected security behavior, including what the system must prevent or reject, with conditions that can be tested.

Step 4: Put the requirements in the agent’s context

Security requirements identified in the design stage have to reach the coding agent while planning and implementing the feature.

But generic security instructions are not enough. SUSVIBES, a benchmark built from real open-source coding tasks, tested three approaches: a generic security reminder, asking the agent to identify risks before implementation, and telling it which vulnerability type to avoid. None meaningfully reduced vulnerabilities.

This makes the specificity of security requirements important. Instead of telling an agent to write secure code, give it concrete security behaviors to implement for the feature being built.

For the applicant records API, explicitly instruct the agent to enforce authorization checks on every request to retrieve applicant data, including verifying that the authenticated user is authorized to access the requested applicant.

These requirements give the agent something specific to implement and reviewers something concrete to verify. But explicit requirements don’t guarantee the implementation will meet them.

Step 5: Check the pull request against the requirements

This step closes the loop between the threat model and the code.

Check the code against each requirement from Step 3. For the applicant API, confirm that:

  • The API checks authorization on every applicant record request, including requests that use a valid ID for another applicant.

  • No other endpoint returns applicant records without the same check.

  • The production configuration contains no test or default accounts.

Review the implementation, not just the agent’s explanation of what it changed. If it introduces new components, data flows or trust boundaries, revisit the threats and requirements. The implementation may reveal assumptions that weren’t apparent during design.

How Seezo addresses threat modeling in agentic development

Seezo brings automated threat modeling into the AI-driven development workflow, from design decisions to implementation and validation. It helps security teams scale review coverage, get security requirements into coding agents, and verify that those requirements are met.

The Seezo AI Plugin brings feature-specific security guidance directly into Claude Code, Cursor and GitHub Copilot. Coding agents can access this guidance while planning and implementing features, without adding a separate review cycle to development or causing developer friction.

Seezo also validates the resulting implementation against the identified security requirements. Because assessments can run across tickets and coding sessions, security coverage becomes less dependent on the number of manual threat models a security team can complete.

Seezo provides governance across assessments and security requirements in agent-driven development. For regulated organizations, this gives security teams and auditors visibility into the security decisions, requirements and validation associated with agent-driven changes.

Frequently asked questions

Is threat modeling still necessary when AI writes the code?

Yes. AI coding agents can improve implementation, but they cannot reliably infer every architectural constraint, business rule or trust boundary from incomplete requirements. Threat modeling helps identify these risks before they become implementation decisions.

Who owns threat modeling when AI agents write code?

AppSec owns threat modeling standards, risk criteria and oversight. Engineering teams are responsible for providing context, addressing findings and implementing security requirements.

Is threat modeling an AI agent the same as threat modeling software built by AI agents?

No. Threat modeling an AI agent examines threats associated with the agent itself, including its tools, permissions and interactions. Threat modeling AI-built software examines the application architecture, data flows, trust boundaries and vulnerabilities in the software the agent creates.

Seezo
© 2026 Seezo. All rights reserved.