Repository navigation
Follow-ups from post-merge review of #4 - #5
Conversation
…values, fix LRU test assertion, unset direct-PAT in env template - NETBIRD_TRUST_PROXY now rejects bare booleans (true/yes/on) at startup: 'trust proxy: true' makes Express trust the client-controlled leftmost X-Forwarded-For entry, letting anyone spoof their IP past the per-IP rate limits. Hop counts and presets remain supported. - The LRU eviction test compared b's fresh limiter against a's instance, which is never equal regardless of eviction; it now captures and compares b's original reference. - .env.example leaves NETBIRD_ENABLE_DIRECT_PAT unset so the documented auto-enable-when-OAuth-off fallback still applies to copied templates.
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Addresses the three review comments left on #4 after merge.
Reject permissive
NETBIRD_TRUST_PROXYvaluesparseTrustProxy()acceptedtrue/yes/onand passed the resultingtruestraight to Expresstrust proxy. In that mode Express trusts the leftmostX-Forwarded-Forentry — fully client-controlled — so any caller could spoof its IP and bypass the per-IP rate limits introduced in #4 (login form, per-source PAT verification, OAuth routes). An operator typingNETBIRD_TRUST_PROXY=trueto mean "yes, I'm behind a proxy" silently got the unsafe mode.Bare booleans now fail startup with a message pointing at the safe equivalents (a hop count such as
1, or an Express preset/subnet such asloopback/10.0.0.0/8), which can always express the same intent without the spoofing exposure.false/no/off, hop counts, and presets behave as before. README and.env.exampleupdated to match.Fix the LRU eviction assertion
The size-cap test asserted
pool.get("b")).not.toBe(a)— comparing b's limiter against a's instance, which is never equal whether or not eviction happened. It now captures b's original limiter and asserts the re-get returns a different instance, mirroring the TTL test.Leave
NETBIRD_ENABLE_DIRECT_PATunset in.env.exampleThe template pinned it to
false, but the config fallback (!oauthEnabled) only applies when the variable is undefined. Copying the template and later settingNETBIRD_ENABLE_OAUTH=falseleft the deployment with no HTTP auth path, contradicting the comment above the line. The template now leaves it blank so the documented auto-enable still applies.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.