Skip to content

feat(privacy): every SDK exports under the shared privacy spec v4 - #794

Draft
nik13 wants to merge 7 commits into
devfrom
feat/xsdk-privacy-spec-v4-1122
Draft

nik13 wants to merge 7 commits into
devfrom
feat/xsdk-privacy-spec-v4-1122

Conversation

@nik13

@nik13 nik13 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Every traceAI SDK (Python, TypeScript, Go, Java, C# and Ruby) exports span attributes under one shared privacy spec, version 4. Each SDK passes the same 7,887 shared fixture cases with no SDK-specific expectations.

  • Credential pairs. The value of a credential-named pair is replaced to the true end of the value, in free text and in captured values alike. This covers name=value and name: value, quoted names ("password": …, also written with ', \" or ", and with = or %3D), --password value and -password value flags (including a value on the next line), and bracket names such as user[password]=, plain or percent-encoded.
  • URLs. Credential-named pairs in a URL's query, after its #, after a second ? in a query value, and in path segments (every = and %3D) are replaced, in whole-URL fields and in URLs found in text. In a whole-URL field, the pair rule reads the URL text and skips only the parts the URL rules already replaced.
  • Names. The credential names include pwd, pass, passphrase, passwd, passcode and pin, as a whole name or a name segment, at every site. Map keys go through the same text rules, and two keys that become equal keep one key, valued <redacted>. A name of more than 32 components makes the whole value <redacted>.
  • Undecided names are redacted. A name with an unreadable gap before its separator (a tab or other whitespace, more than eight spaces, an encoded space such as %20, a JSON escape such as \t), or a name past its read window, makes the value <redacted>.
  • Value shapes (sk- and AKIA keys, JWTs, Bearer and Basic values, private keys) read whitespace, word characters and letter case the same way in every SDK, across Unicode.
  • Known secrets are replaced one at a time, longest first, before the pair rule.
  • Structured JSON. A string is read as JSON only when the whole string is one JSON value.

Tests

  • spec/auto-instrumentation holds the generator, the catalog (privacy.json, version 4), the shared fixtures, and spec tests that pin the changed and added cases.
  • Each SDK's shared-fixture test reads the whole fixture file.
  • Each SDK adds focused tests for every rule group, plus timing tests on 1.6-million-character inputs.

Review state

  • Each SDK's change was reviewed on its own branch before this compose, and the composed files had a security review.
  • C# and Python: review accepted.
  • Go, TypeScript and Java: their latest round answers review findings; that round's re-review is still open.
  • Ruby: a follow-up round is in progress, and this pull request stays a draft until it replaces the Ruby change here.
  • This pull request's CI is the verification of the composed tree.
  • This is a draft for review, and it will not be merged before every SDK's review is complete.

Start Proof
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant