mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 07:35:48 +03:00
[GH-ISSUE #520] Auth output hygiene: redact credential identifiers in auth status and doctor #143
Labels
No labels
bug
bug
documentation
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/App-Store-Connect-CLI#143
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @rudrankriyam on GitHub (Feb 14, 2026).
Original GitHub issue: https://github.com/rudrankriyam/App-Store-Connect-CLI/issues/520
Summary
Auth diagnostics currently print credential-identifying environment values directly (not secret key material, but still sensitive metadata), including
ASC_KEY_IDandASC_ISSUER_ID.Why this matters
These commands are often run in CI/support contexts where stdout/stderr are persisted. Exposing credential identifiers in logs increases leakage risk and operational noise.
Affected locations
internal/cli/auth/auth.goauth statusprintsEnvironment credentials detected (ASC_KEY_ID: ...)internal/auth/doctor.goinspectEnvironmentemitsASC_KEY_ID is set (<value>)andASC_ISSUER_ID is set (<value>)Expected behavior
ASC_KEY_ID is setEnvironment credentials detected (ASC_KEY_ID present)Reproduction
Current output includes raw values.
Detailed implementation plan
authcommand tests and doctor tests.Acceptance criteria
auth statusandauth doctorno longer print rawASC_KEY_ID/ASC_ISSUER_IDvalues.cc @cursor please implement this end-to-end.
@rudrankriyam commented on GitHub (Feb 14, 2026):
@cursor please implement this issue end-to-end using the checklist and acceptance criteria.
@cursor[bot] commented on GitHub (Feb 14, 2026):
Implemented end-to-end on
cursor/auth-output-hygiene-addaand pushed as commit6440c56.auth statusto stop echoingASC_KEY_IDvalues and now print a presence-only message:Environment credentials detected (ASC_KEY_ID present)...internal/auth/doctor.goenvironment inspection to use presence-only diagnostics (<VAR> is set) instead of printing raw env values forASC_KEY_ID/ASC_ISSUER_ID(and other env vars in that section).internal/cli/cmdtest/commands_test.go(TestAuthStatusShowsEnvPreference) now asserts noENVKEY/ENVISSleakage.internal/cli/cmdtest/auth_doctor_test.goaddsTestAuthDoctorTextRedactsCredentialIdentifiers.internal/auth/doctor_test.goaddsTestDoctorEnvironmentRedactsCredentialIdentifiers.ASC_KEY_ID/ASC_ISSUER_IDvalue-echo diagnostics.Validation I ran:
go test ./internal/cli/cmdtest -run 'TestAuthStatusShowsEnvPreference|TestAuthDoctorTextRedactsCredentialIdentifiers'go test ./internal/auth -run TestDoctorEnvironmentRedactsCredentialIdentifiersmake format(after installing tools),make lint,make testall pass.go build -o /tmp/asc ./tmp/asc auth statusand/tmp/asc auth doctorwith:ASC_BYPASS_KEYCHAIN=1 ASC_KEY_ID=ABC123SECRET ASC_ISSUER_ID=issuer-uuid ...0, output showed presence-only messages, and leak scan found no secret identifiers.@rudrankriyam commented on GitHub (Feb 14, 2026):
Fixed in #527 (merged to main), with follow-up in #533.