Phoenix 1.7
Last reviewed Oct 11, 2026
Prompt Details
Prompt Composition
3prompts
- Erlang/OTP 27119 lines · 3.4K tokens
- Elixir 1.1859 lines · 1.9K tokens
- Phoenix 1.768 lines · 2.6K tokens
Total246 lines · 7.9K tokens
CWE Coverage
- 20
- 22
- 59
- 73
- 78
- 79
- 95
- 113
- 117
- 201
- 208
- 209
- 214
- 250
- 287
- 295
- 297
- 306
- 307
- 311
- 312
- 319
- 338
- 347
- 352
- 362
- 367
- 384
- 400
- 407
- 444
- 470
- 494
- 497
- 502
- 522
- 532
- 552
- 601
- 611
- 613
- 614
- 639
- 674
- 732
- 755
- 770
- 772
- 789
- 799
- 807
- 829
- 862
- 863
- 915
- 916
- 918
- 940
- 1275
- 1287
- 1395
Prompt Preview
Apply Elixir 1.18 and Erlang/OTP 27 first. Phoenix 1.7 gets security patches only, no bug fixes. Elixir 1.11+/OTP 22.1+ are compatibility minimums; select safe runtimes through the OTP prompt's version rule. When using Ecto or LiveView, apply the Ecto or Phoenix LiveView prompt for its installed version.
Router pipelines and route reachability
- Generated
:apipipelines run onlyplug :accepts, ["json"]; add authentication, token/CSRF checks, rate limiting before state changes. - Keep
:fetch_sessionbefore:protect_from_forgeryin browser pipelines:Plug.CSRFProtectionneeds fetched sessions. - Enforce authentication/authorization before or inside
forward/4: preceding pipelines run, later routes do not. - Pair
live_sessionwithon_mount: socket reconnections skippipe_through. - Authorize loaded records in actions/mounts:
pipe_through/live_sessiongate routes, never parameter identifiers.
Verified routes, redirects, and HEEx rendering
- Use
Phoenix.VerifiedRoutes~plinks; reserveunverified_path/3/unverified_url/3for destinations outside the router. - Never pass input to
redirect(external: ...): it bypasses:tolocal-path validation, permitting open redirects. - Interpolate input in HEEx expressions, never assembled markup. Review every
raw/1and customPhoenix.HTML.Safe. - Reject
javascript:,data:,vbscript:before user URLs reach<.link href={...}>. - Match response
content-typeto rendered formats; never serve JSON as browser-parsed HTML. - Keep browser
:put_secure_browser_headers; add restrictive