Skip to content

fix(release): fence maintained 3.1 publication - #7983

Merged
bokelley merged 2 commits into
3.1.xfrom
bokelley/fix-3-1-release-publication-fence
Oct 7, 2026
Merged

bokelley merged 2 commits into
3.1.xfrom
bokelley/fix-3-1-release-publication-fence

Conversation

@bokelley

@bokelley bokelley commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The 3.1 publisher could upload historical versions, recreate missing signatures, and expose a GitHub release before verifying all four assets. Require the current tested checkout, exact original release merge, final-head approval from a non-author human with current repository permission, and immutable committed bytes. Read back all four staged assets before publication; upload only the current version, without historical, alias, CORS or delete writes. Maintenance releases keep main's GitHub Latest unchanged.

The final correction fixes both CodeQL file-read races: package and artifact checks open each leaf once with O_NOFOLLOW, validate that descriptor's type/mode, read through it and close it in finally. Deterministic replacements were accepted by the original helper (three failing refusal controls); the corrected helper rejects them and passes all 101 publication controls. All seven fresh correction source reviews and independent root/code/security reviews approve the final tree. Normal commit and push hooks pass; their server/storyboard/docs selectors correctly skip this two-file correction. The initial cumulative eight-file commit separately passed 4,392 server tests (three existing skips) and both six-tenant current/released-3.0.27 matrices. Fresh final-head CodeQL, Ladon and required CI remain mandatory.

Review dispositions preserve the existing safeguards: queue: max with cancel-in-progress: false is supported by GitHub. The collaborator-permission endpoint requires Metadata read for fine-grained/App tokens, rather than Administration; permissions are not expanded. The current 3.1.25 public signed tuple was independently verified, and stranded/remote-failure checks intentionally refuse rather than infer absence.

Operational boundaries: non-author means PR author, not an inferred last pusher; actual bot producer/run/final head still needs independent qualification. The old #7971 human approval does not transfer to a regenerated release. GitHub may become public before all R2 objects are available after a failure; recovery remains separately reviewed. Private original-Git upload bodies protect concurrent working-tree changes under trusted Git/AWS tools and isolated files, without claiming malicious same-user protection. Forward merges must retain main's own Latest behavior and producer workflow.

@bokelley
bokelley requested a review from a team as a code owner October 7, 2026 00:37
Comment thread scripts/check-release-state.cjs Fixed
Comment thread scripts/check-release-state.cjs Fixed
Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Request changes

Request changes — 1 blocking finding

Blocking findings

  • .github/workflows/release.yml:17 — Invalid queue: max concurrency key risks failing release workflow validation (blocks all releases)

Medium findings

  • .github/workflows/release.yml:339 — R2 publish re-runs approval() under GITHUB_TOKEN, which may lack collaborator-permission scope, so R2 could fail after the release is public
  • .github/workflows/release.yml:94 — Unguarded fence steps (Require current release branch, Detect stranded committed release) run on every push, reddening the Release workflow on unrelated commits

The fence logic itself is strong and fail-closed (committed() byte/oid/mode/symlink/setuid checks, put_immutable via git cat-file blob with --if-none-match '*' conditional PUT, ~96-control test suite). Fix the invalid queue: max concurrency key first; the two medium issues (token scope on the R2 approval re-run, missing if: guards on the fence steps) are worth addressing in the same pass. Noted: the branch allowlist omitting 2.6.x/2.5-maintenance is safe on the 3.1.x copy but a forward-merge landmine already called out in the PR body.

Blocking findings

  • .github/workflows/release.yml:17 — Invalid queue: max concurrency key risks failing release workflow validation

Medium findings

  • .github/workflows/release.yml:339 — R2 publish re-runs approval() under GITHUB_TOKEN, which may lack collaborator-permission scope
  • .github/workflows/release.yml:94 — Unguarded fence steps run on every push, reddening Release workflow on unrelated commits

@aao-secretariat
aao-secretariat Bot dismissed their stale review October 7, 2026 01:13

Superseded by a later Ladon review that rechecked and resolved its blocking findings.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ladon verdict: Approve

Approve — prior blocking issues resolved, no current findings.

This is a subsequent review. The prior run requested changes on a [high] finding (release.yml:17 queue: max concurrency key) plus two mediums (R2 publish token scope; unguarded fence steps). In this pass the reviewer re-checked the prior High against the full PR and did not re-surface it: the author cited a specific dated GitHub changelog supporting the queue:max feature, and the citation is specific/plausible — noted only that the new assertion validates YAML parsing rather than GitHub schema acceptance, which is not itself a blocking defect. The prior release.yml mediums are out of this delta's scope.

The current delta is a clean TOCTOU hardening of scripts/check-release-state.cjs: readPublicationFile() opens each leaf once with O_NOFOLLOW|O_NONBLOCK, validates type/mode via fstat on that descriptor, reads through it, and closes in a finally block — closing the prior lstat/read split. package.json correctly skips the mode check (bytes are byte-compared to the tested commit). New race-preload tests deterministically prove before-open symlink/mode replacements are refused and after-open pathname swaps still read the validated inode.

No current findings of any severity. high_risk is false, gated_paths is false, no author team gate. No decision-table trigger fires (rows 1–8) → row 9: approve. Net improvement over the prior request-changes.

@bokelley
bokelley merged commit ba2f0dd into 3.1.x Oct 7, 2026
11 checks passed
@bokelley
bokelley deleted the bokelley/fix-3-1-release-publication-fence branch October 7, 2026 01:20
bokelley added a commit that referenced this pull request Oct 8, 2026
* fix(compliance): make four media-buy storyboards runnable by non-guaranteed sellers (3.1.x backport) (#7761)

Backport of #7756 (cherry picked from commit 6fd64c4) onto the 3.1.x
versions of canonical_formats, billing_finality_delivery,
measurement_accountability, and vendor_metric_accountability. Fixture
products and canonical_formats' discovery filters move from guaranteed to
non_guaranteed so sellers declaring only sales-non-guaranteed no longer
fail create_media_buy with DELIVERY_MODE_NOT_SUPPORTED. Pricing stays
fixed_price because the create steps send no bid.
measurement_accountability's fixture declares completed_views so it
matches its own required_metrics filter. Storyboards bump 1.0.0 -> 1.0.1.
No 3.2-only fields, capabilities, or syntax are imported.

Refs #7754

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

* compliance(media-buy): backport #7765 delivery_reporting to non_guaranteed fixtures (#7771)

* Version Packages (#7766)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(compliance): correct evaluator feature membership on 3.1 (#7916)

* fix(compliance): route 3.1 governance boards through the hosted buyer (#7964)

* fix(release): fence maintained 3.1 publication (#7983)

* fix(release): fence maintained 3.1 publication

* fix(release): bind publication reads to opened files

* fix(release): revalidate staged approval and CDN verification (#7987)

* Version Packages (#7971)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(deploy): omit unconfigured docs snapshots from runtime image

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: sujan kumar reddy challa <[email protected]>
Co-authored-by: aao-release-bot[bot] <280565558+aao-release-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
bokelley added a commit that referenced this pull request Oct 8, 2026
* fix(compliance): make four media-buy storyboards runnable by non-guaranteed sellers (3.1.x backport) (#7761)

Backport of #7756 (cherry picked from commit 6fd64c4) onto the 3.1.x
versions of canonical_formats, billing_finality_delivery,
measurement_accountability, and vendor_metric_accountability. Fixture
products and canonical_formats' discovery filters move from guaranteed to
non_guaranteed so sellers declaring only sales-non-guaranteed no longer
fail create_media_buy with DELIVERY_MODE_NOT_SUPPORTED. Pricing stays
fixed_price because the create steps send no bid.
measurement_accountability's fixture declares completed_views so it
matches its own required_metrics filter. Storyboards bump 1.0.0 -> 1.0.1.
No 3.2-only fields, capabilities, or syntax are imported.

Refs #7754

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>

* compliance(media-buy): backport #7765 delivery_reporting to non_guaranteed fixtures (#7771)

* Version Packages (#7766)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(compliance): correct evaluator feature membership on 3.1 (#7916)

* fix(compliance): route 3.1 governance boards through the hosted buyer (#7964)

* fix(release): fence maintained 3.1 publication (#7983)

* fix(release): fence maintained 3.1 publication

* fix(release): bind publication reads to opened files

* fix(release): revalidate staged approval and CDN verification (#7987)

* Version Packages (#7971)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix(schema): backport macro-bearing asset URLs to 3.1.x (#8004)

* Version Packages (#8007)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Co-authored-by: sujan kumar reddy challa <[email protected]>
Co-authored-by: aao-release-bot[bot] <280565558+aao-release-bot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants