mirror of
https://github.com/rudrankriyam/App-Store-Connect-CLI.git
synced 2026-04-25 07:35:48 +03:00
[GH-ISSUE #522] Keychain migration cleanup should remove stale global config credentials when local config is active #146
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#146
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/522
Summary
After successful keychain storage, config cleanup can miss credentials stored in global config when a repo-local config is active.
Why this matters
Users can end up with stale credentials left in
~/.asc/config.jsoneven after migration, causing confusion and potential fallback use when keychain is bypassed/unavailable.Current behavior
removeFromConfigIfPresent->removeFromConfigusesconfig.Load()/config.Path(), which prefer local config if present.This can skip cleanup in global config.
Expected behavior
Cleanup should be applied to all relevant config scopes (active + global), similar to
clearConfigCredentials()behavior.Reproduction
.asc/config.json.Detailed implementation plan
ASC_CONFIG_PATHoverrides.Acceptance criteria
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/keychain-migration-cleanup-scope-50c1and pushed in two commits:b6034f4— Fix keychain migration cleanup across config scopesdcc4e25— Remove unused config cleanup wrapperWhat I changed:
removeFromConfigAt(name, path)so removal can target specific config files.configCleanupPaths()to resolve active + global config paths (deduped when same).removeFromConfigIfPresentto apply cleanup across all relevant scopes:clearConfigCredentials()to use the same active+global path resolution helper.TestStoreCredentials_RemovesStaleGlobalCredentialWhenLocalConfigActiveTestStoreCredentials_RemovesStaleCredentialFromOverrideAndGlobalConfigsValidation performed:
go test ./internal/auth -run 'TestStoreCredentials(FallbackToConfig|_RemovesStaleGlobalCredentialWhenLocalConfigActive|_RemovesStaleCredentialFromOverrideAndGlobalConfigs)$' -count=1✅make format✅make lint✅make test✅@rudrankriyam commented on GitHub (Feb 14, 2026):
Fixed in #530 (merged to main).