MCPcopy Index your code
hub / github.com/codeaashu/claude-code / checkStopParsing

Function checkStopParsing

src/tools/PowerShellTool/powershellSecurity.ts:761–771  ·  view source on GitHub ↗

* AST-only check: Detects stop-parsing token (--%) which prevents further parsing.

(
  parsed: ParsedPowerShellCommand,
)

Source from the content-addressed store, hash-verified

759 * AST-only check: Detects stop-parsing token (--%) which prevents further parsing.
760 */
761function 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.

Callers

nothing calls this directly

Calls 1

deriveSecurityFlagsFunction · 0.85

Tested by

no test coverage detected