Skip to content

Harden bound setup start-up and create the immutable PHP archive mirror #420

Open

Description

@rmcdaniel

Follow-up to #414. Ruleset 26628397 now selects native-policy.yml at d20d4780 on refs/heads/main, with runtime 0bde98cd. The behavioural controls in #416–#419 passed. Two items are left.

1. Low hardening from the #414 security review

  • Pin the action's module type. Node decides whether bootstrap.js is CommonJS from the nearest package.json, so an ancestor package.json outside the covered action directory could change that. Fix: add a covered .github/actions/setup-php-linux/package.json containing {"type":"commonjs"}, or rename the entry to bootstrap.cjs.
  • Refuse .gitattributes. A pinned tree's .gitattributes (export-ignore or filters) can make the archive the runner downloads differ from the git tree the digest covers. Fix: refuse any new bound-linux-php pin whose tree contains .gitattributes.

Both are runtime changes: new setup-code identity, then a runtime pin and a ruleset selection. They are not data PRs.

Done when both checks are implemented with plant tests, reviewed, and selected by the ruleset. Verify with fresh accepted and refused PR events.

2. Create the archive mirror repository

Create durable-workflow/php-archives (public) with immutable releases enabled. General will create it. Then follow qualification/PHP-ARCHIVE-UPDATES.md:

  1. Run scripts/php_archive_mirror.py plan (already dry-run verified against the live 8.3.37 assets).
  2. Upload one release per archive, tagged php-sha256-<16 hex>.
  3. Bind each mirror record with adopt in a data-only PR, which the native policy gate verifies.

Until the mirror records land, setup still fetches the two current rows from upstream and would break on the next upstream replacement.

Done when both setup rows in qualification/php-linux-bootstrap.json on main carry mirror records, and CI passes using them.

🤖 Generated with Claude Code

Activity

  1. rmcdaniel commented on Nov 19, 2026

    @rmcdaniel
    MemberAuthor

    Item 2 (archive mirror): done

    Mirror durable-workflow/php-archives (public, immutable releases on). Upstream assets were downloaded by exact ID into a fresh directory; size and SHA-256 equal the catalog and the live digest. php_archive_mirror.py plan passed (strict inspector reproduced 3b66abc2… / 929756ce…). Then the two planned gh release create commands ran. A README commit was added first because a release needs a commit to tag.

    Row Release (immutable) Mirror asset Size SHA-256 (re-downloaded, cmp-identical to upstream)
    24.04 php-sha256-115f855a722d95ce 768749741 42620774 115f855a…75b6aac4
    26.04 php-sha256-07e4b1bf60b6ddf0 768751028 42104271 07e4b1bf…8da5c32a

    PRs (all merged with --merge --match-head-commit at green):

    Setup uses the mirror: main run 44590520735 / Shared contract tests passed with setup-php-linux@636d0cda, which found PHP 8.3.37. Setup does not log its fetch URL. Running setup's own download_held from the 636d0cda tree requested only api.github.com/repos/durable-workflow/php-archives/releases/assets/{768749741,768751028}, which redirect to release-assets. Each matched the exact size and SHA-256, with no shivammathur request.

    Still open:

    • Item 1 (Low runtime hardening: covered package.json {"type":"commonjs"} / bootstrap.cjs; refuse a pin whose tree has .gitattributes) needs a runtime change and ruleset selection.
    • Consumer repositories and the qualification workflows still pin cba1285d (upstream fetch) until they are repinned to 636d0cda.

    🤖 Generated with Claude Code

  2. rmcdaniel commented on Nov 19, 2026

    @rmcdaniel
    MemberAuthor

    Consumer re-pins to the mirrored setup source

    Every consumer of setup-php-linux now pins 636d0cda (mirror fetch) instead of cba1285d. That covers every uses: line, plus the ref:/control_source pairs and the sdk-php test literal that move with it, exactly as #440/#296/#170/#337/#1243 did. All merged with --merge --match-head-commit at green:

    Repo PR Merge commit
    sdk-rust durable-workflow/sdk-rust#301 2036a7cb
    sdk-php durable-workflow/sdk-php#443 40f17bd3
    cli durable-workflow/cli#171 d55602e5
    workflow durable-workflow/workflow#1246 bc202659
    waterline durable-workflow/waterline#342 (updated from main once when BEHIND) d6f2560f

    No consumer workflow on main still contains cba1285d. An org search, confirmed by cloning every repo, found no other setup-php-linux users; sample-app, ai, cloud, server, sdk-python, docs and workspaces only use other central actions.

    Not re-pinned (needs runtime review): this repository's qualify-linux-php-initial.yml and qualify-linux-php-ubuntu24.yml (and their tests/fixtures/qualify-linux-php-*-archive-repair-20261119.yml fixtures). They check out the repository at cba1285d, so a data PR cannot swap the pin. cba1285d stays approved in policy.json for them.

    Still open here: item 1 (Low runtime hardening: package.json commonjs, .gitattributes refusal) and the qualification workflow re-pin above.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent:generalPull request opened by General agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions