Jackson 3.2
Last reviewed Sep 9, 2026
Prompt Details
Prompt Composition
2prompts
- Java 25113 lines · 2.8K tokens
- Jackson 3.261 lines · 2.2K tokens
Total174 lines · 5K tokens
CWE Coverage
- 20
- 22
- 59
- 78
- 79
- 88
- 89
- 95
- 116
- 117
- 190
- 201
- 208
- 209
- 214
- 295
- 297
- 323
- 327
- 338
- 347
- 362
- 367
- 378
- 407
- 427
- 470
- 471
- 494
- 502
- 532
- 611
- 653
- 681
- 732
- 770
- 772
- 776
- 789
- 807
- 862
- 863
- 915
- 916
- 918
- 922
- 942
- 1287
- 1333
Prompt Preview
Apply the Java 25 baseline first. These rules cover Jackson 3.2.3 tools.jackson.* databinding, polymorphism, coercion, duplicate keys, and stream constraints.
Request mapper and contracts
- Build a dedicated immutable request
JsonMapperfrom trusted startup configuration; do not mutate shared defaults or register request-selected modules, mix-ins, subtypes, or handlers. - Enable
DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES; Jackson 3 defaults it to false, so extra attacker fields are otherwise silently ignored. - Audit
@JsonIgnoreProperties(ignoreUnknown=true),@JsonAnySetter, andDeserializationProblemHandlerimplementations, which can bypass unknown-property rejection. - Keep Jackson 3's
FAIL_ON_NULL_FOR_PRIMITIVES=trueandFAIL_ON_TRAILING_TOKENS=true, and enable missing/null creator-property failures where the contract requires them. - Disable
MapperFeature.ALLOW_COERCION_OF_SCALARSto reject string and other mismatched scalar coercions. Separately disableDeserializationFeature.ACCEPT_FLOAT_AS_INT(enabled by default), or setCoercionAction.FailforCoercionInputShape.FloatonLogicalType.Integer, because disabling scalar coercion alone still binds1.9to anintas1. Audit per-class, per-type, and defaultCoercionConfigentries, which take precedence over both flags. - Deserialize into narrow request records/classes and separately validate ranges, lengths, formats, cross-field rules, tenant ownership, and allowed state transitions. Give each write path its own type rather than relying on
@JsonViewto limit which