Repository navigation
fix: secure generated file healing workflow - #3204
Open
Tal Zaccai (TalZaccai) wants to merge 6 commits into
Open
Tal Zaccai (TalZaccai) wants to merge 6 commits into
Tal Zaccai (TalZaccai) wants to merge 6 commits into
Conversation
Split candidate preparation from the privileged finalizer, reconstruct and verify exact merge objects, isolate trusted pnpm inputs, and gate the App token to a leased push. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved security vulnerabilities and healing failures undermine the intended isolation and reliability.
4 open issues
What changed in this PR
Hardens generated-file conflict healing by separating candidate preparation from privileged verification and pushing.
Changes:
- Splits healing into read-only producer and privileged finalizer workflows.
- Adds isolated lockfile regeneration, artifact validation, and exact-head push leases.
- Adds focused security and healing regression tests.
| File | Description |
|---|---|
ts/tools/scripts/test/generatedFileHealing.spec.mjs |
Adds isolation, metadata, healing, and push tests. |
ts/tools/scripts/lib/generatedFileHealing.mjs |
Implements preparation, verification, and guarded pushing. |
ts/tools/scripts/heal-generated-files.mjs |
Exposes prepare, verify, and push commands. |
.github/workflows/heal-generated-files.yml |
Creates candidates without write credentials. |
.github/workflows/heal-generated-files-finalize.yml |
Verifies candidates before minting an App token. |
Review effort: Balanced
Keep read-only GitHub metadata collection separate from credential-free preparation, fetch trusted code without checkout credentials, and skip the legacy healer only for the initial secure-workflow rollout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject unsafe manifest paths and symlinks, require exact deterministic commit messages, configure merge identity early, and isolate per-PR policy failures during scans. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Resolve the standalone pnpm entrypoint from PNPM_HOME or the global shim layout so the real lockfile-healing test runs under pnpm/action-setup on Windows. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


workflow_runfinalizer.Platform limitations: the finalizer becomes active only after landing on the default branch; GitHub has no atomic metadata-check/ref-update API, so the finalizer immediately revalidates metadata and uses an exact SHA lease to reject head races; hosted
synchronizedelivery cannot be proven offline.