Repository navigation
Conversation
Add thirteen threats derived from the OWASP Top 10 for Agentic
Applications 2026 (ASI01 to ASI08). Every rule keys on
LLM.hasAgentCapabilities, so it applies to any LLM carrying that flag.
Agent becomes a thin subclass of LLM that defaults hasAgentCapabilities
to True, instead of a separate Asset subclass. Agent("x") and
LLM("x", hasAgentCapabilities=True) are now equivalent and match the
same threats. usesExternalTools and validatesToolLaunchConfig move from
Agent to LLM, and LLM09 targets LLM so it covers both spellings.
Behaviour change: existing Agent elements inherit the LLM attributes
and defaults, so with default attributes they now also match LLM01 and
LLM07.
ASI09 and ASI10 are not covered; they need attributes the model does
not have yet.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RcpzoonTku9xg2z9GSqXBj
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add agentic threats AG01-AG13; make
AgentanLLMwith agent capabilitiesBranch:
feat/agentic-threatsSummary
Agentinto a thin subclass ofLLMthat defaultshasAgentCapabilitiestoTrue.Agent("x")andLLM("x", hasAgentCapabilities=True)are now the same thing and match the same threats.Agent(breaking)Agentwas a separateAssetsubclass with two fields of its own. It is now:usesExternalToolsandvalidatesToolLaunchConfigmove fromAgenttoLLM, so an agenticLLMcan express everything anAgentcan.LLM09changes target fromAgenttoLLM. Its condition is unchanged.Agentelements inherit theLLMattributes and defaults, so they start matchingLLMthreats. With default attributes that isLLM01andLLM07.On the sample
tm.pythe finding count goes from 138 to 144. New findings:LLM01,LLM07,AG02andAG06on "Moderation Agent",AG03on its query flow,AG09on "SQL Database". Nothing is removed.Threats
Every rule requires an
LLMwithhasAgentCapabilities is Truesomewhere in the condition. A plainLLMnever triggers them.hasContentFilteringusesExternalToolswithoutimplementsPOLPorhandlesResourceConsumptionauthorizesSourceauthorizesSourceusesExternalToolswithoutusesCodeSigningauthenticatesDestinationorprovidesIntegrity, or accepts a request from one withoutauthenticatesSourceorprovidesIntegritysanitizesInputorisHardenedvalidatesInputisShared, holds PII or sensitive data, nohasAccessControlisEncrypted,authenticatesSourceorprovidesIntegrityimplementsNoncehandlesResourceConsumptionDetails worth a reviewer's attention:
inputsandoutputsonly hold forward flows, and the usual way an agent ingests untrusted content is the response to its own request (fetch a page, call a tool). The untrusted and sensitive legs therefore also look atf.responseon outgoing flows. A request to an external element also counts as egress, so "agent fetches a web page and reads customer records" is enough to fire.hasContentFilteringas the closing control, the same attributeLLM01andLLM02use.processesUntrustedInput=Falsealso closes it.LLM05, AG07 overlapsDE01/AC05, AG10 overlapsAC02, AG11 overlapsDE01. The new entries carry agent-specific descriptions and mitigations.Not covered
requiresHumanApprovalattribute.ProcessorLambdasink, and AG09 cannot tell a memory write from a query, because the model has no attribute for either.Tests
TestAgenticThreatsintests/test_pytmfunc.pyruns every rule twice, once withAgentand once withLLM(hasAgentCapabilities=True). Each rule has a firing case, a mitigated case, and a case showing a plainLLMor a non-agent element does not trigger it. One end-to-end test builds a model, runstm.check()andtm.resolve(), and asserts all thirteen appear in the findings.TestAgentasserts thatAgentadds no fields and differs from an agenticLLMonly by the default.Full suite: 365 passed on Python 3.13.
ruff checkandruff format --check pytm testsare clean. Not run on 3.11, 3.12 or 3.14 locally.Notes
docs/threats.mdis not regenerated. It is already behindthreats.jsonon master (it lacksLLM01toLLM10), so regenerating here would pull unrelated entries into the diff.make docs/threats.mdbrings it up to date.AGprefix is a proposal.targetscope fix. AG13 is written withf.sourceso it works either way. Both PRs add to## [Unreleased]inCHANGELOG.md, so whichever merges second needs a trivial conflict resolution there.🤖 Generated with Claude Code
https://claude.ai/code/session_01RcpzoonTku9xg2z9GSqXBj