Finding
Step handlers can be ScriptBlocks that are executed by the engine. The step registry may be supplied via Providers.StepRegistry without explicit trust validation. If an untrusted source can influence the registry, this becomes an RCE vector.
Goal
Make the engine safe by default:
- Step handlers MUST NOT be ScriptBlocks unless explicitly allowed (dev/test scenario).
Proposed approach
- Update step handler resolution logic to accept only:
string (function name / command name)
- optionally
CommandInfo (if desired)
- Reject
ScriptBlock handlers unless an explicit trust policy/flag allows it, e.g.:
ExecutionContext.Policy.AllowScriptBlockHandlers = $true
- or
Invoke-IdlePlan -AllowScriptBlockHandlers (exact API tbd)
Acceptance criteria
Documentation
Finding
Step handlers can be ScriptBlocks that are executed by the engine. The step registry may be supplied via
Providers.StepRegistrywithout explicit trust validation. If an untrusted source can influence the registry, this becomes an RCE vector.Goal
Make the engine safe by default:
Proposed approach
string(function name / command name)CommandInfo(if desired)ScriptBlockhandlers unless an explicit trust policy/flag allows it, e.g.:ExecutionContext.Policy.AllowScriptBlockHandlers = $trueInvoke-IdlePlan -AllowScriptBlockHandlers(exact API tbd)Acceptance criteria
Documentation
Providers.StepRegistryis host-provided and must be trusted.