Repository navigation
fix(db): redact bound query arguments at every log level - #453
Conversation
Keep failed-query logs from exposing session tokens, password hashes, and approval tokens unless bind-parameter logging is explicitly enabled. Closes #231
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: LeanerCloud/cloud-commitments-platform/.coderabbit.yaml Review profile: CHILL Plan: Essentials Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 1 review per hour. 📝 WalkthroughWalkthroughThe database log sanitizer now removes bound query arguments at every log level unless ChangesQuery Log Redaction
Priority: ⬆️ High Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: High Merge Risk: ⚪ Minimal · up to Bound query arguments are omitted unless explicitly enabled, while existing diagnostic behavior is preserved. The change is mergeable subject to normal checks. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
…n has no details (#1411) * fix(purchase): suppress every variant when a legacy EC2 recommendation has no details A failed execution saved before Details existed (#453) is retried from its persisted recs without re-matching. BuildSuppressions read the empty Details as the known variant {az, "", ""}, so the actually-bought platform/tenancy stayed unsuppressed. Treat an EC2 rec with no platform or tenancy as an unknown variant, which writes the existing NULL-variant wildcard row and over-suppresses rather than risk a double buy. Part of #1232 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(config): wildcard legacy compute-slug EC2 suppressions AWS recs can carry the canonical "compute" service slug as well as "ec2". The legacy wildcard (no platform/tenancy) only matched "ec2", so compute-slug recs kept a narrow empty variant and could be double-bought (#1232). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Failed pgx queries logged bound arguments at error level, exposing session tokens, password hashes and approval tokens. Strip arguments at every log level unless
DB_LOG_BIND_PARAMETERS=true; preserve SQL/error diagnostics and info's message-only output.Closes #231
Validation:
Independent gpt-6-astra review: two clean implementation passes and final commit review at
279baa3e57a244aaf2aa793c8757de8913151d63, using the session's approved reviewer substitution. Reviewer independently passed the real PostgreSQL and logger race tests at this commit and confirmed a redaction-removal mutation fails on the exposed synthetic values. No actionable findings. CodeRabbit is optional under the authorized local-review path; CI and normal merge checks still apply.Summary by CodeRabbit
DB_LOG_BIND_PARAMETERSis set to exactlytrue. Sensitive values remain redacted either way.