File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 format : " semver"
1010 max : " 1.31.0"
1111 allowed_builder_ids :
12- - https://github.com/st3penta/fosdem-2026-build-sample/.github/workflows/pull_request.yml@refs/pull/
12+ - ^ https://github\ .com/st3penta/fosdem-2026-build-sample/\ .github/workflows/pull_request\ .yml@refs/pull/\d+/merge$
Original file line number Diff line number Diff line change @@ -41,6 +41,16 @@ deny contains result if {
4141 att.statement.predicateType == " https://slsa.dev/provenance/v1"
4242 builder_id := att.statement.predicate.runDetails.builder.id
4343
44- not builder_id in allowed_builder_ids
44+ not is_builder_id_allowed ( builder_id, allowed_builder_ids)
4545 result := lib.result_helper (rego.metadata.chain (), [builder_id])
4646}
47+
48+ # Check if builder_id matches any allowed pattern (exact or regex)
49+ is_builder_id_allowed (builder_id, allowed_ids) if {
50+ some allowed_id in allowed_ids
51+ builder_id == allowed_id
52+ } else if {
53+ some allowed_id in allowed_ids
54+ startswith (allowed_id, " ^" )
55+ regex.match (allowed_id, builder_id)
56+ }
You can’t perform that action at this time.
0 commit comments