You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Go SDK: auth.Token prints the bearer token in full through fmt and slog #1848
The Go SDK is in languages/golang in this repository. It encrypts values in a Go program, and gets its keys from ZeroKMS, CipherStash's key management service. In November 2026 we audited version v0.1.0-rc.7 by building programs against a dev workspace and PostgreSQL 17 with EQL (Encrypt Query Language) v4.
Problem
auth.Token stores the access token in its AccessToken field. The type has no String, GoString, Format, or LogValue method. So fmt.Println(tok), log.Printf("%+v", tok), and slog.Info("auth", "token", tok) all print the bearer token in full.
A developer who logs the token while debugging sends a live credential to their log system. Nothing warns them. Other SDK types already redact: generated types print [sealed], and encrypt.Secret redacts everywhere.
Proposal
Add String, GoString, Format, and LogValue methods to auth.Token that redact AccessToken.
Keep the other fields visible, such as ExpiresAt and Region, because they help debugging.
Add a test that prints a token through fmt verbs and slog, and checks the token does not appear.
Evidence
Verified with go doc ./auth Token and a test program that printed a token through fmt and slog.
Activity
docs(golang): say where auth.Token is still printed in full