harden: write a per-repo plaintext token only with recorded --insecure-storage consent #610
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#610
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?
What
WriteRepoCredentials(internal/service/git/clone.go) provisions credentials for clone, init, and remote add. With no global secure-backend marker, it wrote the token in plaintext into the repo's.git/config. The token can come fromMADTEA_TOKEN, so a user withMADTEA_URLandMADTEA_TOKENset and no keychain got the env token copied to disk, with no--insecure-storageconsent. ADR 0013 makes--insecure-storagethe sole plaintext path.Fix
madtea.tokenexists in the global scope. Onlyauth login --insecure-storagewrites one, so it is the record of consent.MADTEA_TOKENon every run, so env setups keep working.Acceptance