mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 07:35:48 +03:00
[GH-ISSUE #521] ASC_BYPASS_KEYCHAIN: empty env value should not implicitly enable bypass #145
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#145
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/521
Summary
shouldBypassKeychain()treats an empty-but-setASC_BYPASS_KEYCHAINvalue astrue, enabling bypass unexpectedly.Why this matters
A shell/session with
export ASC_BYPASS_KEYCHAIN=(empty) silently changes credential resolution behavior away from keychain.Current behavior
In
internal/auth/keychain.go:Expected behavior
Empty value should be treated as unset/false, or require explicit truthy values only.
Reproduction
Current behavior reports keychain bypass path.
Detailed implementation plan
shouldBypassKeychain()semantics so empty string does not imply bypass.0,false,no,off) as false.1,true,yes,on) as true.Acceptance criteria
ASC_BYPASS_KEYCHAINno longer enables bypass.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/asc-bypass-keychain-empty-2971and pushed as commit5a10bda(fix(auth): require explicit truthy ASC_BYPASS_KEYCHAIN).What I changed
internal/auth/keychain.go:ASC_BYPASS_KEYCHAINnow bypasses keychain only for explicit truthy values:1,true,yes,on.0,false,no,off.internal/auth/keychain_test.go:ASC_BYPASS_KEYCHAIN=1messaging in auth status + doctor.README.md.internal/cli/auth/auth_test.go: truthy non-1(yes) triggers bypass warning and avoids hardcoded=1.internal/auth/doctor_test.go: doctor storage message supports truthy non-1and avoids hardcoded=1.Validation performed
go test ./internal/auth -run TestShouldBypassKeychainEnvSemantics -count=1(failed as expected).go test ./internal/auth -run 'TestShouldBypassKeychainEnvSemantics|TestDoctorStorageBypassMessageSupportsTruthyEnvValues' -count=1go test ./internal/cli/auth -run 'TestAuthStatusCommand|TestAuthLoginCommand' -count=1make format✅make lint✅ (I rebuiltgolangci-lintwith Go 1.26 to match repo target)make test✅go build -o /tmp/asc ./opt/cursor/artifacts/asc_bypass_keychain_semantics.txtCredential storage: System Keychainyes=>Credential storage: Config File+ bypass warning with accepted truthy values.@rudrankriyam commented on GitHub (Feb 14, 2026):
Fixed in #529 (merged to main).