T09 · Insecure Skill Coding Practices
- Location
scripts/report_generator.py:211- Finding
Sensitive OCR Content and Window Metadata Are Transmitted to External AI Providers Without Redaction
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This screen-monitoring skill is purpose-aligned but needs Review because it captures and OCRs full-screen activity, stores sensitive history, and can send derived screen content to AI providers without strong consent, redaction, or scoping controls.
Install only if you intentionally want continuous screen monitoring. Review and narrow the app blacklist, consider disabling OCR, avoid cloud AI providers for sensitive work unless you accept sending window titles and OCR samples off-device, and check the ~/.screen-reviewer directory regularly because logs and reports can preserve sensitive content indefinitely.
scripts/report_generator.py:211Sensitive OCR Content and Window Metadata Are Transmitted to External AI Providers Without Redaction
scripts/capture_daemon.py:123Foreground-Application Blacklist Does Not Prevent Sensitive Content Elsewhere on the Screen from Being Captured
scripts/report_generator.py:48Untrusted OCR Text and Window Titles Are Sent to the Language Model Without Prompt-Injection Controls
scripts/requirements.txt:1Dependency Installation Uses Unbounded Version Ranges Without Hash Verification
scripts/capture_daemon.py:101Screenshots and OCR Logs Are Stored in Plaintext Without Enforced Restrictive Permissions or Complete Retention Controls
This skill enables periodic screenshot capture, OCR extraction, structured activity logging, and AI-generated reports, but the instructions shown do not present a clear upfront privacy warning about the sensitivity of the collected data or that it may be sent to a third-party AI provider. Users may unknowingly expose credentials, personal messages, confidential documents, or regulated data visible on screen, making the omission materially dangerous in a screen-monitoring context.
The documentation describes the tool as a screen review assistant but does not prominently warn that it performs automatic screenshots, OCR extraction, and local retention of potentially sensitive on-screen content. This creates a meaningful privacy and security risk because users may enable continuous monitoring without informed consent, leading to capture of credentials, personal messages, proprietary data, or regulated information.
The README promotes continuous screenshots, OCR, and permanent retention of logs/reports, but it does not clearly warn that highly sensitive data may be captured, extracted, and stored, including passwords, private messages, financial information, or confidential work content. In a screen-monitoring skill, this omission is especially dangerous because users may enable broad collection with only a vague 'privacy protection' assurance and underestimate the scope and persistence of the surveillance data.
The README instructs users to configure OpenAI/Anthropic/Ollama for report generation but does not clearly disclose that screen-derived OCR text, activity logs, or summaries may be transmitted to third-party AI providers. Because this skill processes screen contents, the exported data may include sensitive personal, corporate, regulated, or credential-related information, creating a serious confidentiality and compliance risk.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
bash uninstall.sh
# 如需彻底删除数据:rm -rf ~/.screen-reviewer
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
bash uninstall.sh
# 如需彻底删除数据:rm -rf ~/.screen-reviewer
The skill advertises local monitoring and review generation, but the configuration explicitly supports sending activity-derived data to external AI providers such as OpenAI or Anthropic. Failing to clearly disclose external transmission is dangerous because screenshots, OCR text, app names, and window titles may contain credentials, private messages, client data, or regulated information.
The skill advertises local monitoring and review generation, but the configuration explicitly supports sending activity-derived data to external AI providers such as OpenAI or Anthropic. Failing to clearly disclose external transmission is dangerous because screenshots, OCR text, app names, and window titles may contain credentials, private messages, client data, or regulated information.
The skill advertises local monitoring and review generation, but the configuration explicitly supports sending activity-derived data to external AI providers such as OpenAI or Anthropic. Failing to clearly disclose external transmission is dangerous because screenshots, OCR text, app names, and window titles may contain credentials, private messages, client data, or regulated information.
The skill advertises local monitoring and review generation, but the configuration explicitly supports sending activity-derived data to external AI providers such as OpenAI or Anthropic. Failing to clearly disclose external transmission is dangerous because screenshots, OCR text, app names, and window titles may contain credentials, private messages, client data, or regulated information.
The markdown does not provide a clear, prominent warning that the skill captures periodic screenshots, extracts text from them, stores logs locally, and may transmit report data to external AI providers. Because screen contents routinely include secrets, personal data, and confidential business information, insufficient disclosure and consent around this collection pipeline is a severe privacy and data-exposure risk.
The daemon continuously captures full-screen images, extracts OCR text, and stores both screenshots and structured activity logs, which can include highly sensitive information such as messages, credentials, documents, and other personal data. In the context of a screen-monitoring skill, this is especially dangerous because the collection is broad, persistent, and backgrounded, while the code shown provides no visible consent flow, notice, minimization, encryption, or retention controls.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
"change_threshold": 5, # 至少 N% 像素变化才算"屏幕有变化"
},
"privacy": {
"blacklist_apps": ["1Password", "Keychain Access", "密码"],
},
"ocr": {
"enabled": True,
The report payload includes app names, window titles, timelines, and OCR-derived content samples, then transmits them to external AI services without any visible warning, consent check, or sanitization. Because this skill monitors screens, the context makes this especially dangerous: the data likely includes private communications, proprietary work product, and other sensitive on-screen content.
Listing disk paths for screenshots, logs, and reports without an adjacent sensitivity warning normalizes retention of highly sensitive artifacts and may cause users to overlook that these locations can contain full-screen captures, OCR text, and behavioral summaries. If the host is shared, backed up, synced, or compromised, these files may expose confidential information far beyond ordinary application logs.
The skill invokes shell commands, reads and writes files under the user's home directory, accesses environment variables for API keys, and can transmit data to external AI providers, yet it declares no explicit tool scope or permission boundaries. For a skill that captures screenshots and OCR text, missing scope declarations materially increases the risk of overbroad access and silent collection or exfiltration of sensitive data.
The trigger phrases are broad enough that the skill could activate for generic productivity, time tracking, or review requests without the user specifically intending to enable screen surveillance. In the context of a tool that captures screenshots and OCR text, overbroad activation increases the chance of accidental monitoring and collection of highly sensitive information.
The skill description uses very broad trigger language such as general requests about productivity analysis, time tracking, activity logging, and daily review, which can overlap with many benign everyday user prompts. This increases the chance the skill is invoked in contexts broader than intended, potentially enabling unnecessary screenshot monitoring or OCR-based review of sensitive on-screen information.
The installer unconditionally deletes whatever exists at the target skill paths with rm -rf before recreating symlinks. If those paths already contain a real directory, prior skill content, or user-managed files, running the installer will silently destroy them, causing data loss and potentially breaking other agent tooling. In this screen-monitoring skill context, the behavior is more concerning because the package asks for persistent installation and autostart-style integration, so users may run it with elevated trust and overlook the destructive side effect.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def take_screenshot(output_path: str) -> bool:
"""调用 macOS screencapture 截取全屏,保存为 JPEG"""
try:
subprocess.run(
["screencapture", "-x", "-t", "jpg", output_path],
capture_output=True, timeout=10,
)
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return frontApp & "|||" & winTitle
'''
try:
r = subprocess.run(
["osascript", "-e", script],
capture_output=True, text=True, timeout=5,
)
The module docstring and function docstring are written only in Chinese, which imposes a single language on users and operators without any opt-in or alternative locale support. The policy for natural-language content applies to code comments and string literals as well, so this is a language-policy issue in this file.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if not os.path.isfile(OCR_BINARY):
return None
try:
result = subprocess.run(
[OCR_BINARY, image_path],
capture_output=True, text=True, timeout=15,
)
This file hard-codes the OCR languages to chi_sim+eng, which imposes a specific language/locale choice on all users. The stated policy forbids forcing a specific language without user opt-in, and there is no visible parameter, prompt, or documented justification in this file.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
if not os.path.isfile(swift_src):
return False
try:
result = subprocess.run(
["swiftc", "-O", "-o", OCR_BINARY, swift_src],
capture_output=True, text=True, timeout=120,
)