-
Notifications
You must be signed in to change notification settings - Fork 0
feat: emit full query to posthog #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: eval-pr-805-target-1758284673051
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -32,6 +32,7 @@ def build_search_properties( | |
| Dictionary of analytics properties | ||
| """ | ||
| properties = { | ||
| "query": query, # Full query text for PostHog history | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change sends the full search query text to PostHog, which violates the project's own analytics guidelines. The Prompt for AI agents[internal] Confidence score: 10/10 [internal] Posted by: System Design Agent
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new DEV MODE: This violation would have been filtered out by screening filters. Failing filters: commentPurpose, documentationImpact. Reasoning: Prompt for AI agents[internal] Confidence score: 7/10 [internal] Posted by: General AI Review Agent |
||
| "query_length": len(query), | ||
| "collection_slug": collection_slug, | ||
| "duration_ms": duration_ms, | ||
|
|
@@ -71,6 +72,7 @@ def build_search_error_properties( | |
| Dictionary of analytics properties | ||
| """ | ||
| return { | ||
| "query": query, # Full query text for PostHog history | ||
| "query_length": len(query) if query else 0, | ||
| "collection_slug": collection_slug, | ||
| "duration_ms": duration_ms, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change introduces a potential sensitive data leak. The raw search query is being added to the PostHog analytics event, but the project's analytics guidelines in
backend/airweave/analytics/README.mdexplicitly forbid including sensitive data in event properties. Search queries may contain PII or other sensitive information.Prompt for AI agents
[internal] Confidence score: 10/10
[internal] Posted by: System Design Agent