Cap explicit LLM tool-execution budgets (OWASP LLM10)
ProprietaryCompose framework-specific tool-execution budget policies: Spring AI individual tool calls per turn and LangChain4j tool-calling round trips per invocation. These are different units and require independently selected positive ceilings. Lower ceilings can interrupt workflows. Run either child separately to select one framework. Does not infer absent limits, change authorization, or bound total application traffic or execution time.
org. openrewrite. ai. security. LimitLlmToolExecutionRequired
A positive ceiling on individual Spring AI tool executions across all tools per turn. Applied only to explicit total limits or explicit unlimited total calls.
A positive ceiling on LangChain4j model responses containing tool calls per service invocation. Each round trip may contain multiple tools. Applied only to explicit limits.
mod run . --recipe= org. openrewrite. ai. security. LimitLlmToolExecution \
-P maximumToolCalls=20 \
-P maximumRoundTrips=10Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.