Rocket 0.5

Last reviewed Sep 20, 2026

Export as PDF

Prompt Details

Prompt Composition

2prompts
  1. Rust 1.98136 lines · 3.6K tokens
  2. Rocket 0.577 lines · 3.9K tokens
Total213 lines · 7.6K tokens

CWE Coverage

  • 20
  • 22
  • 59
  • 78
  • 79
  • 89
  • 90
  • 117
  • 125
  • 190
  • 197
  • 208
  • 209
  • 250
  • 288
  • 295
  • 306
  • 319
  • 330
  • 338
  • 347
  • 352
  • 362
  • 367
  • 378
  • 384
  • 407
  • 409
  • 416
  • 434
  • 502
  • 532
  • 552
  • 565
  • 601
  • 613
  • 614
  • 639
  • 643
  • 674
  • 770
  • 772
  • 787
  • 807
  • 829
  • 862
  • 863
  • 918
  • 942
  • 1004
  • 1275
  • 1286
  • 1336
  • 1395

Prompt Preview

Apply the Rust 1.98 baseline first. These rules cover Rocket 0.5 core APIs and deployment, and were checked against 0.5.1. Rocket declares Rust 1.64 as its minimum compiler version; the resolved dependency graph may require a newer compiler. Nightly Rust is not required.

Features and HTTP exposure

  • Enable only required Rocket features: secrets, json, tls, and mtls are opt-in; http2 is enabled by default. Review separately versioned template, database, and WebSocket crates independently; rocket_contrib is incompatible with Rocket 0.5.
  • Address unbounded empty HTTP/2 DATA frames in the Hyper 0.14 / h2 0.3 dependency stack before deployment. The published h2 fix in 0.4.16 does not satisfy Hyper 0.14's dependency. Prefer a patched edge proxy with HTTP/1.1 to Rocket and default-features = false; verify with cargo tree -e features that another dependency has not re-enabled hyper/http2. If retaining backend HTTP/2, require a proxy that enforces empty DATA frame limits and prevent direct access.
  • Place public deployments behind a proxy or load balancer that bounds connections, request rates, headers, body transfer time, and total request time. Rocket's data limits and keep_alive timeout do not provide these protections by themselves; do not use the obsolete read_timeout or write_timeout keys as controls.

Routes, guards, and authorization

  • Require a FromRequest authentication guard on every protected handler, including alternate mounts, formats, and methods. A successfully parsed FromParam identifier or Json<T> value does not authorize