* AST-only check: Detects subexpressions $() which can hide command execution.
( parsed: ParsedPowerShellCommand, )
| 712 | * AST-only check: Detects subexpressions $() which can hide command execution. |
| 713 | */ |
| 714 | function checkSubExpressions( |
| 715 | parsed: ParsedPowerShellCommand, |
| 716 | ): PowerShellSecurityResult { |
| 717 | if (deriveSecurityFlags(parsed).hasSubExpressions) { |
| 718 | return { |
| 719 | behavior: 'ask', |
| 720 | message: 'Command contains subexpressions $()', |
| 721 | } |
| 722 | } |
| 723 | return { behavior: 'passthrough' } |
| 724 | } |
| 725 | |
| 726 | /** |
| 727 | * AST-only check: Detects expandable strings (double-quoted) with embedded |
nothing calls this directly
no test coverage detected