Skip to content

Prove PowerShell script block data safely - #128

Merged
Aaronontheweb merged 1 commit into
devfrom
feature/v03-pwsh-proved-scriptblock-data
Aug 9, 2026
Merged

Prove PowerShell script block data safely#128
Aaronontheweb merged 1 commit into
devfrom
feature/v03-pwsh-proved-scriptblock-data

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Owner

Summary

  • keep script blocks opaque only when a constrained PowerShell baseline and bounded command-resolution state prove the receiver consumes data
  • retain unknown execution regions for default state, exact module-qualified-looking aliases, and canonical alias-target mutation
  • preserve unrelated-name precision and fresh child-runspace reset semantics
  • promote proved data, unknown receiver, local Invoke-Command, and both alias-shadowing attacks into the generated live-pwsh corpus
  • correct the OpenSpec, PowerShell spec, design corpus, task ledger, and implementation plan

Security boundary

PowerShell permits aliases named Microsoft.PowerShell.Utility\Write-Output, and echo resolves through canonical Write-Output. Both can execute a script block after mutation. The analyzer now matches exact mutations against authored and canonical identities before removing speculative execution regions. Unknown or unbounded state remains visible and incomplete.

Verification

  • adversarial review: PASS after two reproduced shadowing blockers were fixed
  • dotnet build -c Release --no-restore
  • dotnet test -c Release --no-restore (2575 passed)
  • focused parser/catalog/corpus/live-pwsh/PII suite (985 passed; reviewer independently ran 1069)
  • pwsh ./scripts/Add-FileHeaders.ps1 -Verify
  • openspec validate v0-3-structured-shell-analysis --strict
  • slopwatch analyze -d . --no-baseline --fail-on warning (0 findings)
  • generated PowerShell corpus round-trip (422 entries, exact directory diff)

@Aaronontheweb
Aaronontheweb enabled auto-merge August 9, 2026 09:07
@Aaronontheweb
Aaronontheweb merged commit 0b7735b into dev Aug 9, 2026
2 checks passed
@Aaronontheweb
Aaronontheweb deleted the feature/v03-pwsh-proved-scriptblock-data branch August 9, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant