Conversation
There was a problem hiding this comment.
👍 All Clear
I reviewed the changes to the PromptfooModelProvider logging and the accompanying tests. The PR replaces verbose logging of full request/response bodies with redacted, metadata-only fields and adds tests to ensure prompts, configs, and response contents are not logged. Based on the diff, no new LLM-related security risks are introduced; this is a net hardening change.
Minimum severity threshold: 🟡 Medium | To re-scan after changes, comment @promptfoo-scanner
Learn more
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request refactors debug logging in Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR reduces the risk of leaking sensitive data by changing PromptfooModelProvider debug logging to avoid emitting request payloads (prompt/config) and response content, and adds a regression test to ensure these secrets aren’t logged.
Changes:
- Replace request debug logging to include only non-sensitive metadata (model, message count, config key count).
- Replace response debug logging to include only non-sensitive metadata (provider, counts, finish reason, token usage).
- Add a test asserting prompts/config/response content are not present in
[PromptfooModel]debug logs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/providers/promptfooModel.ts |
Redacts debug logs by logging only request/response metadata instead of payload/content. |
test/providers/promptfooModel.test.ts |
Adds a regression test ensuring secret prompt/config/response strings are not logged. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Stops PromptfooModel debug logs from including request payloads or response content.