Skip to content

[SDK] Redact wrapped inline secrets in self-diagnostics preambles - #7955

Merged
martincostello merged 3 commits into
open-telemetry:mainfrom
Kielek:ANT-2026-CKH8AP2O
Oct 16, 2026
Merged

martincostello merged 3 commits into
open-telemetry:mainfrom
Kielek:ANT-2026-CKH8AP2O

Conversation

@Kielek

@Kielek Kielek commented Oct 16, 2026

Copy link
Copy Markdown
Member

This fix addresses a ANT-2026-CKH8AP2O finding from Anthropic's OSS Scanner.
Project enrollment: anthropics/oss-scanner#117.

Changes

Self-diagnostics could write a folded PEM value in a certificate-path environment
variable into the default log preamble when literal quotes preceded its armour.
Recognizable PEM material is now redacted wherever it occurs, including
whole-PEM base64 encoding, and quoted or prefixed JWTs are detected at token
boundaries.

Adds 17 regression cases for all three certificate variables, the real preamble,
resource attributes, ordinary certificate paths, and the existing disclosure
modes. Recognizable inline material redacts the whole setting, including resource
attributes. Explicit AllValues output remains available. No public API changes.

Merge requirement checklist

  • CONTRIBUTING guidelines followed (license requirements, successful build/tests, etc.; changelog link pending)
  • Tests added/updated
  • CHANGELOG.md file(s) updated for non-trivial changes
  • [ ] Changes in public API reviewed (if applicable; no public API changes)
  • AI usage disclosure:
    • No AI used
    • AI-assisted
    • Bulk AI-generated
  • I have the experience and knowledge necessary to understand, review, and validate all content in this PR1

Footnotes

  1. Yes, I can answer maintainer questions about the content of this PR without using AI. ↩

Discovered by Anthropic's OSS Scanner, as bug ANT-2026-CKH8AP2O.

Assisted-by: OpenAI Codex
@github-actions github-actions Bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Oct 16, 2026
@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Pull request dashboard status

Merged · refreshed 2026-10-16 11:22 UTC

Status above doesn't look right?
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

@Kielek
Kielek marked this pull request as ready for review October 16, 2026 08:06
@Kielek
Kielek requested a review from a team as a code owner October 16, 2026 08:06
@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.30%. Comparing base (737e973) to head (2e0af33).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #7955      +/-   ##
==========================================
- Coverage   92.30%   92.30%   -0.01%     
==========================================
  Files         363      363              
  Lines       21035    21044       +9     
==========================================
+ Hits        19416    19424       +8     
- Misses       1619     1620       +1     
Flag Coverage Δ
unittests-Project-Experimental 92.43% <100.00%> (-0.01%) ⬇️
unittests-Project-Stable 92.43% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...ostics/SelfDiagnosticsEnvironmentVariablePolicy.cs 99.07% <100.00%> (+0.03%) ⬆️

... and 1 file with indirect coverage changes

@martincostello martincostello added this to the v1.20.1 milestone Oct 16, 2026
@Kielek
Kielek added this pull request to the merge queue Oct 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 16, 2026
This was referenced Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants