[Observability] Verify telemetry redaction at feature boundaries - #165
Merged
BigDella merged 3 commits intoSep 27, 2026
Conversation
…d bounded traversal
… integrate capture sink in network profiles
|
@bamiebot-maker Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[Observability] Verify telemetry redaction at feature boundaries
Closes #151
Summary of Changes
This pull request adds integration tests and hardening for telemetry redaction at feature boundaries, verifying that feature-level failures emit correlation metadata without leaking account secrets, full addresses where disallowed, or raw HTTP bodies:
Telemetry Capture Integration in Network Profile Test Runner:
TelemetryCaptureSinkintorunAgainstNetworkProfilesincore/testing/runAgainstProfiles.ts.beforeEach(() => { telemetry.clear(); setTelemetrySink(telemetry); })andafterEach(() => { resetTelemetrySink(); })).NetworkProfileContextincore/testing/networkProfiles.tsto providetelemetryfor profile-driven integration tests.Boundary Redaction Hardening:
isSensitiveKeyincore/telemetry/telemetry.tsto redact raw HTTP body keys (rawBody,responseBody,requestBody,httpBody,body,raw_body, etc.) and disallowed address keys (disallowedAddress,forbiddenAddress).emitTelemetryto scruberrorCodebefore emission, ensuring callers preformatting error codes with secret strings or seeds are safely scrubbed.EMBEDDED_STELLAR_SECRETpattern (/[SM][A-Z2-7]{55}/g) and bearer token pattern to match embedded secrets regardless of prefix/suffix word boundaries.RedactOptionssupporting{ redactAddresses: true }to redact Stellar public addresses (/[GC][A-Z2-7]{55}/g) when address redaction is mandated.Feature Boundary Integration Test Suite:
core/telemetry/__tests__/featureBoundaries.test.tswith 9 focused tests:op,actorType,result,latencyMs,correlationId,errorCode,timestamp) on failure.RedactOptions.runHorizonRequest).exportRecords) with capture sink.runAgainstNetworkProfiles) capturing Horizon requests and confirming absence of raw account bodies.Verification
npx vitest run core/telemetry(All 21 tests passing acrosstelemetry.test.tsandfeatureBoundaries.test.ts)npx vitest run core/testing/__tests__/networkProfiles.test.ts(All 39 tests passing)npm run verify:telemetry(All 11 instrumented operations OK)npm run verify:audit(9 sensitive actions, 9 domain-boundary emitters OK)npm run verify:boundaries(OK: feature slices import boundaries clean)npm run verify:issues(OK)