T09 · Insecure Skill Coding Practices
- Location
SKILL.md:148- Finding
PowerShell Commands Disable Execution-Policy Enforcement
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 148-153
Vulnerability Type: PowerShell security-control bypass
Risk Level: MediumVulnerable snippet:
markdown ## Start ```powershell powershell -ExecutionPolicy Bypass -File scripts/webmail_monitor_cli.ps1 starttext The same `-ExecutionPolicy Bypass` pattern is also prescribed for status, logs, bootstrap, doctor, and stop operations at lines 22, 26-27, 54-55, 206, 212-215, and 225. ### Technical Analysis The documented invocation explicitly sets the PowerShell execution policy to `Bypass` for the new PowerShell process. This suppresses execution-policy warnings and policy-based script blocking within that process. Execution policy is not a complete security boundary, but disabling it removes a defense-in-depth control that could otherwise prevent or warn about running untrusted scripts. The risk is amplified because `scripts/webmail_monitor_cli.ps1` is not present in the audited package. Consequently, the actual script content, provenance checks, and safeguards cannot be verified. The supplied package cannot currently execute the command because the referenced script is absent. Exploitation therefore requires the script path to be populated or replaced before invocation. ### Attack Path 1. A user or agent follows the command prescribed by `SKILL.md`. 2. An attacker, compromised distribution source, or unsafe installation process places a malicious file at `scripts/webmail_monitor_cli.ps1`. 3. PowerShell starts with `-ExecutionPolicy Bypass`. 4. The substituted script executes without execution-policy prompts or blocking. 5. The script obtains the same filesystem, network, mailbox-session, and process privileges as the invoking user. ### Impact Assessment Successful exploitation permits arbitrary code execution in the invoking user's security context. Potential scope includes access to the user's files, Desktop artifacts, bro ...[truncated 308 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
-ExecutionPolicy Bypassfrom all documented commands. - Include the referenced PowerShell and Python scripts in the reviewed package.
- Digitally sign PowerShell scripts and use the host's configured execution policy.
- Verify the script's expected hash or signature before execution.
- Restrict write access to the skill and
scriptsdirectories so untrusted users cannot replace the launcher. - Resolve the script path from a trusted, canonical skill root rather than the caller's uncontrolled working directory.
- Run the monitor as an unprivileged user and avoid administrative execution.
- Remove
