feat: export risk findings over OTLP - #6018
Conversation
🦋 Changeset detectedLatest commit: 973ab52 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Running ultrareview automatically — This PR adds a privacy-sensitive risk-findings export pipeline with new OTLP relay logic, exclusion re-evaluation, and Pub/Sub infrastructure—a subtle bug could leak findings or break data delivery, warranting deep review.. I'll post findings when complete. |
There was a problem hiding this comment.
Ultrareview completed in 15m 47s
1 issue found across 36 files
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="server/internal/otel/handler_risk_finding_relay_test.go">
<violation number="1" location="server/internal/otel/handler_risk_finding_relay_test.go:72">
P2: No test asserts the finding description is absent from the serialized payload, even though excluding it is a core privacy guarantee of this PR. `TestRiskFindingRelayExportsSafeOTLPLog` checks only the raw match, and `TestRiskFindingRelayUsesGenericBody` sets a sensitive description (an email) but checks only that the body is the generic constant. If a future change adds description to the log-record attributes, all tests still pass and the sensitive value leaks. Add a `proto.Marshal` + `require.NotContains(description)` check alongside the existing match check.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
review:bypass label removed by @tgmendes.

Summary
Motivation
Risk findings need to reach customer-operated security and observability systems without crossing Gram's privacy boundary. The relay uses the existing authenticated OTLP destination pipeline while treating exclusion state as an export authorization decision: suppression is checked immediately before delivery and fails closed when it cannot be evaluated.
Summary by cubic
Adds
risk_findingsas a project-scoped data export source; routes that previously accepted only product telemetry can now send new findings to configured OTLP log destinations through a dedicated Pub/Sub subscriber.Written for commit 973ab52. Summary will update on new commits.