security: narrow default scopes created by stoke auth login
#9
Labels
No labels
attention
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-ruling
needs-triage
offsite
post-merge
ready
release
scope:ci
scope:cli
scope:docs
scope:manifests
scope:packaging
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/stoke#9
Loading…
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?
Problem
src/cli.jsDEFAULT_TOKEN_SCOPESgrants essentially full write access on login:Most interactive CLI use does not need
write:package,write:activitypub, or evenwrite:organization/write:user. Tokens minted for daily issue/PR work are therefore over-privileged if leaked from~/.config/stoke/config.json.Proposed fix
read:issue,write:issue,read:repository,write:repository,read:user,read:organization(tune against actual CLI surface).stoke auth login --scopes <csv>(or--full-scopes) for operators who need package publish / org admin.Acceptance
stoke auth loginwithout flags creates a reduced-scope token.Audit note
Security finding from full audit of stoke @
92a6741. Config file mode0600is good; scope reduction is defense in depth.