Skip to content

Add safe Invoke-Expression command-string recursion - #67

Merged
Aaronontheweb merged 5 commits into
devfrom
feature/63-invoke-expression-recursion
Aug 4, 2026
Merged

Add safe Invoke-Expression command-string recursion#67
Aaronontheweb merged 5 commits into
devfrom
feature/63-invoke-expression-recursion

Conversation

@Aaronontheweb

Copy link
Copy Markdown
Owner

Summary

  • recurse into provably static Invoke-Expression and iex payloads so security consumers see the inner clauses
  • safe-fail dynamic, interpolated, pipeline-fed, ambiguous, escaped, and unsupported invocation shapes without changing the public API
  • preserve current-scope PowerShell location semantics and share the existing input-size and recursion-depth limits
  • expand the PowerShell corpus to 262 cases, including adversarial escape, Unicode, module-qualification, and cwd-attribution variants

Validation

  • dotnet build -c Release
  • dotnet test -c Release (929 passed)
  • dotnet pack -c Release -o ./bin/nuget
  • pwsh ./scripts/Add-FileHeaders.ps1 -Verify
  • openspec validate recurse-static-invoke-expression
  • real PowerShell oracle and PII audit
  • two independent adversarial reviews with no remaining actionable findings

Closes #63

@Aaronontheweb Aaronontheweb left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb
Aaronontheweb merged commit 71f3803 into dev Aug 4, 2026
2 checks passed
@Aaronontheweb
Aaronontheweb deleted the feature/63-invoke-expression-recursion branch August 4, 2026 21:22
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.

Add PowerShell Invoke-Expression parity with Bash command-string recursion

1 participant