Skip to content

fix(security): remove Invoke-Expression in external-review-pack (#1192)#1252

Merged
FabioLeitao merged 1 commit into
mainfrom
fix/external-review-pack-iex-1192
Jul 15, 2026
Merged

fix(security): remove Invoke-Expression in external-review-pack (#1192)#1252
FabioLeitao merged 1 commit into
mainfrom
fix/external-review-pack-iex-1192

Conversation

@FabioLeitao

Copy link
Copy Markdown
Collaborator

Summary

  • Validate `-DateStamp` with `^\d{4}-\d{2}-\d{2}$` before building paths.
  • Replace string + `Invoke-Expression` with `& uv @argv` (no shell re-parse).
  • Pester: valid DateStamp regex, invalid/injection throws before `uv`.

Closes #1192

Test plan

  • `pwsh ./scripts/run-pester.ps1` (35 passed, including ExternalReviewPack)
  • `./scripts/check-all.sh --enforced`
  • CI green on PR

Made with Cursor

Validate -DateStamp as YYYY-MM-DD and invoke uv via an arg array so
operator DateStamp input cannot reach shell parsing.

Closes #1192
@FabioLeitao
FabioLeitao merged commit 14ad2bc into main Jul 15, 2026
16 checks passed
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.

[P1][security][scripts] replace Invoke-Expression in external-review-pack.ps1

1 participant