typescript-utcp
typescript-utcp copied to clipboard
security fix
Summary by cubic
Hardens redirect handling and OAuth2 token URL validation in @utcp/http to prevent SSRF and credential exfiltration. Every redirect hop is revalidated; streaming/SSE handshakes no longer follow redirects.
-
Bug Fixes
- Added
safeRequestWithRedirectsand used it for manual discovery, tool calls, and OAuth2 token fetches. - Validated OAuth2
token_urlat runtime and inOpenApiConverter; rejects plain HTTP and internal/metadata hosts. - Set
redirect: 'error'for SSE and streaming HTTP to refuse handshake redirects. - Added tests to pin redirect and token URL behavior.
- Added
-
Dependencies
- Bumped
@utcp/httpto1.1.4.
- Bumped
Written for commit 613a878938cb90fddcf929f0b30a9b7ebad4377f. Summary will update on new commits.