π¦ New version release - #90
Merged
Merged
Conversation
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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@smooai/observability@0.18.0
Minor Changes
0e6dcd0: TypeScript, Go, Python and .NET: hash PII instead of leaking it, matching the Rust SDK.
All four SDKs scrubbed credentials only β
Bearer,password=,token/api_key/secret=,sk-β¦β while their module docs claimed "PIIscrubbing". Emails, phone numbers and street addresses passed through to the
backend untouched. Rust fixed this in Hash PII instead of leaking it (Rust SDK)Β #82; this brings the other four to parity
with byte-identical output.
Personal identifiers are now hashed, not dropped:
a@b.comβ[email:9f2a41c8]. The type prefix stays visible, so "are these two spans thesame person?" stays answerable while nothing reversible is stored. The hash is
HMAC-SHA256, keyed β not a bare digest, which a rainbow table reverses in
seconds for a space as small as email addresses β and the org id is mixed into
the message, so identical PII hashes differently in different orgs. Phone
numbers normalize to digits and emails to lowercase before hashing, so
(415) 555-0142and415-555-0142correlate.Credentials are still dropped, never hashed, and are matched first: a hash of
a live token is a token oracle, and PII inside a secret (
token=a@b.com) goeswith the secret. With no key configured (
SMOOAI_OBSERVABILITY_PII_HASH_KEY, orthe per-SDK setter), personal identifiers are fully redacted (
[email:redacted])rather than hashed under a guessable one β fail closed, never fail open.
New API, same shape in every SDK. The org-less entry points keep working
unchanged (they hash under the empty org salt):
setPiiHashKey,piiToken,scrubStringForOrg,scrubHeadersForOrg,PiiKindβ now exported from the package entrySetPiiHashKey,PiiToken,ScrubStringForOrg,ScrubHeadersForOrg,PiiKind,BootstrapEnv.PiiHashKeyset_pii_hash_key,pii_token,scrub_string_for_org,scrub_headers_for_org,PiiKind,BootstrapEnv.pii_hash_keyPii.SetPiiHashKey,Pii.PiiToken,Pii.ScrubStringForOrg,Pii.ScrubHeadersForOrg,PiiKind,BootstrapEnv.PiiHashKeypiiToken(kind, raw, orgId)is the search seam: hash a typed query term the sameway and match the stored token.
correlation with every hash already stored. Supply it once at startup; the
setters are set-once and refuse a second key.
The TypeScript SDK ships a small synchronous SHA-256/HMAC (
hmac-sha256.ts)rather than taking a dependency:
scrubStringis sync and runs in the browserbundle, where
node:cryptois unavailable and WebCrypto is async-only. It ispinned by the RFC 4231 and FIPS 180-4 vectors.