-
Notifications
You must be signed in to change notification settings - Fork 2
fix(powershell-format): refuse computed -FilePath on Invoke-Command and Start-Job #2466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -366,7 +366,8 @@ PSSA_OUTPUT=$(PSSA_FILE="$PSSA_FILE_ARG" PSSA_SETTINGS="$PSSA_SETTINGS_ARG" \ | |
| # forms need no name match: InvocationOperator identifies them, | ||
| # and their element 0 IS the target, so it is checked too. | ||
| $loaders = @("Import-Module", "ipmo", "Add-Type", "New-Module", | ||
| "Invoke-Expression", "iex", "Import-PowerShellDataFile") | ||
| "Invoke-Expression", "iex", "Import-PowerShellDataFile", | ||
| "Invoke-Command", "Start-Job") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Correctness: adding The loop that consumes For the loaders added before this PR ( Invoke-Command -ComputerName $server -ScriptBlock { ... } -ArgumentList $value
Start-Job -ScriptBlock { ... } -ArgumentList $valueHere Since this hook's opt-in trust gate exists specifically so legitimate |
||
| $cmdAsts = $fileAst.FindAll({ | ||
| param($n) $n -is [System.Management.Automation.Language.CommandAst] | ||
| }, $true) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.