Add repospawner machine user scoped to terraform-git #88
Reference in New Issue
Block a user
Delete Branch "benvin/repospawner-user"
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?
Why
The repospawner service opens repo-creation PRs against terraform-git and needs no other access. Giving it its own identity plus a per-repo team keeps it least-privilege — adding it to the existing
agentsteam would grant write across every unkin repository (include_all_repositories: true).How
config/git.unkin.net/user/repospawner.yaml— new machine user mirroring the unkin-agent bot posture:visibility: limited,admin: false,allow_create_organization: false,max_repo_creation: 0.config/git.unkin.net/unkin/team/repospawner.yaml— new team withpermission: write,include_all_repositories: false,repositories: [terraform-git],can_create_repos: false, members[repospawner].No module changes needed: the team module already passes
repositoriesthrough togitea_team. Merge stays blocked by terraform-git's existing branch protection (merge whitelist = Owners), so repospawner can push branches and open PRs but never merge.make pre-commitpasses.Hardening follow-up in
dd26c86: setrestricted: trueon the repospawner account so a leaked token can only reach repos/orgs it is explicitly added to -- the repospawner team grant on terraform-git covers everything the bot does.