Play Framework 3.0
Last reviewed Oct 11, 2026
Prompt Details
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 88
- 89
- 95
- 113
- 117
- 190
- 197
- 201
- 204
- 208
- 209
- 214
- 295
- 297
- 306
- 307
- 319
- 323
- 327
- 338
- 346
- 347
- 352
- 362
- 367
- 378
- 384
- 427
- 434
- 444
- 459
- 470
- 471
- 476
- 488
- 489
- 494
- 502
- 524
- 525
- 532
- 552
- 598
- 601
- 611
- 613
- 614
- 653
- 674
- 681
- 732
- 749
- 759
- 770
- 772
- 776
- 789
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1004
- 1275
- 1333
Prompt Preview
Apply the Scala 3.3 prompt and its Java 21 baseline first. These rules cover Play Framework 3.0's Scala APIs and Twirl. Java 21 is within the line's documented Java 11, 17, and 21 LTS support. Use org.apache.pekko APIs and the corresponding pekko.* and play.server.pekko.* configuration for Play 3.0.
Routes, filters, and authorization
- Preserve
CSRFFilter,SecurityHeadersFilter, andAllowedHostsFilterwhen customizing filters. Append withplay.filters.enabled +=; a rootFiltersclass, explicitplay.http.filters, replacement enabled list, or disabledPlayFiltersplugin can remove defaults. IncludeHttpFiltersComponentswhen using compile-time dependency injection. - Keep policy coverage when implementing
HttpRequestHandleror filters: routing precedes filtering, and invoking another action directly from a filter skips the remaining chain. Delegate through the configured handler and filter pipeline for alternate routes and errors. - Review first-match route ordering, mounted routers, and fallback handlers. Validate wildcard
*pathand regex route parameters explicitly: these are not decoded on input or encoded by reverse routing, unlike ordinary:idsegments. Avoid decoding a value twice or allowing raw reverse-route parameters to change URL structure. - Compose authenticated
ActionBuilder,ActionRefiner, andActionFilterimplementations withandThen; derive identity from verified credentials and load each object within the authorized tenant before checking its current permissions.Security.Authenticatedis a helper, not an