You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TypeScript URL safety (HIGH):
- Apply safeSegment() to all 22 URL builders that interpolate parameters
(was only applied to tags() and marketHours(), matching Python parity)
- Narrow SAFE_PATH_SEGMENT regex: remove : and @ characters
Order safety (HIGH + MEDIUM):
- Default time_in_force to "gfd" instead of "gtc" in TypeScript client
and MCP tool (matches Python fix from previous commit)
- Fix trailing_peg payload: omit unused fields instead of undefined
- Add bounds validation to all order methods (both SDKs): quantity,
price, stop_price, trail_amount, limit_price must be positive + finite
- Fix crypto order division-by-zero: limitPrice validated > 0 before
division in both SDKs
Encryption key validation (MEDIUM):
- ROBINHOOD_TOKEN_KEY env var now validated: must decode to exactly 32
bytes (both Python and TypeScript)
Redaction hardening (MEDIUM):
- Add password, secret, account_number to SENSITIVE_KEYS (both SDKs)
- Add "Authorization: Bearer <token>" plain-text pattern detection
- Both redactTokens() and redact_tokens() now catch bearer headers
MCP tool input hardening (MEDIUM):
- Add .positive() to all Zod z.number() schemas for order prices/quantities
- Add .max(200) to symbol string inputs to prevent oversized requests
Token refresh rate limiting (MEDIUM):
- Add 5-second minimum interval between refresh attempts (both SDKs)
- Prevents DoS via repeated 401s exhausting the refresh endpoint
Tests:
- 24 new path traversal rejection tests for TypeScript URL builders
- TypeScript: 168 tests passing
- Python: 88 tests passing
- PII scan: clean (no emails, tokens, credentials in codebase)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments