Skip to content

Least privilege for agents, the MVP (least-privilege-mvp) - #190

Draft
nabil-becker wants to merge 3 commits into
mainfrom
feature/least-privilege-mvp/1
Draft

nabil-becker wants to merge 3 commits into
mainfrom
feature/least-privilege-mvp/1

Conversation

@nabil-becker

Copy link
Copy Markdown
Owner

Least privilege for agents, the MVP, from the accepted proposal docs/proposals/agent-linux-user.md. One PR for the deliverable; later steps add commits.

Steps

  1. GitHub ruleset and a narrow token (this commit): protect-release-tags ruleset, required reviewer on the release environment, gh NOTES "Logging in with a fine-grained token"
  2. Claude Code's sandbox through the managed drop-in, permissions locked
  3. Write-deny on what the Operator runs later and on the git dir
  4. to come (see the proposal's step list)
  5. to come (openbao openbao-agent-login)
  6. to come (the agent's own Linux user)
  7. to come
  8. to come

Applying step 1 (Operator)

  1. Run task repo:govern as a repo admin, from where it runs today (the workstation with gh logged in as you). Preview with -WhatIf on the script first. It reads the release reviewer from the repo owner; pass -ReleaseReviewer <login> to override.
  2. Make the fine-grained token: this repository only, an expiry, Contents read/write, Pull requests read/write, Metadata read; no Administration, Workflows, Actions or Secrets.
  3. gh auth login --with-token from your terminal in the devhost (see the gh NOTES).
  4. T6: with the token, git push, gh pr create, gh pr ready should work; gh api changing a ruleset should be refused; gh pr merge on an unapproved throwaway PR (a one-line docs change on a scratch branch, no approval) shows whether the Admin bypass lets the token merge (decision 4). Close or merge the throwaway PR afterwards.
  5. T8: repeat the T6 set in the office's repository with its own token.
  6. Check that the release workflow can still create its feature_* tags: the Actions app is named as bypass actor; if the API refused it, the script warned and applied admins only, so add it by hand.

Not applied from here: nothing in this PR changes the repository's settings until you run step 1.

https://claude.ai/code/session_01DPsHU66aDPFXShdA7RzGte

devhost agent and others added 3 commits November 8, 2026 15:27
…ase reviewers; gh NOTES on a fine-grained token (least-privilege-mvp)

Set-RepoGovernance.ps1 adds the protect-release-tags ruleset (feature_*:
no creation except by the Actions app or admins, no update, delete or
force-push) and a required reviewer on the release environment (the repo
owner, read at run time, or -ReleaseReviewer). protect-main is unchanged,
Admin bypass kept (decision 4). gh NOTES gain "Logging in with a
fine-grained token".

Co-Authored-By: Claude Sonnet 5.5 <claude-sonnet-5-5@noreply.invalid>
Claude-Session: https://claude.ai/code/session_01DPsHU66aDPFXShdA7RzGte
Signed-off-by: devhost agent <devhost-agent@noreply.invalid>
…ege (least-privilege-mvp, agent-linux-user)

Co-Authored-By: Claude Opus 5.5 <claude-opus-5-5@noreply.invalid>
Claude-Session: https://claude.ai/code/session_01DPsHU66aDPFXShdA7RzGte
Signed-off-by: devhost agent <devhost-agent@noreply.invalid>
…ege-mvp)

Verdict: fit with changes. 25 findings and 6 open questions appended to
docs/proposals/agent-least-privilege-brd-mapping.md; design sections untouched.
The proposals index row gains the verdict.

Co-Authored-By: Claude Opus 5.5 <claude-opus-5-5@noreply.invalid>
Claude-Session: https://claude.ai/code/session_01DPsHU66aDPFXShdA7RzGte
Signed-off-by: devhost agent <devhost-agent@noreply.invalid>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant