Spring Boot 4.0
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
2prompts
- Java 25113 lines · 2.8K tokens
- Spring Boot 4.083 lines · 3.7K tokens
Total196 lines · 6.6K 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
- 379
- 409
- 427
- 444
- 470
- 471
- 494
- 502
- 532
- 611
- 613
- 614
- 653
- 681
- 732
- 749
- 770
- 772
- 776
- 789
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1004
- 1275
- 1333
Prompt Preview
Apply the Java 25 baseline first. These rules cover Spring Boot 4.0.8 on the modular 4.0 jars, including the Jackson 3 and HTTP client defaults this line introduced. When Spring Security is on the classpath, also apply the Spring Security 7.0 prompt for login, logout, session, CORS, and rate-limit rules.
Modules and dependencies
- Declare your own production
SecurityFilterChainwith a catch-all rule instead of Boot's default web security, and test that unauthenticated requests to application paths and Actuator are rejected. On Boot 4.0.0 through 4.0.5, which predate the 4.0.6 fix, a servlet app relying on the default chain withspring-boot-actuator-autoconfigurebut nospring-boot-healthgets a chain with no authorization rule, leaving every endpoint unauthenticated. - The
spring-boot-<module>jar split is security configuration: removing a module silently removes the auto-configuration enforcing a default, so assert resulting behavior rather than assume a starter supplies it. - Pin dependencies through the Spring Boot 4.0 BOM and Spring Framework 7.0, compatibility-testing coordinated overrides when an advisory affects managed versions.
- The newest 4.0 patch doesn't prove its managed Jackson, Netty, Tomcat, and Jetty releases are patched; the BOM often trails them. Before release, check each against its project's advisories and a resolved-tree scan, since advisories reach scanners late or without ranges, and name versions you couldn't check. Override through
jackson-bom.version,jackson-2-bom.version,netty.version,tomcat.version, orjetty.version