Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,9 @@ jobs:
fail "branch metadata is not an approved ref"

if [ "$D2B_EVENT_NAME" = "pull_request_target" ]; then
[ "$D2B_CALLER_WORKFLOW_REF" =
"vicondoa/d2b/.github/workflows/pr.yml@refs/heads/main" ] ||
[ "$D2B_CALLER_WORKFLOW_REF" = "vicondoa/d2b/.github/workflows/pr.yml@refs/heads/main" ] ||
fail "PR workflow controls must be sourced from protected main"
[ "$D2B_JOB_WORKFLOW_REF" =
"vicondoa/d2b/.github/workflows/build.yaml@refs/heads/main" ] ||
[ "$D2B_JOB_WORKFLOW_REF" = "vicondoa/d2b/.github/workflows/build.yaml@refs/heads/main" ] ||
fail "reusable build controls must be sourced from protected main"
case "$D2B_BASE_REF" in
main|v3) ;;
Expand All @@ -110,8 +108,7 @@ jobs:
tested_sha="$D2B_MERGE_SHA"
instance="d2b/pr/$D2B_PR_NUMBER/$D2B_HEAD_SHA/linux-x86_64/rules_rs/worker-v1/minimal/lock-v1"
elif [ "$D2B_EVENT_NAME" = "push" ]; then
[ "$D2B_CALLER_WORKFLOW_REF" =
"vicondoa/d2b/.github/workflows/build.yaml@refs/heads/main" ] ||
[ "$D2B_CALLER_WORKFLOW_REF" = "vicondoa/d2b/.github/workflows/build.yaml@refs/heads/main" ] ||
fail "push workflow controls must be sourced from protected main"
[ "$D2B_REF" = "refs/heads/main" ] ||
fail "trusted build pushes are restricted to main"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ permissions:
jobs:
build:
name: build
uses: vicondoa/d2b/.github/workflows/build.yaml@refs/heads/main
uses: vicondoa/d2b/.github/workflows/build.yaml@main
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ deprecations ship one minor release before removal.
window unlabelled. Adds the `proofs/window-identity-chrome/` proof for the
geometry, parts, contrast, and label logic.

### Fixed

- Fixed trusted `main` push validation and reusable workflow resolution so the
BuildBuddy seed workflow executes its metadata checks instead of failing on
shell test parsing.

## [1.4.1] - 2026-07-12

### Added
Expand Down
3 changes: 2 additions & 1 deletion packages/xtask/tests/policy_ci.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ fn main_controlled_buildbuddy_workflows_preserve_trust_contract() {
"PR workflow must not run untrusted pull_request controls"
);
assert!(
pr.contains("uses: vicondoa/d2b/.github/workflows/build.yaml@refs/heads/main")
pr.contains("uses: vicondoa/d2b/.github/workflows/build.yaml@main")
&& !pr.contains("uses: vicondoa/d2b/.github/workflows/build.yaml@refs/heads/main")
&& !pr.contains("D2B_BUILDBUDDY_API_KEY")
&& !pr.contains("secrets: inherit"),
"PR workflow must call the main-owned reusable build at main without PR secret access"
Expand Down
Loading