Skip to content

Implement lane's patch carry imports an unchecked copy of the publish gate #16813

Description

@kyle-sexton

Problem

In .github/workflows/pr-run-activity-read.yml, job run, the carry step's patch_is_clean imports ${{ runner.temp }}/read-patch/publish-gate.mjs (PATCH_GATE, ~L2321-2329). That copy is made from the base before the head checkout (~L1499), but nothing checks its hash before the import, and head code shares RUNNER_TEMP with that step. A planted copy can make the run job's first-pass leak scan of the patch carry return clean.

Exposure today: the scan job re-reads lib/publish-gate.mjs from the API at the default-branch tip (~L3093-3098) and scans the carry again, so a planted gate skips only the first pass. This is hardening, not an open path.

The transcript carry (#16805) already re-hashes the same base copy inside the scan process just before its import.

Done when

  • patch_is_clean imports the gate only after checking its SHA-256 against the value recorded before the head checkout, and carries nothing on a mismatch, missing file or link, as the transcript step does.
  • A test pins the check and runs the step with a planted, linked and missing gate.

Activity

  1. added
    needs-triage
    on Nov 17, 2026
  2. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor

    Size: Small
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: none
    Blast radius: the patch-carry step in pr-run-activity-read.yml and its test; read and run by the run job of that workflow.
    Reversible: yes; revert the workflow and test change.
    Open questions: none
    Understood: the patch carry's patch_is_clean imports the base-copied publish gate without re-checking its SHA-256, while head code shares the runner temp directory. A planted gate could therefore pass the first-pass scan. The report says the scan job re-reads the gate from the default branch, so this is hardening and not an open path. The fix is to verify the recorded hash before the import and carry nothing on a mismatch, missing file or link, as the transcript step does. A test should cover planted, linked and missing gates. I found no duplicate among the open issues and no merged pull request that already covers this.

    Automated triage. A maintainer reviews it.

  3. removed
    needs-triage
    on Nov 17, 2026
  4. melodic-automation-lanes commented on Nov 17, 2026

    @melodic-automation-lanes
    Contributor

    {"v":1,"actor_id":337595936,"title_sha256":"39c22edc2a4c26759bc399c441f86c1439882e2a6746d76bd7fb8db4dbfa2b93","body_sha256":"56dac7c844621bc572de656c889a6394f845304135d3d0d09e7d2247afef547f"}

  5. github-actions commented on Nov 17, 2026

    @github-actions
    Contributor
    No description provided.
  6. added
    host-run
    on Nov 17, 2026
  7. melodic-automation-lanes commented on Nov 17, 2026

    @melodic-automation-lanes
    Contributor

    The work-resolve-issue lane stopped on this issue (patch-protected-path): the change needs a path the issue lane may not push, which a maintainer session builds by hand.
    It added host-run and set Work status to confirmed: an agent run on a host builds it, and it waits on no decision from a person.

    In the run's words:

    The run stopped early (patch-protected-path): its change needs a path the issue lane may not push, which a person changes instead. In the run's words: patch-protected-path: .github/workflows/pr-run-activity-read.yml — patch_is_clean is defined inline in this workflow (job run, ~L2332), so the SHA-256 check before importing the publish-gate copy must be added there, and the lane cannot push a change under /.github/workflows/**.

    What the run says it did not do:

    • The hash check in patch_is_clean and its test were not written, because the change belongs in the protected path .github/workflows/pr-run-activity-read.yml.

    Run: https://github.com/melodic-software/claude-code-plugins/actions/runs/44120174937

    To hand it back to the lane, remove host-run and set Work status to agent-ready again.

  8. removed
    host-run
    on Nov 17, 2026
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

    No labels
    No labels

    Type

    Fields

    Work status

    confirmed

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions