Spring AI 1.1
Last reviewed Sep 11, 2026
Prompt Details
Prompt Composition
3prompts
- Java 21124 lines · 3.9K tokens
- Spring Boot 3.572 lines · 3.8K tokens
- Spring AI 1.159 lines · 2.1K tokens
Total255 lines · 9.8K tokens
CWE Coverage
- 15
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 95
- 117
- 190
- 197
- 201
- 208
- 209
- 250
- 295
- 297
- 306
- 307
- 319
- 323
- 327
- 338
- 346
- 347
- 352
- 362
- 367
- 378
- 384
- 427
- 444
- 470
- 471
- 488
- 489
- 494
- 502
- 532
- 611
- 613
- 639
- 653
- 674
- 732
- 749
- 759
- 770
- 772
- 776
- 789
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1333
- 1427
Prompt Preview
Apply the Spring Boot 3.5 baseline first. These rules cover Spring AI 1.1.8 model, advisor, memory, retrieval, MCP, and tool boundaries.
Prompt and model boundaries
- Keep system instructions in trusted templates and insert user text as data variables; retrieved text, model output, tool results, and memory remain untrusted even when labeled as system context.
- Bound input tokens, output tokens, media bytes, completion count, and model-call timeout at the application boundary because provider defaults differ and can change.
- Build provider options server-side; never accept model IDs, base URLs, credentials, response formats, or provider-specific option maps directly from a request.
- Treat
BeanOutputConverterand other structured-output converters as parsing aids, not validation guarantees; validate the converted object and reject extra operations or unsafe values. - Apply content moderation and policy checks both before the model call and after model/tool output when either direction can cause a security action.
Tool registration and execution
- Supply the smallest request-specific
ToolCallbackset and keep privileged tools out ofdefaultTools()and application-wide callback registries. - In 1.1,
DefaultToolCallingManagerlooks for a requested callback in the prompt and then falls back to itsToolCallbackResolver; configure that resolver with only universally callable tools, or an empty static resolver, so a model cannot invoke an unadvertised privileged bean by name. ToolCallingChatOptions.internalToolExecutionEnableddefaults totrue, and