T09 · Insecure Skill Coding Practices
- Location
state_machine_final.py:72- Finding
Predictable Temporary Screenshot Files Expose Sensitive WeChat Content
- Content
View full analysis
bool: X, Y, W, H = get_wechat_bounds() RX = X + int(W * 0.48) RY = Y + int(H * 0.80) RW = int(W * 0.48) RH = int(H * 0.17) img = '/tmp/wechat-input-check-final.png' screenshot_region(img, RX, RY, RW, RH) texts = vision_texts(img) joined = ' | '.join(texts) print('INPUT_OCR:', joined) return expected[:8] in joined or expected[:6] in joined ``` From `state_machine_test.py`: ```python img = "/tmp/wechat-search-state-machine.png" subprocess.run(["/usr/sbin/screencapture", f"-R{RX},{RY},{RW},{RH}", img], check=True) ``` ```python def confirm_input_has_message(expected: str) -> bool: X, Y, W, H = get_wechat_bounds() RX = X + int(W * 0.48) RY = Y + int(H * 0.80) RW = int(W * 0.48) RH = int(H * 0 ...[truncated 2554 chars]- Remediation
View remediation
