@adaptic/utils 0.0.1036 → 0.0.1037

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -19742,7 +19742,9 @@ const fetchTrades = async (symbol, options) => {
19742
19742
  await rateLimiters$1.massive.acquire();
19743
19743
  const url = `${baseUrl}?${params.toString()}`;
19744
19744
  try {
19745
- logIfDebug(`Fetching trades for ${symbol} from ${url}`);
19745
+ // Redact the apiKey query param before logging — the raw URL embeds the
19746
+ // live Massive API key (audit #595).
19747
+ logIfDebug(`Fetching trades for ${symbol} from ${url.replace(/([?&](?:apiKey|apikey|api_key)=)[^&]+/gi, "$1***")}`);
19746
19748
  const response = await fetchWithRetry(url, { signal: createTimeoutSignal(DEFAULT_TIMEOUTS.MASSIVE_API) }, 3, 1000);
19747
19749
  const data = (await response.json());
19748
19750
  if ("message" in data) {