fix(security): address PR #404 review feedback#405
Conversation
HIGH SEVERITY: - Expand private bridge IP validation to include RFC1918 ranges (10.x, 172.16-31.x, 192.168.x) - Gate dev CORS origins behind NODE_ENV !== 'production' - Add rate limiting (STRICT) to /api/auth/pair endpoint - Scope sandbox lookup in pairing to org (findByIdAndOrg) - Use timingSafeEqual for internal token comparison in headscale-ip route MEDIUM SEVERITY: - Validate backup ownership (sandbox_record_id) before restore - Add security comment for token-in-URL Redis fallback - Refresh in-memory org balance after warning/shutdown billing actions LOW SEVERITY: - Fix milaidy→milady typo imports in compat routes, provisioning-jobs, v1 agent logs route, and dashboard page (shim kept for test compat)
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Refactored omnibus migration into smaller files - Fixed SSRF bypass in isTrustedLegacyPrivateBridgeUrl - Addressed stale neon rec update - Threw on redis cache miss instead of leaking API tokens into URL params - Fixed unbounded SSH connection pool - Added CHECK constraint for billing_status - Fixed failing auth-pair tests and removed legacy SSRF mock
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
PR #405 ReviewOverall this is a solid security hardening PR with clear fixes for real vulnerabilities. A few issues worth addressing before merge: Bug:
|
|
Consolidated into PR #403 (cherry-picked commits onto fix/steward-security-migrations) |
Summary
Addresses security review comments from PR #404 (dev→main merge).
HIGH SEVERITY
NODE_ENV !== 'production'withRateLimit(handler, RateLimitPresets.STRICT)to/api/auth/pairfindByIdAndOrg!==withtimingSafeEqualfor internal token comparisonMEDIUM SEVERITY
backup.sandbox_record_id === rec.idcheck before restoregetOrgBalance()refresh after warning/shutdown billing actionsLOW SEVERITY
milaidy→miladyimports in 7 source files (shim kept for test compat)Deferred