Repository navigation
Harden Windows WSL runtime setup - #76731
Conversation
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Triage
|
|
🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅
|
|
✅ Ponytail Reviewer completed successfully! Ponytail ReviewerOutcome: 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.
|
|
✅ 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: 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.
|
|
✅ PR Specification Reviewer completed successfully! PR Specification ReviewerOutcome: 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.
|
|
✅ Test Quality Sentinel completed test quality analysis. Test Quality SentinelOutcome: 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.
|
|
✅ PR Code Quality Reviewer completed the code quality review.
|
Comment MemoryPeek at saved memory (pr-code-quality-reviewer)Note This comment is managed by comment memory.Expand the saved memory block to view or edit the persistent context for this thread.
|
There was a problem hiding this comment.
Found one non-blocking test-coverage issue: the signature-verification test does not assert verification ordering or that the verified manifest is the one checked. Inline comment posted. The implementation otherwise looks reasonable based on static review; no tests/builds were run per review constraints.
🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt50 · ~2 AIC · ⌖ ~1 AIC · ⊞ 1.6K
Comment /review to run again
There was a problem hiding this comment.
Skills-Based Review 🧠
Applied /diagnosing-bugs and /tdd to this bug_fix hardening change. No blocking defects found, but the Node.js keyring pin needs confirmation before merge.
📋 Key Themes & Highlights
Verified
- ✅
TestRenderStepForRunnerpasses at PR head. - ✅
gpgvaccepts a genuine clearsignedSHASUMS256.txt.ascand rejects both a tampered manifest and a wrong-key manifest. - ✅ Recompiling
windows.mdand the three reviewer workflows from PR head reproduces the committed lock files exactly. - ✅ The WSLENV guard runs before
$env:WSLENVis set, so an oversized environment fails cleanly.
Open Items
- Keyring pin: the commit SHA is unconfirmed (see inline comment on
windows_runner.go). - Test strength: the new assertions do not enforce ordering (see inline comment on
jobs_test.go).
@copilot please address the review comments above.
🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · routed: haiku55 xhigh · ~9 AIC · ⌖ ~2 AIC · ⊞ 6.6K
Comment /matt to run again
| $ErrorActionPreference = 'Stop' | ||
| $env:WSLENV = 'RUNNER_TEMP/p:GH_AW_WSL_NODE_VERSION' | ||
| & wsl.exe --distribution Ubuntu --user root --exec bash -lc 'set -euo pipefail; version="${GH_AW_WSL_NODE_VERSION#v}"; if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Invalid WSL Node.js version." >&2; exit 1; fi; archive="node-v${version}-linux-x64.tar.xz"; staging="$(mktemp -d)"; trap ''rm -rf "$staging"'' EXIT; curl -fsSL "https://nodejs.org/dist/v${version}/$archive" -o "$staging/$archive"; curl -fsSL "https://nodejs.org/dist/v${version}/SHASUMS256.txt" -o "$staging/SHASUMS256.txt"; cd "$staging"; grep -F " $archive" SHASUMS256.txt | sha256sum -c -; install_dir="/usr/local/lib/nodejs/node-v${version}-linux-x64"; mkdir -p "$install_dir"; tar -xJf "$archive" -C "$install_dir" --strip-components=1; ln -sfn "$install_dir" /usr/local/lib/nodejs/current; ln -sfn "$install_dir/bin/node" /usr/local/bin/node; ln -sfn "$install_dir/bin/npm" /usr/local/bin/npm; ln -sfn "$install_dir/bin/npx" /usr/local/bin/npx' | ||
| & wsl.exe --distribution Ubuntu --user root --exec bash -lc 'set -euo pipefail; version="${GH_AW_WSL_NODE_VERSION#v}"; if ! [[ "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then echo "Invalid WSL Node.js version." >&2; exit 1; fi; archive="node-v${version}-linux-x64.tar.xz"; staging="$(mktemp -d)"; trap ''rm -rf "$staging"'' EXIT; curl -fsSL "https://nodejs.org/dist/v${version}/$archive" -o "$staging/$archive"; curl -fsSL "https://nodejs.org/dist/v${version}/SHASUMS256.txt.asc" -o "$staging/SHASUMS256.txt.asc"; curl -fsSL "https://raw.githubusercontent.com/nodejs/release-keys/481637f813e912c4aa3622d7964ab426c97b8e8d/gpg-only-active-keys/pubring.kbx" -o "$staging/nodejs-release-keyring.kbx"; gpgv --keyring "$staging/nodejs-release-keyring.kbx" --output "$staging/SHASUMS256.txt" "$staging/SHASUMS256.txt.asc"; cd "$staging"; grep -F " $archive" SHASUMS256.txt | sha256sum -c -; install_dir="/usr/local/lib/nodejs/node-v${version}-linux-x64"; mkdir -p "$install_dir"; tar -xJf "$archive" -C "$install_dir" --strip-components=1; ln -sfn "$install_dir" /usr/local/lib/nodejs/current; ln -sfn "$install_dir/bin/node" /usr/local/bin/node; ln -sfn "$install_dir/bin/npm" /usr/local/bin/npm; ln -sfn "$install_dir/bin/npx" /usr/local/bin/npx' |
There was a problem hiding this comment.
[/diagnosing-bugs] The Node.js signature check relies on a keyring pinned to commit 481637f8.... I could not confirm that commit from the review sandbox, so please verify it exists and contains gpg-only-active-keys/pubring.kbx. Because the pin is a fixed snapshot, a Node release signed by a key added later will fail gpgv and break every WSL run.
💡 Suggested follow-up
Confirm the SHA with git ls-remote or the GitHub API. Add a short note on how to bump the pin when Node rotates release keys. Also confirm that every pinned Node version publishes SHASUMS256.txt.asc, since older releases may not.
@copilot please address this.
There was a problem hiding this comment.
Verified the pinned nodejs/release-keys commit and confirmed its README documents gpg/pubring.kbx as the full keyring, including retired signers. Updated the pin’s keyring path, documented how to update the pin, and confirmed the workflow’s Node 24 release publishes SHASUMS256.txt.asc in commit 8592602.
There was a problem hiding this comment.
🟡 Changes recommended
The keyring excludes retired signers, causing valid Node.js releases to fail signature verification, and the WSLENV guard misses the 32,767-character rejection boundary.
2 open issues
What changed in this PR
Hardens the WSL runtime emitted by the gh-aw compiler for Windows jobs, focusing on Node.js download verification and environment forwarding.
Changes:
- Verify Node.js checksum manifests with
gpgvand a pinned release-keyring revision. - Add a
WSLENVlength guard and update rendering assertions. - Regenerate Windows workflow output and clarify allowed review events in generated tool descriptions.
| File | Description |
|---|---|
pkg/workflow/windows_runner.go |
Adds signed-manifest verification and the environment-forwarding size guard. |
pkg/workflow/jobs_test.go |
Updates assertions for bootstrap dependencies, verification, and the length guard. |
.github/workflows/windows.lock.yml |
Incorporates the runtime changes into generated Windows jobs. |
.github/workflows/pr-specification-reviewer.lock.yml |
Clarifies that review events allow COMMENT and REQUEST_CHANGES. |
.github/workflows/pr-code-quality-reviewer.lock.yml |
Clarifies that review events allow COMMENT and REQUEST_CHANGES. |
.github/workflows/ponytail-reviewer.lock.yml |
Clarifies that review events allow only COMMENT. |
Review effort: Max (auto)
| "$environmentNames = $allowedEnvironmentVariables | Where-Object { $processEnvironment.Contains($_) }", | ||
| "$env:WSLENV = (($environmentNames | ForEach-Object { $value = [string]$processEnvironment[$_]; if ($pathVariableSet.Contains($_) -or $value -match '^(?:[A-Za-z]:[\\\\/]|\\\\\\\\)') { \"$_/p\" } else { $_ } }) -join ':')", | ||
| "$wslEnvironment = (($environmentNames | ForEach-Object { $value = [string]$processEnvironment[$_]; if ($pathVariableSet.Contains($_) -or $value -match '^(?:[A-Za-z]:[\\\\/]|\\\\\\\\)') { \"$_/p\" } else { $_ } }) -join ':')", | ||
| "if ($wslEnvironment.Length -gt 32767) { throw 'The Windows job environment exceeds the WSL forwarding limit.' }; $env:WSLENV = $wslEnvironment", |
|
🍳 A little prep to help this PR along! Copilot assignment requested for the following outstanding work:
Keeping the changes focused; human review and CI get the final taste test. No merging or CI triggering. Structured data{
"completed_task": 0,
"head": "106d2670871812f36237c286a837f9c2c0018f0a",
"kind": "requested",
"schema_version": "1",
"state": "8a1216d11d5aba37e749357b1bd659a55ad3e31328c29b72a0213a97fcac36d2",
"work": [
"4ce4dd407e604d374ecd66edfd2afc18c54e2d0b3733dbac37ac8e9c8834fdba",
"c6dfd69dc587fcdaa765021d16c2068a7ad3d8fa21f29d23378f81df5498bace",
"dada2857b8e0436fccf7b0dd6544846b7b32161a52a9298b1dce1fb460f4a35d",
"f1d8a22648c2a1dbf50a83879c785396b5e2501e7a76a1800b90d52310141450"
],
"workflow": "pr-sous-chef"
}
|
…ntelligence-wsl-jobs Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
|
Category: bug | Risk: medium | Score: 71/100 (impact 38 + urgency 18 + quality 15). Recommended action: batch_review. Batch: pr-batch:copilot-platform. Reason: platform hardening is valuable and targeted, but it is best reviewed with adjacent pipeline fixes.
|
|
🎉 This pull request is included in a new release. Release: |


Windows jobs now bootstrap Node.js inside WSL and forward selected job environment variables. The bootstrap previously fetched the Node.js checksum list alongside the archive and did not guard against oversized
WSLENVvalues.gpgvand a pinned Node.js release-keyring revision before checking the archive.WSLENVexceeds 32,767 characters./home/runner/work/gh-aw/gh-aw/.github/workflows/windows.lock.yml.