Skip to content

Conversation

@samholmes
Copy link
Contributor

CHANGELOG

  • Yes
  • No

Dependencies

none

Description

Replaces the safeUrl property with a dedicated sanitizeUrlForLogging utility function to explicitly handle sensitive information in URLs before logging.

  • sanitizeUrlForLogging function: Removes API keys from URL path segments and common query parameters (apikey, api_key, apiKey).
  • Blockbook plugins: Now use sanitizeUrlForLogging for logging and metrics, as API keys are appended to their URLs.
  • EVM RPC plugins: A stub sanitizeUrlForLogging is added with a TODO, as API keys are not currently added to RPC URLs. It returns the URL as-is, to be fully implemented when API keys are used for RPC URLs.

This change improves security by ensuring API keys are consistently removed from logged URLs where applicable.


Open in Cursor Open in Web

- Remove safeUrl parameter from BlockbookOptions and EvmRpcOptions interfaces
- Add sanitizeUrlForLogging utility function that removes API keys from URLs
- Use sanitization function in blockbook plugin (API keys are added to URLs)
- Stub sanitization function in evmRpc plugin with TODO (API keys not yet used for RPC URLs)
- Remove safeUrl usage from allPlugins.ts
@cursor
Copy link

cursor bot commented Nov 26, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@samholmes samholmes closed this Nov 26, 2025
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.

3 participants