Skip to content

Fix safe-output Git remote helper execution - #73672

Open
pelikhan wants to merge 34 commits into
mainfrom
pelikhan/safe-output-git-hardening
Open

pelikhan wants to merge 34 commits into
mainfrom
pelikhan/safe-output-git-hardening

Conversation

@pelikhan

@pelikhan pelikhan commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

Safe-output Git artifact generation stays offline and disables repository-configured programs. Incomplete checkouts retain a monorepo-aware compatibility path: package selected local change objects in the agent, then recover the required trusted history and baseline data in an isolated safe-outputs publisher.

Security and recovery design

  • Deny agent-side Git transports and implicit partial-clone fetching with GIT_ALLOW_PROTOCOL="" and GIT_NO_LAZY_FETCH=1. Disable external diff/textconv, hooks, fsmonitor, signing, maintenance, and conversion drivers command-locally. Remove generation token forwarding and authorization-header injection.
  • Preserve the offline patch/bundle fast path. Eligible failures select objects reachable from the pinned tip, using local baseline refs only as exclusion hints. Unrelated branches, tags, unreachable history, and already-covered baseline objects are not packaged. Hints confer no publisher baseline or network authority.
  • Pin raw-staging parent directories through descriptor-relative traversal before reading or hashing bytes. Production staging is Linux-only and fails closed elsewhere. Parent-replacement and swap-and-restore regressions check that outside-file bytes never enter the object database.
  • Preview every packed object and independently reconstruct that complete preview. Post-redaction guards remove recovery envelopes when previews are changed, missing, or forged; affected uploads require successful validation, including after artifact consolidation and for staging/memory uploads. Failure to validate or remove an unsafe envelope fails closed.
  • Start trusted recovery with a depth-one treeless fetch of the authorized baseline. Increase depth geometrically only when a successful fetch leaves required ancestry missing, pinning subsequent requests to the first resolved revision. Hydrate only necessary baseline/boundary trees and required blobs whose identities were independently read from trusted trees. Unchanged large files remain unhydrated.
  • Finish all network operations before importing untrusted objects. Retain native object-structure validation and strict fsck. Authentication failures, unsupported filters, and other fetch errors stop recovery without an unfiltered fallback or credential retry.
  • Preserve exact event baselines, publisher authorization, file/size protections, exclusions, Claim scoping, transport integrity, and concurrent-update protections. Transform only private captured snapshots; original uploads remain immutable. Both publishers generate object-pack-aware fallback commands, and packaging failures preserve the original checkout guidance while enqueue errors retain structured operation-limit guidance.
  • Trace resolution using fixed stages, booleans, and bounded counts, excluding repositories, refs, SHAs, paths, credentials, contents, raw errors, and raw offline Git diagnostics.
  • Update checkout documentation, compiler threat specification/changelog to 1.0.93, and bounded TLA+ generation/recovery models. Preserve main's expanding-heredoc protection, MCP expression transport, prompt-import requirements, and experimental PR-merge policy contract. Recovery entries use noncolliding versions 1.0.91–1.0.93.

Compatibility and limits

Missing data never authorizes fetching from the agent checkout. Eligible non-staged PR outputs can return result: "queued" / recovery: "object-pack"; queued is not published. Recovery must independently authenticate, reconstruct, and pass normal publisher policies.

Recovery preserves full/incremental outputs, bundle and explicit am transport, binary contents, executable modes, symlinks, gitlinks, and filtered resolved-tree synthesis. Unfiltered bundles preserve merge topology. Existing unfiltered am limitations remain: conflicting merge-history replay fails closed, aborts, and restores the baseline rather than publishing partial commits.

The 100,000-object / 64 MiB uncompressed packaging limits apply to selected change objects, not the entire monorepo. The pack/import limit is 80 MiB. Trusted ancestry search uses depths 1, 16, 64, 256, 1,024, 4,096, 16,384, and 65,536, with 60-second command deadlines and a shared 180-second network-operation deadline. Tree inspection is bounded to one million entries; required baseline blob hydration is bounded to 64 MiB, checked after each transferred batch. These are not a network-byte budget.

Dynamic PR updates without a trusted event baseline, staged outputs, oversized selected changes, exhausted recovery budgets, unsupported filtering, or missing agent-created bytes still require checkout provisioning. No patched release or deployed remediation is claimed.

Validation and limitations

  • 68 real-Git integration cases cover packaging/application, full/incremental bundle and am, actual local publisher pushes, exact baselines, merge behavior, exclusions, binary/mode/symlink/gitlink changes, hostile configuration, bounds, tampering, and cleanup. New cases cover depth-one PR merges and execute both manual recovery command sequences, checking final trees, configured exclusions, remote updates, and immutable uploads.
  • Monorepo fixtures include 65 MiB unchanged baseline files, oversized unrelated objects, and a 1,100-commit advancing history. They verify selected-object packaging, pinned adaptive depth, omitted intermediate trees, and independently authorized hydration. Negative cases cover filter/authentication failures, finite budgets, oversized required hydration, and missing agent-created data.
  • The review-batch gate passed 616 selected JavaScript tests and impacted Go tests. After merging latest main, 192 impacted JavaScript tests, impacted Go tests, and focused heredoc/MCP/recovery compiler and all-engine golden checks passed. 353/353 workflows compiled with no drift. Build, standard lint, formatting, and schema freshness passed.
  • The full repository gate is not green: custom Go lint reports inherited diagnostics in touched files. All eight files reported by the latest merge gate exactly match origin/main; unrelated lint cleanup was not mixed into this security fix.
  • Actual TLC 1.8.0 passed all 114 safe-output cases: 34 transport, 24 Git operations, 42 offline generation, and 14 deferred object recovery profiles, negative controls, and witnesses. The jar matched the repository-pinned SHA-256. Secure profiles exhausted reachable graphs; negative cases matched their expected invariant failures. This is bounded-model evidence, not implementation refinement or proof of filesystem traversal, upload removal, Git parser safety, or detector completeness.
  • Integration fixtures redirect only authorized recovery fetches to local trusted remotes; Git packaging, import, regeneration, application, and publisher pushes remain real. This is not live GitHub authentication or deployment verification. SHA-256 coverage is packaging/import only, not end-to-end publisher support. Descriptor traversal was tested with test-only Linux emulation on macOS, not a native Linux run. The separate full Python suite retains an unrelated pre-existing model-list expectation failure.

Changeset

  • Type: patch
  • Description: Harden safe-output Git artifact generation to use only prepared local refs and objects and prevent repository-configured programs from executing during generation.

Generated by 📋 Changeset Generator for #73672 · codex · gpt56 · ~28 AIC · ⌖ ~29 AIC · ⊞ 16K · ◷



✨ PR Review Safe Output Test - Run 41320035197

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • update.googleapis.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "update.googleapis.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · claude · sonnet46 · ~76 AIC · ⌖ ~6 AIC · ⊞ 965 · ◷
Comment /smoke-claude to run again



✨ PR Review Safe Output Test - Run 41390024653

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • update.googleapis.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "update.googleapis.com"

See Network Configuration for more information.

💥 [THE END] — Illustrated by Smoke Claude · claude · sonnet46 · ~76 AIC · ⌖ ~9 AIC · ⊞ 965 · ◷
Comment /smoke-claude to run again

Make patch and bundle generation local-only, deny explicit and implicit Git transports, and remove generation credential forwarding. Add regression coverage, checkout diagnostics, and compiler threat/TLA+ generation contracts for GHSA-4fwp-8v7m-jhhr.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review November 1, 2026 01:42
Copilot AI auto review requested due to automatic review settings November 1, 2026 01:42
@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Ponytail Reviewer

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Ponytail Reviewer · gpt56 · ~16 AIC · ⌖ ~6 AIC · ⊞ 15.1K · ◷

Generated by Ponytail Reviewer for #73672

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Test Quality Sentinel · haiku45 · ~6 AIC · ⌖ ~10 AIC · ◇ ~3 AIC · ⊞ 9.2K · ◷

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

Design Decision Gate 🏗️

Outcome: reported_no_action

The agent completed and reported no action. A no-op output alone does not verify that all required work was completed or that publication was possible.

Agent messages are omitted from this comment. The category uses structured run status, not interpretation of agent prose.

Generated from Design Decision Gate 🏗️ · routed: gpt56 max · ~1 AIC · ⌖ ~1 AIC · ◇ ~1 AIC · ⊞ 7.7K · ◷

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions github-actions 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.

Review result: COMMENT

I found no actionable blocking issues in the changed lines. The implementation consistently routes generator Git commands through the offline guard and removes generation-time fetch/auth forwarding. The specialist pass was unavailable due to tool-permission failure, so this assessment is based on the independent static review of the capped diff and selected source files; no tests or builds were run per review instructions.

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~3 AIC · ⌖ ~1 AIC · ⊞ 1.7K
Comment /review to run again

@github-actions github-actions 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.

Skills-Based Review 🧠

Applied /diagnosing-bugs (security-fix regression focus) and /codebase-design (interface consistency). This is a well-scoped security hardening fix for GHSA-4fwp-8v7m-jhhr: it replaces the fetch-on-missing-ref helper with a strictly local-only check (hasLocalOriginRemoteTrackingRef), removes token forwarding from both generators and handlers, and adds a solid 174-line offline regression suite (git_artifact_offline.test.cjs) that verifies remote helpers never execute, even with a working ext:: helper fixture. Two minor, non-blocking suggestions posted inline.

📋 Key Themes & Highlights

Key Themes

  • Regex broadening risk (git_patch_utils.cjs:282): describeGitFailure's match list was extended with generic words (missing, bad object, unable to read, not allowed) that could cause unrelated errors to get a misleading partial-clone diagnostic appended.
  • Silently-ignored options.token: both generators still accept a token option (exercised by tests) but it's now a no-op with no warning, which could mask the behavior change for existing callers.

Positive Highlights

  • ✅ The offline guard (GIT_ALLOW_PROTOCOL="", GIT_NO_LAZY_FETCH=1) is applied via a single execLocalGitSync wrapper and the offlineGitOptions merge order correctly prevents caller env overrides from relaxing it — verified by a dedicated regression test ("cannot relax the transport guard through caller options").
  • ✅ Good test design: the new suite exercises a genuinely harmless-but-working remote helper fixture to prove non-execution, rather than only asserting on mocked calls.
  • ✅ Fail-closed behavior for missing incremental baselines is correctly preserved (no silent diff-widening), with clear checkout-provisioning guidance in the error messages.
  • ✅ Threat-model documentation (compiler-threat-detection-spec.md, SafeOutputGeneration.tla) is thorough and honestly scoped, explicitly noting the TLA+ model has not yet been checked with TLC.

Neither issue blocks approval; they are worth a quick follow-up.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · ~125 AIC · ⌖ ~20 AIC · ⊞ 10.7K
Comment /matt to run again

Comment thread actions/setup/js/git_patch_utils.cjs Resolved
Comment thread actions/setup/js/generate_git_patch.cjs Resolved
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to Ponytail Reviewer completion: No code change is needed because this comment reports completion without an actionable finding. I am not treating reported_no_action as proof of validation or publication.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to PR Code Quality Reviewer completion: No additional code change is needed; the associated review found no actionable blocking issues. Its static-review and specialist-tool limitations remain distinct from runtime validation.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to Matt Pocock Skills Reviewer completion: I accepted the two actionable suggestions from the associated review. Their implementation and validation are addressed separately in the diagnostic-matching and legacy-token inline threads.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to Test Quality Sentinel completion: No code change is needed because this status comment includes no concrete test-quality finding. I am not treating its no-op result as evidence that tests passed.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to Design Decision Gate completion: No additional design change or ADR is warranted by this comment, which contains no concrete design objection or ADR draft. The existing local-only generation boundary and separate publication authority remain unchanged.

Copilot AI 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.

🟡 Changes recommended

Repository-configured Git programs can still execute with the handler’s environment despite transport denial, leaving a critical security gap alongside failing test expectations and baseline-handling regressions.

2 open issues
What changed in this PR

This PR hardens gh-aw’s safe-output patch and bundle generation against repository-controlled Git remote helpers, addressing GHSA-4fwp-8v7m-jhhr through local-only artifact generation.

Changes:

  • Applies offline Git guards throughout generation and inspection, and removes generation-token forwarding.
  • Rejects missing incremental baselines and adds checkout-provisioning guidance for unavailable refs and objects.
  • Adds offline regression coverage, threat-specification contracts, and a bounded TLA+ generation model. TLC verification is not claimed.
File Description
specs/​workflow-security/​SafeOutputGeneration.tla Models local-only generation, failures, and fault controls.
specs/​workflow-security/​SafeOutputGeneration.cfg Configures generation-model safety invariants.
specs/​workflow-security/​check_transport.py Adds generation profiles and model selection.
specs/​compiler-threat-detection-spec.md Defines the runtime generation-security contracts.
specs/​compiler-threat-detection-changelog.md Records specification version 1.0.80.
docs/​src/​content/​docs/​reference/​checkout.md Documents required checkout preparation.
actions/​setup/​js/​safe_outputs_handlers.cjs Uses offline Git inspection and stops forwarding generation tokens.
actions/​setup/​js/​git_patch_utils.test.cjs Updates partial-clone diagnostic expectations.
actions/​setup/​js/​git_patch_utils.cjs Makes utility Git calls offline and revises diagnostics.
actions/​setup/​js/​git_patch_integration.test.cjs Updates integration coverage for local-only baselines.
actions/​setup/​js/​git_helpers.cjs Adds a local-only execution wrapper and removes tracking-ref fetching.
actions/​setup/​js/​git_artifact_offline.test.cjs Adds remote-helper and missing-object regressions.
actions/​setup/​js/​generate_git_patch.test.cjs Updates filtered-generation failure mocking.
actions/​setup/​js/​generate_git_patch.cjs Removes fetching and adds fail-closed generation errors.
actions/​setup/​js/​generate_git_bundle.cjs Applies offline generation and preserves resolved-base failures.

Review effort: Max (auto)

Comment thread actions/setup/js/git_helpers.cjs Resolved
Preserve upstream specification 1.0.80 and advance generation specification to 1.0.81.

Validation: build and all 353 workflow compilations passed. Final gate encountered unchanged upstream custom-linter findings in pkg/parser/frontmatter_hash.go and macOS executable-path test failures in pkg/fileutil; 726 impacted JavaScript tests passed.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use command-local program guards and index-only filtered bundle synthesis. Update generation model runner test coverage and document the separate configured-program boundary.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): No code change is requested by this completion status. I am not treating reported_no_action as proof of validation or publication readiness.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): Acknowledged the code quality review completion. This status contains no actionable finding and does not establish runtime validation.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): The two actionable inline suggestions were addressed separately in commit 0ba7c3f. This completion notice does not require another code change.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): No code change is requested by this test analysis status. I am not treating reported_no_action as evidence that tests passed.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): This completion status contains no concrete design objection or ADR request, so no additional change is warranted from this notice. It does not establish formal TLC validation or publication readiness.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): Agreed; this completion notice does not require a code change. Its reported_no_action outcome remains separate from validation and publication evidence.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): Acknowledged; this follow-up requests no additional code change. Static-review outcomes and specialist-tool limitations remain distinct from runtime validation.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): The diagnostic-matching and legacy-token suggestions were addressed separately in commit 0ba7c3f. This follow-up requires no additional change and does not establish a complete security fix.

@pelikhan

pelikhan commented Nov 1, 2026

Copy link
Copy Markdown
Collaborator Author

Reply to #73672 (comment): Agreed; this status contains no concrete test finding to address. Passing tests must be established by test results, not the no-op outcome.

Copilot AI commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@copilot run pr-finisher skill

Ran pr-finisher at 7c58248d. PR is open, non-draft, and mergeable. make fmt, make lint, impacted Go tests, and 1,061 selected JS tests passed; the progress gate fails on existing custom Go-linter diagnostics. Inspected both historical CJS failures and confirmed their 70 targeted tests now pass. One review thread remains unresolved (additional-root deletion scope); left unchanged because it was supplied as context-only feedback. No edits, commits, merge, or workflow dispatch. Not ready for merge until the review and lint blockers are addressed; skipped/PARTIAL smoke checks remain unverified.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

PR Finisher

  • Addressed the GH_AW_RECOVERY_ADDITIONAL_ROOTS review finding: additional roots are now passed as an argument in the compiler-generated step script (main({ additionalRoots: [...], core })). The validator no longer reads them from process.env, so GITHUB_ENV writes cannot redirect deletion. Added a regression test, updated the Go test and WASM goldens.
  • Local validation: go test ./pkg/workflow (recovery envelope and WASM golden tests) passes. Vitest and Prettier could not run because the npm registry failed with a certificate error. Only node --check was run on the changed JS.
  • Remaining: maintainer needs to re-trigger CI and resolve the review thread after the push is published.

Sous-chef head: 7c58248
Sous-chef state: fabadfcab6d7b085136d6ea3b250517db1bb5d28f130f64e3b1069f8a9daaf41

Generated by 🏁 PR Finisher · copilot · auto · ~25 AIC · ⊞ 10.3K · ◷

@pelikhan

pelikhan commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts on this branch.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Resolved and pushed in merge commit 8576722550, merging main f4c1bff385. Preserved both specification contracts, removed version collisions, and regenerated workflow locks. All 355 workflows compiled; impacted Go tests, 1,061 selected JS tests, and 293 incoming-change tests passed. The final gate retains the same 176 pre-merge custom-lint diagnostics; CodeQL timed out. No conflicts remain locally; GitHub reports blocked rather than conflicting. CI on the new HEAD remains unverified.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

PR Finisher

  • Addressed the security-review concern: GH_AW_RECOVERY_ADDITIONAL_ROOTS entries in validate_recovery_envelopes.cjs are now resolved with fs.realpathSync and must sit under a trusted base (scan roots, RUNNER_TEMP, GITHUB_WORKSPACE, cwd, /tmp/gh-aw), otherwise the step throws. Added a regression test for outside and symlink-escape roots.
  • Local validation: manual check confirmed outside and symlink-escaped roots are rejected; prettier passes; go test ./pkg/workflow -run Recovery|ObjectPack passes. The vitest suite could not run locally because the npm registry certificate failed, so the new test is unverified.
  • No failing checks were visible in the status rollup, so I could not inspect impacted-go-tests logs.
  • Remaining: CI is stale after this push and needs a maintainer re-trigger. Review threads were not resolved in this pass, since the fix is unpublished.

Sous-chef head: 8576722
Sous-chef work: PR_FINISHER_WORK_SUMMARY
Sous-chef state: finisher-ran

Generated by 🏁 PR Finisher · copilot · auto · ~35 AIC · ⊞ 10.3K · ◷

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Warning

threat detection engine error
The threat detection engine encountered an error and could not complete analysis. This is a tooling failure, not a security finding.

What happened

The threat detection engine failed to produce results.

Review the workflow run logs for details.

PR Finisher

  • Fixed the path-traversal review: GH_AW_RECOVERY_ADDITIONAL_ROOTS entries are now canonicalized (realpath) and must lie within the trusted roots or GITHUB_WORKSPACE; otherwise the step throws before any scan/unlink. Only validated roots are scanned. Added a regression test.
  • Local validation: manual node check of accept/reject paths, go test ./pkg/workflow -run Recovery passed. Vitest/Prettier could not run (npm registry certificate error), so make agent-report-progress did not complete.
  • Not addressed: the impacted-go-tests failure (could not read logs/reproduce here). PR was already up to date with main.
  • Remaining: CI is stale after push and needs a maintainer re-trigger; the review thread should be resolved after the fix is published.

Generated by 🏁 PR Finisher · copilot · auto · ~22 AIC · ⊞ 10.3K · ◷

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Commit pushed: 30d3963

Generated by PR Finisher · copilot · auto · ~17 AIC · ⌖ ~1 AIC · ⊞ 10.5K

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Finisher

  • Staged for publication: validate_recovery_envelopes.cjs now rejects GH_AW_RECOVERY_ADDITIONAL_ROOTS entries that are not absolute paths or that resolve to the filesystem root, plus a test. These roots are compiler-emitted and may legitimately be outside the primary roots (memory mounts), so a strict base-prefix check was not applied. The security thread is left open pending publication and maintainer judgement.
  • Not validated: JS dependencies could not be installed (no network), so vitest and make agent-report-progress did not run; only a syntax check passed.
  • Not done: merge-main failed (promisor fetch needs network). The impacted-go-tests failure was not investigated.
  • CI is stale after a push and needs a maintainer re-trigger.

Generated by 🏁 PR Finisher · copilot · auto · ~17 AIC · ⌖ ~1 AIC · ⊞ 10.5K · ◷

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Commit pushed: d86e541

Generated by PR Finisher · copilot · auto · ~31 AIC · ⌖ ~1 AIC · ⊞ 10.5K

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Finisher

Addressed the security review thread on GH_AW_RECOVERY_ADDITIONAL_ROOTS in validate_recovery_envelopes.cjs: additional roots are now canonicalized with realpath (symlinks resolved) and must be inside the primary roots, RUNNER_TEMP or GITHUB_WORKSPACE; otherwise the step throws. Added a regression test (outside path and symlink escape). Submitted for publication, not confirmed pushed. The review reply/resolve is deferred until publication.

Validation: a Node smoke test of the new logic passed. vitest and make agent-report-progress could not run (npm registry certificate failure), so the new test is unexecuted.

Remaining: git merge origin/main failed (missing history and no credentials), so the branch was not updated against main. CI needs a maintainer re-trigger after publication.

PR_FINISHER_WORK_SUMMARY was provided, but I am not echoing its markers: the pass had validation and infrastructure failures.

Generated by 🏁 PR Finisher · copilot · auto · ~31 AIC · ⌖ ~1 AIC · ⊞ 10.5K · ◷

@pelikhan

pelikhan commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot fix ci failures

@gh-aw-bot

Copy link
Copy Markdown
Collaborator

PR finisher dispatch requested for the following outstanding work:

  1. Update this branch with the latest main using make merge-main, resolving any conflicts and preserving the intended changes.
  2. Review (actions/setup/js/validate_recovery_envelopes.cjs:94): Excessive agency risk: actions/setup/js/validate_recovery_envelopes.cjs reads GH_AW_RECOVERY_ADDITIONAL_ROOTS from process.env and then path.resolve() + recursively scans those roots, calling fs.unlinkSync() on any *.bundle deemed invalid. Because GH_AW_RECOVERY_ADDITIONAL_ROOTS is an environment variable, a prompt-injected agent step could set it via $GITHUB_ENV to point at arbitrary directories (including via symlinked directories under the default scan roots), causing this trusted post-redaction step to traverse and delete files beyond the intended safe-output artifact roots without an independent allowlist/prefix check.

General fix: treat env-provided roots as untrusted input and constrain them to approved base directories before scanning.

Best fix here without changing core functionality: In actions/setup/js/validate_recovery_envelopes.cjs, compute canonical absolute base roots from the trusted roots argument, then accept GH_AW_RECOVERY_ADDITIONAL_ROOTS entries only if their canonical real path is equal to or under one of those trusted roots. Reject (throw) on invalid/non-string entries (already present) and on disallowed roots. Then scan only trusted defaults plus validated additional roots. - #73672 (comment)

  1. Fix failing check impacted-go-tests (FAILURE): https://github.com/github/gh-aw/actions/runs/41517735555/job/125529082568.
  2. Fix failing check lint-js (FAILURE): https://github.com/github/gh-aw/actions/runs/41517735656/job/125529059148.

The dedicated pr-finisher workflow will apply the necessary fixes, reply to each listed review thread and resolve it when addressed. Ignore feedback already answered or resolved; stop when only human review or CI remains. Do not trigger CI.

Sous-chef head: d86e541
Sous-chef work:
Sous-chef state: 92aee8662a015dfb6e298cb69a9d85af34a218deb24f1c38d3c6bc99b4680562

Generated by 👨🍳 PR Sous Chef · pi · haiku45 · ~12 AIC · ⌖ ~8 AIC · ⊞ 1.2K · ◷
Comment /souschef to run again

Copilot AI and others added 2 commits November 2, 2026 21:13
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@copilot fix ci failures

Fixed and pushed in 563ffc19 and fb3655df. CJS formatting now passes, with formatter-compatible type narrowing. The CGO regression now checks assignment credentials against eslint-monster and verifies issue-monster dispatch requires no custom token. Typecheck, repository-wide CJS formatting, standard lint, impacted Go tests, and 1,064 selected JS tests passed. The final gate still reports the same 176 pre-existing custom Go-lint diagnostics, with no new findings. CI must rerun on the new HEAD to confirm; no workflow was triggered.

@pelikhan

pelikhan commented Nov 2, 2026

Copy link
Copy Markdown
Collaborator Author

@copilot resolve the merge conflicts on this branch.

@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

PR Finisher: no changes submitted

The PR conflicts with main, but the local merge failed. Git needed to lazily fetch a missing object from the promisor remote, and no git credentials are available in this run. I made no code changes.

Hand-off:

  • A maintainer needs to merge main into the branch, or re-run with a complete checkout.
  • Several unresolved Copilot review comments are still open (filter or driver race, bundle error messages, shallow-boundary handling, local base-ref lookup, and the input passed to the git config probe). I did not start on them, because they should be addressed on the merged tree.

No validation was run.

Generated by 🏁 PR Finisher · copilot · auto · ~16 AIC · ⌖ ~1 AIC · ⊞ 10.5K · ◷

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>

Copilot AI commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts on this branch.

Resolved and pushed in merge commit 39493c47a2, bringing in main at 8e5dee1062 with both parents preserved. Regenerated the three conflicting workflow locks rather than choosing either side; prior hardening and CI fixes remain intact.

Validation: all 355 workflows recompiled; four changed workflow sources passed compilation validation. Build, standard Go lint, JavaScript lint, schema checks, impacted Go tests, and secret scanning passed. Incoming JavaScript suites: 1,997 passed, three skipped; PR-finisher tests: 81 passed.

The full gate is not green: custom Go lint reports the exact same 176 pre-merge diagnostics, and two impacted JavaScript fixtures timed out (1,062 others passed). Both timed-out cases passed isolated reruns with unchanged timeouts. Security analysis timed out without a verdict. Final working tree is clean; the PR itself was not merged.

Pin the additional-root list on every validation step, including an empty list, and pass it explicitly rather than trusting inherited job environment. Reject roots and symlink traversals outside the canonical artifact boundary. Keep experimental drive-memory mounts unsupported and fail closed instead of authorizing unredacted external packs.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch had an error being deployed

1 failed (outdated) deployment
aoai-model — 8da17b97 Deployed Nov 2, 2026 by github-actions[bot] via conclusion #260
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants