T09 · Insecure Skill Coding Practices
- Location
SKILL.md:10- Finding
PowerShell Execution Policy Is Disabled for Referenced Automation Scripts
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:10-19;README.md:27-29, 48-58, 65-80
Vulnerability Type: Unsafe PowerShell execution configuration
Risk Level: MediumVulnerable Code Snippets
SKILL.md:10-19:powershell # Click the mouse powershell -ExecutionPolicy Bypass -File skills/win-control/scripts/mouse-click.ps1 -X 500 -Y 300 -ClickType Leftpowershell # Send text powershell -ExecutionPolicy Bypass -File skills/win-control/scripts/send-keys.ps1 -Text "Hello World" # Send shortcut keys powershell -ExecutionPolicy Bypass -File skills/win-control/scripts/send-keys.ps1 -Keys "CTRL+C,CTRL+V"README.md:27-29:powershell powershell -ExecutionPolicy Bypass -File "C:\Users\xl\.openclaw\workspace\skills\win-control\scripts\rpa-dingtalk-smart.ps1" ` -Recipient "韩文瀚" ` -Message "你好,我是通过 RPA 给你发的消息"README.md:48-58:powershell # Basic usage with default parameters powershell -ExecutionPolicy Bypass -File scripts/rpa-dingtalk-smart.ps1 # Custom recipient and message powershell -ExecutionPolicy Bypass -File scripts/rpa-dingtalk-smart.ps1 ` -Recipient "张三" ` -Message "下午 3 点开会" # Send a long message powershell -ExecutionPolicy Bypass -File scripts/rpa-dingtalk-smart.ps1 ` -Recipient "李四" ` -Message "关于明天会议的安排:1. 准备材料 2. 预定会议室 3. 通知参会人员"README.md:65-80:powershell # Click specified coordinates powershell -ExecutionPolicy Bypass -File scripts/mouse-click.ps1 -X 500 -Y 300 -ClickType Leftpowershell # Send text powershell -ExecutionPolicy Bypass -File scripts/send-keys.ps1 -Text "Hello World" # Send shortcut keys powershell -ExecutionPolicy Bypass -File scripts/send-keys.ps1 -Keys "CTRL+C,CTRL+V,ENTER"powershell # Test mouse movement powershell -ExecutionPolicy Bypass -File scripts/test-control.ps1 -TestMouse # Test keyboard input powershell -ExecutionPolicy Bypass -File sc ...[truncated 3107 chars]- Remediation
View remediation
Remediation Suggestions
- Remove
-ExecutionPolicy Bypassfrom every documented invocation. - Package all referenced scripts so their implementation can be reviewed together with the documentation.
- Digitally sign released PowerShell scripts and use an appropriate policy such as
AllSignedorRemoteSigned. - If a process-scoped override is operationally unavoidable, use the least permissive setting that works, document why it is required, and do not default to
Bypass. - Use canonical, resolved paths rooted in a trusted installation directory rather than paths dependent on the current working directory.
- Before execution, verify each script against a publisher signature or a cryptographic hash distributed through a trusted channel.
- Restrict write permissions on the installation and scripts directories so untrusted users and processes cannot replace script files.
- Run the automation as a non-administrative account with only the permissions required for UI automation.
- Add an explicit confirmation step before sensitive UI actions, particularly sending messages or issuing keyboard shortcuts to the active window.
- Replace user-specific paths, usernames, personal recipient names, and personal message examples with neutral placeholders.
- Remove
