Back to skill

Security audit

scut-review-monitor

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a portal-monitoring helper, but it uploads live login QR codes to a third-party image host by default and stores session material on disk without strong safeguards.

Review this skill carefully before installing. Disable image_upload.enabled unless you explicitly want a live login QR code sent to the configured third-party host, and treat generated cookie and QR files like temporary passwords. Prefer running it in a restricted local environment, pin dependencies, and delete saved QR and cookie artifacts when no longer needed.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
portal_monitor.py:346
Finding

Default Third-Party Upload of a Live Authentication QR Code

Content
View full analysis
Optional[str]: upload_cfg = CONFIG.image_upload if not upload_cfg.enabled: return None if upload_cfg.password_enabled and not upload_cfg.image_password: raise ValueError("image_upload.password_enabled 为 true 时,image_upload.image_password 不能为空。") form_data: dict[str, str] = {} output_format = upload_cfg.output_format.strip() if output_format: form_data["outputFormat"] = output_format cdn_domain = upload_cfg.cdn_domain.strip() if cdn_domain and cdn_domain.lower() != "default": form_data["cdn_domain"] = cdn_domain if upload_cfg.password_enabled: form_data["password_enabled"] = "true" form_data["image_password"] = upload_cfg.image_password with image_path.open("rb") as f: files = {"image": (image_path.name, f, "image/png")} resp = requests.post( upload_cfg.api_url, files=files, data=form_data, timeout=upload_cfg.request_timeout_seconds, ) ``` ```python output_path = save_login_qrcode_from_data_url(src) print(f"已提取登录二维码并保存到 {output_path},也已保存原始 data URL 到 {LOGIN_QRCODE_DATA_FILE}。") try: upload_url = upload_login_qrcode_if_enabled(output_path) if upload_url: print(f"已上传二维码到图床: {upload_url}") print(f"二维码链接也已写入 {CONFI ...[truncated 2356 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
portal_monitor.py:517
Finding

Portal Cookies and QR Authentication Data Stored in Plaintext

Content
View full analysis
Path: mime, raw = parse_data_url_image(data_url) if mime != "image/png": print(f"检测到二维码 MIME 类型为 {mime},仍按原始内容写入 {LOGIN_QRCODE_IMAGE_FILE.name}。") LOGIN_QRCODE_IMAGE_FILE.write_bytes(raw) LOGIN_QRCODE_DATA_FILE.write_text(data_url, encoding="utf-8") return LOGIN_QRCODE_IMAGE_FILE ``` ```python def save_cookies(context, cookie_file: Path = CONFIG.cookie_file) -> None: cookies = context.cookies() cookie_file.write_text(json.dumps(cookies, ensure_ascii=False, indent=2), encoding="utf-8") print(f"已保存 cookies 到 {cookie_file}") ``` ### Technical Analysis The helper stores browser cookies in an unencrypted JSON file and writes both the QR image and its original Base64 data URL into the Skill directory. The files are created through ordinary `Path.write_text()` and `Path.write_bytes()` operations without explicitly enforcing restrictive permissions. The cookies can contain authenticated portal session tokens. The QR image and data URL contain a temporary login credential. No operating-system credential store, encryption, atomic permission-controlled creation, permission validation, or post-login cleanup is implemented. The effective exposure depends on the host's account permissions and default `umask`. Nevertheless, relying on ambient defaults is unsafe for authentication data because files may be readable by other local users, backup agents, synchronization software, indexing services, or unrelated processes running under the same account. ### Attack Path 1. The user starts the login workflow. 2. The helper extracts the login QR code and saves `login_qrcode.png` and `login_qrcode.txt` in the project directory. 3. After login, th ...[truncated 1057 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Unpinned Dependencies and Runtime Browser Component Installation

Content
View full analysis
None: try: with sync_playwright() as p: browser = p.chromium.launch(headless=True) browser.close() except Exception as exc: error_text = str(exc) if "Executable doesn't exist" in error_text: print("未检测到 Chromium,开始自动安装...") subprocess.run( [sys.executable, "-m", "playwright", "install", "chromium"], check=True, ) print("Chromium 安装完成。") else: raise ``` ### Technical Analysis The project lists `requests`, `lxml`, and `playwright` without exact versions or package hashes. Consequently, separate installations can resolve to different dependency versions, including future releases that were not included in this audit. The helper also invokes Playwright's Chromium installer automatically when the expected browser executable is unavailable. Although the subprocess uses a fixed argument list and does not present command-injection exposure, it retrieves and installs an external executable component at runtime. The exact browser artifact depends on the installed Playwright version, which is itself unconstrained. No evidence was found that the listed package names are typosquatted or intentionally malicious. The risk is instead non-reproducible installation and exposure to future upstream or package-registry compromise. ### Attack Path 1. An attacker compromises a future release, distribution channel, or upstream account associated with an unconstrained dependency. 2. A user installs the project requirements after the compromised version becomes the resolver's selected version. 3. The malicious pa ...[truncated 863 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code uploads the login QR code image to a third-party endpoint, which can expose a live authentication factor to an external service and anyone who obtains the resulting URL. In this context, the QR code is directly tied to portal login, so transmitting it off-device can enable session hijacking or unauthorized account access during the QR validity period.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill explicitly states that the login QR code may be uploaded to a configured external image-hosting API, but it does not present a clear user-facing warning or consent step before transferring authentication-related material off-host. Even though a QR login code is not a password, it is sensitive session bootstrap data; sending it to a third party expands exposure to interception, logging, retention, or misuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The configuration explicitly enables uploading login QR code images to a third-party service via https://img.scdn.io/api/v1.php. Login QR codes are authentication artifacts and exposing them to an external host can allow account takeover or unauthorized session establishment if the QR code is still valid, especially since there is no indication of user consent, trust boundary validation, or data minimization in this file.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · portal_monitor.py (reported line 288)May include surrounding context.

python
error_text = str(exc)
        if "Executable doesn't exist" in error_text:
            print("未检测到 Chromium,开始自动安装...")
            subprocess.run(
                [sys.executable, "-m", "playwright", "install", "chromium"],
                check=True,
            )

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code saves both the login QR image and the raw data URL to local files without warning the user that these artifacts may be authentication-sensitive. Anyone with access to the filesystem may be able to reuse or inspect these files during the QR validity window, and the raw data URL is especially easy to exfiltrate or copy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Persisting authenticated cookies to disk creates a reusable session artifact that may allow account access if the file is stolen by another local user, malware, or backup compromise. Because the code does this automatically and without a clear user-facing warning or permission hardening, the risk is materially elevated in a tool handling portal authentication.

Content

No source excerpt is available for this finding.

Tainted flow: 'cookies' from pathlib.Path.read_text (line 525, file read) → pathlib.Path.write_text (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · portal_monitor.py (reported line 519)May include surrounding context.

python
def save_cookies(context, cookie_file: Path = CONFIG.cookie_file) -> None:
    cookies = context.cookies()
    cookie_file.write_text(json.dumps(cookies, ensure_ascii=False, indent=2), encoding="utf-8")
    print(f"已保存 cookies 到 {cookie_file}")

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The CLI presents the tool as a simple portal monitor helper, but the implementation also sends external notifications and can upload login QR codes to a third-party service. That mismatch increases the chance users run the skill without understanding that sensitive authentication-related data may leave the host or be persisted, undermining informed consent and safe operation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

When Playwright is missing a browser executable, the code runs a subprocess to install Chromium automatically. While it prints during installation, it does not disclose beforehand in help text or comments that executing login flows may trigger package installation and external downloads.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The parser description and command help text are presented only in English, despite the script's runtime messages and defaults being primarily Chinese. This imposes a language choice on users without opt-in or explanation, which can be considered a locale/language policy issue.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
96% confidence
Finding

The dependency requests is specified without a version pin, which makes builds non-reproducible and can cause the environment to resolve to a vulnerable or incompatible release over time. In a security-sensitive agent skill, this increases supply-chain risk because the installed package version cannot be audited or reliably constrained.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests
lxml
playwright

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
91% confidence
Finding

requests has multiple published advisories, and because no version is pinned, it is impossible to verify whether the installed version is affected. In an agent skill that may perform network access, this uncertainty is dangerous because vulnerable HTTP client behavior can expose credentials, weaken transport guarantees, or leak sensitive request data depending on the resolved version.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency lxml is unpinned, so package resolution may install different versions across environments, including versions with known security issues. This is more concerning than a typical library because XML/HTML parsing libraries have a history of parser-related vulnerabilities and are often exposed to untrusted content.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
requests
lxml
playwright

Unverifiable Dependency: lxml has 14 known advisory(ies) (CVE-2021-43818 (lxml's HTML Cleaner allows crafted and SVG embedded scripts to pass through); CVE-2014-3146 (lxml Cross-site Scripting Via Control Characters); CVE-2021-28957 (lxml vulnerable to Cross-Site Scripting ) +11 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

lxml has a significant advisory history, and the lack of version pinning prevents verification that a safe release will be installed. Given that lxml commonly processes untrusted XML/HTML, unresolved exposure to parser or sanitization flaws can materially increase the attack surface of the skill.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
94% confidence
Finding

The dependency playwright is listed without a version pin, making the runtime dependency set unpredictable and weakening supply-chain control. While this does not prove an exploitable flaw by itself, it introduces avoidable risk from unexpected updates or transitive dependency changes.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
requests
lxml
playwright