Summary
The OpenTelemetry result pipeline emits raw file paths, stdout/stderr, exception text, stack traces, and artifact paths directly into activity tags. Unlike the App Insights telemetry pipeline, there is no hashing, redaction, or opt-in gate for these potentially sensitive values.
Evidence
Q:\src\testfx\src\Platform\Microsoft.Testing.Platform\Telemetry\OpenTelemetryResultHandler.cs:122-126
yield return new("test.file.path", testLocationProperty.FilePath);
yield return new("test.line.start", ...)
Q:\src\testfx\src\Platform\Microsoft.Testing.Platform\Telemetry\OpenTelemetryResultHandler.cs:163-169
activity.SetTag("test.result", result);
activity.SetTag("test.result.exception.message", exception.Message);
activity.SetTag("test.result.exception.stacktrace", exception.StackTrace);
Q:\src\testfx\src\Platform\Microsoft.Testing.Platform\Telemetry\OpenTelemetryResultHandler.cs:194-200
activity.SetTag("test.stdout", string.Join(...))
activity.SetTag("test.stderr", string.Join(...))
activity.SetTag($"test.artifact.file[{index}].path", fileArtifactProperty.FileInfo.FullName);
Q:\src\testfx\src\Platform\Microsoft.Testing.Extensions.Telemetry\AppInsightsProvider.cs:54-78
- the App Insights pipeline maintains a
KnownUnhashedProperties allowlist
Q:\src\testfx\src\Platform\Microsoft.Testing.Extensions.Telemetry\AppInsightsProvider.cs:195-205,258-276
- DEBUG builds assert that arbitrary string properties must be hashed or allow-listed.
Why this is a real issue
This is concrete, not theoretical: any configured OpenTelemetry exporter receives these raw values. Test stdout/stderr often contains secrets or environment-specific data, and full source/artifact paths expose local machine layout and repository structure. The privacy posture is also inconsistent with the App Insights telemetry codepath, which explicitly guards unhashed strings.
Suggested resolution
Add filtering/redaction controls for sensitive tags (at minimum file paths, stdout/stderr, exception messages/stack traces, artifact paths), and consider making the sensitive tags opt-in rather than on-by-default. Documentation should call out exactly which fields are exported.
Related issues
Summary
The OpenTelemetry result pipeline emits raw file paths, stdout/stderr, exception text, stack traces, and artifact paths directly into activity tags. Unlike the App Insights telemetry pipeline, there is no hashing, redaction, or opt-in gate for these potentially sensitive values.
Evidence
Q:\src\testfx\src\Platform\Microsoft.Testing.Platform\Telemetry\OpenTelemetryResultHandler.cs:122-126yield return new("test.file.path", testLocationProperty.FilePath);yield return new("test.line.start", ...)Q:\src\testfx\src\Platform\Microsoft.Testing.Platform\Telemetry\OpenTelemetryResultHandler.cs:163-169activity.SetTag("test.result", result);activity.SetTag("test.result.exception.message", exception.Message);activity.SetTag("test.result.exception.stacktrace", exception.StackTrace);Q:\src\testfx\src\Platform\Microsoft.Testing.Platform\Telemetry\OpenTelemetryResultHandler.cs:194-200activity.SetTag("test.stdout", string.Join(...))activity.SetTag("test.stderr", string.Join(...))activity.SetTag($"test.artifact.file[{index}].path", fileArtifactProperty.FileInfo.FullName);Q:\src\testfx\src\Platform\Microsoft.Testing.Extensions.Telemetry\AppInsightsProvider.cs:54-78KnownUnhashedPropertiesallowlistQ:\src\testfx\src\Platform\Microsoft.Testing.Extensions.Telemetry\AppInsightsProvider.cs:195-205,258-276Why this is a real issue
This is concrete, not theoretical: any configured OpenTelemetry exporter receives these raw values. Test stdout/stderr often contains secrets or environment-specific data, and full source/artifact paths expose local machine layout and repository structure. The privacy posture is also inconsistent with the App Insights telemetry codepath, which explicitly guards unhashed strings.
Suggested resolution
Add filtering/redaction controls for sensitive tags (at minimum file paths, stdout/stderr, exception messages/stack traces, artifact paths), and consider making the sensitive tags opt-in rather than on-by-default. Documentation should call out exactly which fields are exported.
Related issues