T09 · Insecure Skill Coding Practices
- Location
bin/wecom_auto_add.py:189- Finding
Calibration workflow sends a real friend request to a hard-coded phone number
- Content
View full analysis
Vulnerability Details
File Location:
bin/wecom_auto_add.py:189-218
Vulnerability Type: Unsafe external side effect during setup
Risk Level: MediumVulnerable Code
python print("\nSTEP 7: Enter test phone number") test_phone = "18655104861" # 测试手机号 print(f"Entering test phone number: {test_phone}") pyautogui.write(test_phone) time.sleep(1) print("\nSTEP 8: Press Enter to search") print("The script will press Enter to search for the phone number") pyautogui.press('enter') time.sleep(3) # 等待搜索结果 print("\nSTEP 9: Position for '添加' button") print("Move mouse to the '添加' (Add) button in the search results") input("Press ENTER when mouse is over '添加' button...") add_button_pos = pyautogui.position() print(f"✓ Add button position recorded: {add_button_pos}") print("\nSTEP 10: Now click '添加'") pyautogui.click(add_button_pos) time.sleep(2) print("\nSTEP 11: Position for '发送' button") print("Move mouse to the '发送' (Send) button in the confirmation dialog") input("Press ENTER when mouse is over '发送' button...") send_button_pos = pyautogui.position() print(f"✓ Send button position recorded: {send_button_pos}") print("\nSTEP 12: Now click '发送'") pyautogui.click(send_button_pos) time.sleep(2)Technical Analysis
The documented setup procedure in
SKILL.md:50-55presents--setupas a coordinate-recording operation. The implementation, however, searches for a hard-coded phone number and clicks both the Add and Send controls. This causes an externally visible account action while the user reasonably expects a local calibration process.Although the terminal prompts describe individual clicks, the setup workflow does not clearly establish that the hard-coded number belongs to the user, identify its owner, or obtain explicit consent immediately before transmitting a real friend request. Coordinate calibration does not require submission of a live request, so this side ...[truncated 1327 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove all hard-coded real phone numbers from the calibration workflow.
- Record pointer positions without clicking controls that submit external actions.
- Use a screenshot, mock interface, or non-submitting UI state for calibration.
- If a live account is genuinely required, require the user to supply and verify a number they control.
- Display an explicit confirmation immediately before any friend request is sent, including the exact recipient and the fact that the action is externally visible.
- Provide a dry-run mode that records and validates coordinates without sending keyboard input or mouse clicks.
- Update
SKILL.mdto describe every externally visible side effect of setup.
