Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

Potential fix for code scanning alert no. 58: Clear-text logging of sensitive information (#12070)

Yingfengbfef96d56e52
diff --git a/common/http_client.py b/common/http_client.py
index 28c988ef65..b74676da63 100644
--- a/common/http_client.py
+++ b/common/http_client.py
@@ -166,13 +166,13 @@ async def async_request(
if attempt >= retries:
if not _is_sensitive_url(url):
log_url = _redact_sensitive_url_params(url)
- logger.warning(f"async_request exhausted retries for {method} {log_url}")
+ logger.warning(f"async_request exhausted retries for {method}")
raise
delay = _get_delay(backoff_factor, attempt)
if not _is_sensitive_url(url):
log_url = _redact_sensitive_url_params(url)
logger.warning(
- f"async_request attempt {attempt + 1}/{retries + 1} failed for {method} {log_url}; retrying in {delay:.2f}s"
+ f"async_request attempt {attempt + 1}/{retries + 1} failed for {method}; retrying in {delay:.2f}s"
)
await asyncio.sleep(delay)
raise last_exc # pragma: no cover