Repository navigation
fix: close the WinRM execution gaps from the 2026-08-20 windows-dev audit - #112
Merged
Merged
Conversation
Two cases from the 2026-08-20 windows-dev live audit where the string we
execute was not the pipeline the validator approved:
- Comma-lists mixing identifiers with a hashtable (Select-Object -Property
Name, Id, @{...}) were single-quoted as one token, so PowerShell received
a single string property name and returned a literal-named empty column
with exit 0. Split at top-level commas and quote per element.
- Bare curl resolves to PowerShell 5.1's Invoke-WebRequest alias, whose
flags are incompatible with the validated curl manifest. Rewrite validated
curl pipelines to curl.exe (in System32 since Server 2016 / Win10 1803).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…sally curl.exe mirrors curl.yaml's GET-only policy (with allows_flag_bundling, since it is a native binary, not a cmdlet) so the explicit Windows spelling validates alongside the alias-bypassed bare curl. jcmd/jmap/jstat lose their shell: bash marking: the CLIs are identical on Windows and the WinRM hint already advertised them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… WinRM hint The 2026-08-05 and 2026-08-20 incidents were both hint-inventory lies: agents treat omitted tools as unavailable and never attempt them. Name Test-NetConnection and curl explicitly, and tell the agent that a 'not recognized' error is an installation gap to report, never a policy block to assume. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Every other test stops at string reconstruction, which is how both the curl alias bug and the comma-list quoting bug shipped: exit-code-clean failures that only a real Windows host exposes. Gated on SHELLGUARD_E2E_WINRM_* so CI is unaffected. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
govulncheck flags GO-2026-6218 (net/url), GO-2026-6090 (crypto/tls), GO-2026-6088 (encoding/xml), and GO-2026-5972 (encoding/asn1) as reachable from pre-existing code paths; all are fixed in go1.25.13. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
A live capability audit against a real Windows Server 2025 host (via the new
env-gated e2e suite's methodology) found two cases where the command shellguard
executes over WinRM is not the pipeline the validator approved, plus stale
capability hints.
Fixes
Select-Object -Property Name, Id, @{N='MB';E={...}}reconstructed as-Property 'Name,Id,@{...}'—a single string property name — returning a literal-named empty column with
exit 0. Reconstruction now splits mixed comma-lists at top-level commas and
quotes per element.
curl -k -m 10died at runtime on PS 5.1's alias (denied cmdlet, incompatible flags),
leaving Windows hosts with no working HTTP-level check. Validated
curlpipelines now execute as
curl.exe, and a powershell-scopedcurl.exe.yaml(GET-only, mirroringcurl.yaml) admits the explicitspelling.
winrmConnectHintnow advertisesTest-NetConnectionand
curl, and instructs agents to attempt tools and report "notrecognized" as an installation gap instead of assuming policy blocks —
the self-censorship failure mode behind both the 2026-08-05 and 2026-08-20
incidents.
shell: bashwhile the hintadvertised them on WinRM; their CLIs are identical on Windows, so they are
now universal like jps/jstack.
Tests
TestLiveWinRMe2e suite (gated onSHELLGUARD_E2E_WINRM_*) runningparse → validate → reconstruct → execute against a real host, with output
assertions strong enough to catch exit-0 failures.
🤖 Generated with Claude Code