Fiber 3.5.0
Last reviewed Sep 24, 2026
Prompt Details
Prompt Composition
2prompts
- Go 1.27130 lines · 5.5K tokens
- Fiber 3.5.079 lines · 3.3K tokens
Total209 lines · 8.8K tokens
CWE Coverage
- 15
- 20
- 22
- 59
- 78
- 79
- 89
- 94
- 117
- 190
- 208
- 209
- 250
- 252
- 257
- 287
- 295
- 307
- 311
- 323
- 327
- 338
- 347
- 352
- 362
- 367
- 378
- 384
- 426
- 444
- 488
- 494
- 522
- 532
- 552
- 601
- 613
- 614
- 639
- 672
- 732
- 759
- 770
- 772
- 807
- 862
- 863
- 915
- 916
- 918
- 942
- 1004
- 1275
- 1395
Prompt Preview
Apply the Go 1.27 baseline first. These rules cover github.com/gofiber/fiber/v3 at 3.5.0. Use Fiber and fasthttp controls for its native HTTP stack; the baseline's net/http server settings and middleware apply only at an explicitly configured net/http boundary.
Routing and authorization
- Register authentication and authorization before protected routes,
Grouphandlers, and mounted applications. Return immediately on failure without callingc.Next(), and restrict middlewareNextskip predicates to deliberately public requests. - Populate authentication values in
c.Localsonly from verified credentials, using private typed keys. Authorize the final tenant and object selected throughc.Params, binding, or storage; group membership and route constraints do not grant access. - Check authorization across automatically registered
HEADroutes, manual overrides,All, wildcards, and fallbacks. Align checks withCaseSensitive,StrictRouting, andUnescapePath; a failed route constraint can select another matching route. - Keep
SkipUnmatchedRoutesdisabled when global logging or throttling must cover unregistered paths. Enabling it returns early 404/405 responses before middleware, except for CORS preflight requests. - Supply pre-hashed passwords to
basicauth.Config.Users, choosing bcrypt for password storage. Make custombasicauth.Config.Authorizerandkeyauth.Config.Validatorcallbacks fail closed, and retain the header-based KeyAuth extractor instead of accepting API keys from URLs.
Binding and request limits
- Choose explicit