dbt-labs / dbt-labs/metricflow
Security: Query request object logged at INFO level may expose sensitive filter values
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 202
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 14
Description
## Summary
In `metricflow/engine/metricflow_engine.py` (line 523):
```python
logger.info(LazyFormat("Starting query request", mf_request=mf_request))
```
The full `MetricFlowQueryRequest` object is logged at INFO level. This object may contain WHERE filter values that include PII or sensitive business data (customer names, email addresses, financial thresholds, etc.).
INFO-level logs are typically retained in production log aggregation systems and may be accessible to a broader set of operators than intended.
## Suggested Fix
- Change to `logger.debug()` so it only appears when explicitly enabled
- Or redact/summarize the request object before logging at INFO (e.g., log only the metric names and request ID, not filter values)
## Severity
**Medium** — information disclosure via logs. Impact depends on what data flows through WHERE filters and who has access to production logs.
Contributor guide
Assessment
This issue has not been assessed yet.