vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Replace the runner allowlist with a runner role
648cd81bde97042f682a528ebb9ce6353b95bf3f · Keenan Nemetz · 1d ago · parent ea92d754
server/hook/scope.go +28−1
| @@ -70,10 +70,29 @@ func lookupRunCredential(cfg Config, fingerprint string) (*runs.RunCredential, e | |||
| 70 | 70 | func writableMetadata(g *git.Repo, c change, acl *access.ACL, actor string) []string { | |
| 71 | 71 | if c.old == "" || c.old == git.ZeroSHA { | |
| 72 | 72 | // Nothing to compare against: the branch does not exist yet, and creating it is | |
| 73 | // a maintainer's act, exactly as creating it from the browser is. | ||
| 73 | // a maintainer's act, exactly as creating it from the browser is. The one | ||
| 74 | // exception is a runner attaching release pointers to a repository whose | ||
| 75 | // metadata branch is empty: the tree must contain nothing but releases/, so the | ||
| 76 | // branch cannot be used as a side door for issues or change requests. | ||
| 74 | 77 | if acl.CanTriage(actor) { | |
| 75 | 78 | return nil | |
| 76 | 79 | } | |
| 80 | if acl.CanReport(actor) { | ||
| 81 | entries, err := g.LsTreeR(c.new) | ||
| 82 | if err != nil { | ||
| 83 | return []string{"cannot read the new issues branch: " + err.Error()} | ||
| 84 | } | ||
| 85 | onlyReleases := len(entries) > 0 | ||
| 86 | for _, e := range entries { | ||
| 87 | if !metadata.IsReleasePath(e.Name) { | ||
| 88 | onlyReleases = false | ||
| 89 | break | ||
| 90 | } | ||
| 91 | } | ||
| 92 | if onlyReleases { | ||
| 93 | return nil | ||
| 94 | } | ||
| 95 | } | ||
| 77 | 96 | return []string{"creating the issues branch needs a maintainer; it must already exist"} | |
| 78 | 97 | } | |
| 79 | 98 | status, err := g.DiffStatus(c.old, c.new) | |
| @@ -206,6 +225,14 @@ func writableMetadata(g *git.Repo, c change, acl *access.ACL, actor string) []st | |||
| 206 | 225 | "%s: %s may only propose a branch under %s", | |
| 207 | 226 | path, actor, access.ContributorBranchPrefix(actor))) | |
| 208 | 227 | } | |
| 228 | case metadata.IsReleasePath(path): | ||
| 229 | // A runner writes the pointers for the artifacts its own job built. The | ||
| 230 | // pointer hygiene check still runs over the whole branch, so a pointer | ||
| 231 | // whose object was never uploaded cannot be published this way either. | ||
| 232 | if !acl.CanReport(actor) { | ||
| 233 | problems = append(problems, fmt.Sprintf( | ||
| 234 | "%s: %s may not attach release artifacts in this repository", path, actor)) | ||
| 235 | } | ||
| 209 | 236 | default: | |
| 210 | 237 | problems = append(problems, fmt.Sprintf( | |
| 211 | 238 | "%s: a contributor may write a comment, an issue, or a change request", path)) | |