( parsed: ParsedPowerShellCommand, )
| 1014 | ]) |
| 1015 | |
| 1016 | function checkWmiProcessSpawn( |
| 1017 | parsed: ParsedPowerShellCommand, |
| 1018 | ): PowerShellSecurityResult { |
| 1019 | for (const cmd of getAllCommands(parsed)) { |
| 1020 | const lower = cmd.name.toLowerCase() |
| 1021 | if (WMI_SPAWN_CMDLETS.has(lower)) { |
| 1022 | return { |
| 1023 | behavior: 'ask', |
| 1024 | message: `${cmd.name} can spawn arbitrary processes via WMI/CIM (Win32_Process Create)`, |
| 1025 | } |
| 1026 | } |
| 1027 | } |
| 1028 | return { behavior: 'passthrough' } |
| 1029 | } |
| 1030 | |
| 1031 | /** |
| 1032 | * Main entry point for PowerShell security validation. |
nothing calls this directly
no test coverage detected