* AST-only check: Detects stop-parsing token (--%) which prevents further parsing.
( parsed: ParsedPowerShellCommand, )
| 759 | * AST-only check: Detects stop-parsing token (--%) which prevents further parsing. |
| 760 | */ |
| 761 | function checkStopParsing( |
| 762 | parsed: ParsedPowerShellCommand, |
| 763 | ): PowerShellSecurityResult { |
| 764 | if (deriveSecurityFlags(parsed).hasStopParsing) { |
| 765 | return { |
| 766 | behavior: 'ask', |
| 767 | message: 'Command uses stop-parsing token (--%)', |
| 768 | } |
| 769 | } |
| 770 | return { behavior: 'passthrough' } |
| 771 | } |
| 772 | |
| 773 | /** |
| 774 | * AST-only check: Detects .NET method invocations which can access system APIs. |
nothing calls this directly
no test coverage detected