Commit d5e1f3119a

d5e1f3119a440b246f7b00f4b825932049778ce3

parent: 972f8f6350

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-09 03:08 UTC

hookd: ClaimBuild callers pass untrusted

Ref #184

Layout: unified · split

internal/hookd/pushshapes_test.go +2 −2
@@ -174,7 +174,7 @@ func (f *shapeFixture) push(branch, old, sha string) {
174// commit included. 174// commit included.
175func (f *shapeFixture) finish(status string) { 175func (f *shapeFixture) finish(status string) {
176 for { 176 for {
177 b, ok, err := f.st.ClaimBuild([]int64{f.repo.ID}) 177 b, ok, err := f.st.ClaimBuild([]int64{f.repo.ID}, true)
178 if err != nil { 178 if err != nil {
179 f.t.Fatal(err) 179 f.t.Fatal(err)
180 } 180 }
@@ -368,7 +368,7 @@ var pushShapes = []pushShape{
368 c1 := f.appCommit("more") 368 c1 := f.appCommit("more")
369 f.push("feat", zeroSHA40, c1) 369 f.push("feat", zeroSHA40, c1)
370 for i := 0; i < 2; i++ { 370 for i := 0; i < 2; i++ {
371 if _, ok, err := f.st.ClaimBuild(nil); err != nil || !ok { 371 if _, ok, err := f.st.ClaimBuild(nil, true); err != nil || !ok {
372 f.t.Fatalf("claim: %v ok=%v", err, ok) 372 f.t.Fatalf("claim: %v ok=%v", err, ok)
373 } 373 }
374 } 374 }