Spring Boot 4.1
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
3prompts
- Java 25113 lines · 2.8K tokens
- Spring Framework 7.070 lines · 2.4K tokens
- Spring Boot 4.162 lines · 2.7K tokens
Total245 lines · 7.9K tokens
CWE Coverage
- 15
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 95
- 117
- 190
- 201
- 208
- 209
- 214
- 250
- 295
- 297
- 306
- 319
- 323
- 327
- 338
- 346
- 347
- 352
- 362
- 367
- 378
- 409
- 427
- 470
- 471
- 494
- 502
- 524
- 532
- 611
- 653
- 681
- 732
- 749
- 770
- 772
- 776
- 789
- 807
- 829
- 862
- 863
- 913
- 915
- 916
- 918
- 922
- 942
- 1333
Prompt Preview
Apply the Java 25 and Spring Framework 7.0 prompts first.
Configuration ownership
- Treat command-line arguments, system properties, environment variables, imported files, and remote configuration as privileged; higher-precedence sources replace packaged security settings.
- Allowlist
spring.config.importlocations;optional:can hide missing production policy, andconfigtree:maps mounted filenames into configuration keys. - Bind security configuration with
@Validated@ConfigurationProperties, a Jakarta Validation provider, and@Validon nested properties, failing on missing production values, with no permissive placeholder defaults for issuer, origin, proxy, TLS, or credentials. - Keep secrets out of
/env,/configprops, startup logs, failure analyzers, build metadata, and image layers, even when Actuator masks values. - Separate developer and production profiles, and never let request data choose
spring.profiles.active, config imports, bean conditions, or feature flags. - Treat
spring.security.oauth2.resourceserver.jwt.authorities-claim-expressionsas privileged code: Boot parses each entry as SpEL, which Spring Security evaluates against token claims in a defaultStandardEvaluationContextallowing type references, constructors, and arbitrary method calls. Set it only from deployment-controlled configuration, never tenant-editable, request, or token-derived values.
Auto-configuration and server boundaries
- A servlet
SecurityFilterChainor reactiveSecurityWebFilterChainreplaces default access rules; provide a complete catch-all chain