File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,6 +134,8 @@ jobs:
134134 id-token : write
135135 attestations : write
136136 artifact-metadata : write
137+ env :
138+ GH_REPO : ${{ github.repository }}
137139 steps :
138140 - name : Download packaged dispatcher assets
139141 uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
Original file line number Diff line number Diff line change @@ -144,6 +144,8 @@ jobs:
144144 id-token : write
145145 attestations : write
146146 artifact-metadata : write
147+ env :
148+ GH_REPO : ${{ github.repository }}
147149 steps :
148150 - name : Download packaged release assets
149151 uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
Original file line number Diff line number Diff line change @@ -122,6 +122,13 @@ test_publish_validates_metadata_without_checking_out_source() {
122122 fi
123123}
124124
125+ test_checkout_free_publish_has_explicit_repository_context () {
126+ if ! publish_section | grep -F ' GH_REPO: ${{ github.repository }}' > /dev/null 2>&1 ; then
127+ echo " Checkout-free publish job must define GH_REPO for gh release commands." >&2
128+ exit 1
129+ fi
130+ }
131+
125132test_dispatcher_assets_are_attested_after_the_manifest_is_verified () {
126133 assert_contains " - name: Verify release asset manifest"
127134 assert_contains " - name: Attest dispatcher release assets"
@@ -203,6 +210,7 @@ test_dispatcher_release_target_and_prerelease_state_remain_verified() {
203210test_build_and_publish_jobs_have_separate_trust_boundaries
204211test_unprivileged_build_uses_only_the_approved_event_commit
205212test_publish_validates_metadata_without_checking_out_source
213+ test_checkout_free_publish_has_explicit_repository_context
206214test_dispatcher_assets_are_attested_after_the_manifest_is_verified
207215test_dispatcher_verifies_tagged_installers_after_draft_creation
208216test_publish_rejects_manifest_and_existing_tag_mismatches
Original file line number Diff line number Diff line change @@ -122,6 +122,13 @@ test_publish_validates_metadata_without_checking_out_source() {
122122 fi
123123}
124124
125+ test_checkout_free_publish_has_explicit_repository_context () {
126+ if ! publish_section | grep -F ' GH_REPO: ${{ github.repository }}' > /dev/null 2>&1 ; then
127+ echo " Checkout-free publish job must define GH_REPO for gh release commands." >&2
128+ exit 1
129+ fi
130+ }
131+
125132test_assets_are_attested_after_the_manifest_is_verified () {
126133 assert_contains " - name: Verify release asset manifest"
127134 assert_contains " - name: Attest native CLI release assets"
@@ -192,6 +199,7 @@ test_post_publish_automation_remains_outside_the_privileged_job() {
192199test_build_and_publish_jobs_have_separate_trust_boundaries
193200test_unprivileged_build_uses_only_the_approved_event_commit
194201test_publish_validates_metadata_without_checking_out_source
202+ test_checkout_free_publish_has_explicit_repository_context
195203test_assets_are_attested_after_the_manifest_is_verified
196204test_publish_rejects_manifest_and_existing_tag_mismatches
197205test_draft_creation_accepts_only_the_known_missing_tag_responses
You can’t perform that action at this time.
0 commit comments