fix: redact remaining SDK-owned credential containers in formatted output
I maintainer di solito rispondono entro 1 giorno
@ffumero2003 ci sta già lavorando.
Dal 3/11/2026.
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Context
blazer redacts secrets in formatted output for exactly one credential type: SSECKey implements String(), GoString(), and Format() (b2/ssec.go:76-80), test-pinned across every format verb. The other SDK-owned credential containers print their secrets verbatim under %v, %+v, %#v, and %x:
base.Key.Secretbase.AuthData.AuthToken(and the same material held viab2.AuthData/InMemoryAccountInfo,b2/accountinfo.go:43)base.B2WebhookNotificationTarget.HMACSHA256SigningSecret
A developer or an automated agent printing one of these structs while debugging (for example log.Printf("%+v", client)) leaks the application key, session token, or signing secret into logs or an LLM context window. This is the Go sibling of the formatted-output credential leaks already tracked on the TypeScript and Java SDKs (backblaze-labs/demand-side-ai#1278, backblaze-labs/demand-side-ai#1279).
Evidence
A synthetic probe printed each container with %v, %+v, %#v, and %x; all four disclosed the secret for the containers listed above. SSECKey and the high-level b2.Key did not disclose under the same probe.
Acceptance criteria
- R1. Every SDK-owned credential container redacts its secret under
%v,%+v,%#v,%x, andGoString(), following the existing SSE-C pattern:String/GoString/Formatplus holding the secret in an unexported field so embedded-field formatting stays protected. - R2. The SSE-C redaction test matrix (all format verbs plus embedded-field cases) is extended to cover every credential container.
- R3. Upload-token holders
base.URLandFileChunkare checked and redacted if they expose token material. - R4. Any change to a public string field (for example
base.Key.Secret,AuthData.AuthToken) ships with a compatibility note and aChangedchangelog entry.
In scope
- Formatted-output redaction for the SDK-owned credential containers listed in Context, their formatting/embedded-field tests, and the required compatibility documentation.
Out of scope
- Explicit secret access through
Key.Secret()and raw key inputs supplied by the caller — those are intended access, not accidental formatting exposure. - Error-wrapping metadata loss — tracked in a separate issue.
Verification
Run the repository regression checks with live credentials unset:
unset B2_APPLICATION_KEY_ID B2_APPLICATION_KEY B2_ACCOUNT_ID B2_ACCOUNT_KEY
go build ./...
go vet ./...
go test -race -count=1 ./base ./b2/...
- Use synthetic secrets only. Exercise all specified format verbs and embedded-field cases for every listed credential container, including upload-token holders when applicable.
- Demonstrate the leakage before the change, red under a deliberate redaction break, and green after restoration; check the required public-field compatibility note and Changed fragment.
- Expected result: the checks above succeed and the observable outcomes in Acceptance criteria are demonstrated. If a check cannot run, report
Could not run because: ...; if it starts but fails, reportCould not complete because: .... A skipped check is not a pass.
Links
- Pattern to follow:
b2/ssec.go:76-80 - Sibling leaks:
backblaze-labs/demand-side-ai#1278(TypeScript),backblaze-labs/demand-side-ai#1279(Java)
- Lingua principale
- Go
- Stelle
- 66
- Fork
- 18
- Merge medio
- 1g 10h
- PR unite (30g)
- 132
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Backblaze/blazer
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Bucket.Attrs never returns ReplicationConfig: replication configuration is write-onlyForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
test: skip the fuzz non-vacuity guard when replaying a single seedForse già presa @ffumero2003 l’ha presa 5 giorni fa. Apertatesting
Backblaze/blazer#330 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Backblaze/blazer
Issue simili
-
needs-triage typo
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue severity: low tech-debt
Difficoltà 2/5 Mezza giornata Idoneità per principianti 75/100
TMHSDigital/subenum#329 ·
I maintainer di solito rispondono entro 1 giorno
-
[Bug] Backend summarize min() / max() panics when a field has no numeric valuesForse già presa @weng5e l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
grafana/grafana-infinity-datasource#1832 ·
I maintainer di solito rispondono entro 1 giorno
-
tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
GillMacedo/godebugdiff#13 ·