Skip to content

fix(security): rate-limit XFF default and key prune - #69

Merged
ArianAr merged 1 commit into
mainfrom
fix/66-rate-limit-direct-deploy
Jul 15, 2026
Merged

fix(security): rate-limit XFF default and key prune#69
ArianAr merged 1 commit into
mainfrom
fix/66-rate-limit-direct-deploy

Conversation

@ArianAr

@ArianAr ArianAr commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • Default TRUSTED_PROXY_HOPS is 0 (ignore XFF) for safe direct deploys
  • In-memory rate limiters prune expired keys and cap map size
  • Compose / docs / SECURITY / README: set hops 1 behind a reverse proxy

Closes #66

Test plan

  • pnpm test (122 tests)
  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • CI aggregate ci green

@ArianAr
ArianAr force-pushed the fix/66-rate-limit-direct-deploy branch from bac6a32 to 3c725da Compare July 15, 2026 23:35
Ignore X-Forwarded-For by default so direct deploys cannot bypass create
or unlock rate limits via spoofed client IPs. Opportunistically prune and
cap in-memory limiter maps. Document hops=1 for reverse-proxy setups.

Closes #66
@ArianAr
ArianAr force-pushed the fix/66-rate-limit-direct-deploy branch from 3c725da to b8c0d16 Compare July 15, 2026 23:43
@ArianAr

ArianAr commented Jul 15, 2026

Copy link
Copy Markdown
Owner Author

Code review summary

Reviewed rate-limit XFF default + prune/evict.

Verdict: No bug-severity findings. Suggestions only (nginx docs note for hops≥1; optional fail-closed overflow) — non-blocking.

Rebased onto main after #68. Waiting for CI green then merge.

@ArianAr
ArianAr merged commit 16bddd8 into main Jul 15, 2026
9 of 10 checks passed
@ArianAr
ArianAr deleted the fix/66-rate-limit-direct-deploy branch July 15, 2026 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

security: rate-limit bypass on direct deploy (XFF hops + prune)

1 participant