Back to skill

Security audit

Dcard

Security checks for vulnerabilities and agentic risk

Overview

This skill is not clearly malicious, but it needs review because it automates Dcard scraping through anti-bot bypass and installs/runs browser tooling with weak supply-chain and isolation controls.

Install only in an isolated, unprivileged environment after checking the dependency and Camoufox versions yourself. Be aware that the skill is designed to bypass Dcard's Cloudflare protection and can list forum content, so confirm that your use complies with Dcard's terms and avoid bulk or automated scraping.

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 (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:53
Finding
Unpinned Third-Party Packages and Browser Artifact<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 53–56 **Vulnerability Type**: Uncontrolled third-party dependency acquisition **Risk Level**: Medium ### Vulnerable Code ```bash # 1. 安裝 Camoufox + patchright + lxml pip3.14 install camoufox lxml patchright # 2. 下載 Camoufox 瀏覽器(~280MB) camoufox fetch ``` ### Technical Analysis The installation instructions retrieve `camoufox`, `lxml`, and `patchright` without pinning exact versions or verifying package hashes. The installed Camoufox command then downloads a browser artifact, but the skill does not specify an expected version, checksum, or signature. Consequently, the code and browser installed by a user may differ from the components that were reviewed. This creates a supply-chain risk if a package release, package registry account, distribution source, or downloaded browser artifact is compromised. Python package installation can execute build and installation logic, while a compromised browser binary will execute whenever the skill performs a fetch operation. No evidence indicates that the currently named packages are malicious. The vulnerability is the absence of controls that ensure users install the reviewed artifacts. ### Attack Path 1. An attacker compromises a dependency publisher account, package distribution channel, or browser artifact source. 2. The attacker publishes a modified version under one of the dependency names or replaces the artifact retrieved by `camoufox fetch`. 3. A user follows the documented installation instructions. 4. Because no version or hash is enforced, the package manager or Camoufox utility retrieves the attacker-controlled release. 5. Malicious installation logic or the modified browser binary executes with the privileges of the installing or invoking user. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user installing or running the skill. This may permit access to that user's files, en ...[truncated 242 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every Python dependency to a reviewed, exact version in a lock file. 2. Record and enforce cryptographic hashes, for example through a requirements file used with `pip --require-hashes`. 3. Install packages only from an explicitly configured, trusted package index. 4. Pin the Camoufox browser artifact to a reviewed version and verify its checksum or publisher signature before execution. 5. Document a reproducible installation procedure and periodically review pinned components for security updates. 6. Run installation and browser automation from a dedicated, unprivileged environment or container. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/dcard_fetch.py:22
Finding
Execution of a Hard-Coded Cache Binary with Browser Sandboxing Disabled<![CDATA[ ## Vulnerability Details **File Location**: `scripts/dcard_fetch.py`, lines 22–31 **Vulnerability Type**: Unsafe executable selection and weakened browser isolation **Risk Level**: Medium ### Vulnerable Code ```python _CAMOUFOX = "/home/ichen/.cache/camoufox/camoufox" _JS_DIR = Path(__file__).parent # ── browser helpers ───────────────────────────── def _browser(): from patchright.sync_api import sync_playwright ps = sync_playwright().start() browser = ps.firefox.launch(headless=True, executable_path=_CAMOUFOX, args=["--no-sandbox"]) ``` ### Technical Analysis The skill executes a browser from a fixed path under a named user's cache directory. It does not verify the binary's ownership, permissions, version, signature, or cryptographic digest before execution. Cache locations are mutable and are generally unsuitable as an implicit trust anchor for executable code. The browser is also launched with `--no-sandbox`. To the extent this option is honored by the selected browser build, it weakens process isolation while the browser processes remote Dcard content. Browser automation necessarily handles complex, externally supplied HTML, JavaScript, media, and other resources, making browser sandboxing an important defense-in-depth boundary. The hard-coded path also makes the skill non-portable and may cause operators to create unsafe filesystem workarounds to make the expected path available. ### Attack Path A local binary-substitution path is as follows: 1. An attacker obtains write access to `/home/ichen/.cache/camoufox/` through another compromised process, unsafe directory permissions, or a compromised browser update mechanism. 2. The attacker replaces `camoufox` with an executable payload. 3. A user invokes `dcard_fetch.py`. 4. The script launches the substituted file without validating its integrity or ownership. 5. The payload executes with the invoking user's privileges. A browser-containment path is also possible: 1. The ...[truncated 1048 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the user-specific hard-coded executable path. 2. Accept the browser location through trusted configuration or use Camoufox's supported executable-discovery mechanism. 3. Before execution, verify that the resolved file is a regular file, is not a symbolic link to an unexpected location, and has trusted ownership and permissions. 4. Verify the browser version and cryptographic hash or publisher signature against pinned release metadata. 5. Remove `--no-sandbox` unless it is demonstrably required and applicable to this Firefox-based build. 6. If sandbox disabling is unavoidable, execute the browser inside a dedicated low-privilege container or virtual machine with a read-only filesystem, restricted network access, no host secrets, and no unnecessary mounted directories. 7. Fail closed when executable validation or secure browser initialization cannot be completed. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The skill is presented as a tool for fetching full content from a single Dcard post, but the documentation exposes additional collection features such as popular/latest listing and all-forum enumeration. This expands the operational scope from targeted retrieval to scalable discovery and scraping, increasing abuse potential and undermining informed approval decisions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The skill is presented as a tool for fetching full content from a single Dcard post, but the documentation exposes additional collection features such as popular/latest listing and all-forum enumeration. This expands the operational scope from targeted retrieval to scalable discovery and scraping, increasing abuse potential and undermining informed approval decisions.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill declares no explicit tool scope or permissions despite clearly requiring network access and browser automation. This is dangerous because it hides the effective capability boundary from users and the hosting agent, making it easier for the skill to access external sites without transparent consent or least-privilege enforcement.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The manifest frames the skill as single-post extraction, while the documentation exposes forum-wide listing capabilities. This inconsistency is dangerous because it conceals broader data-access functionality that could be used for bulk scraping or reconnaissance beyond the user's apparent intent.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The documentation openly states that stealth browser tooling is used to bypass Cloudflare, but it does not warn users about the legal, policy, and operational risks of evading third-party anti-bot protections. In context, anti-bot bypass materially raises the danger because the skill is designed to defeat access controls rather than simply consume a public API.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The manifest describes a skill for extracting the full content of a Dcard article, including title, body, and image links. However, the code and module usage documentation add broader browsing capabilities: listing posts in a forum and enumerating popular forums, which goes beyond single-article extraction.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The browser context is hard-coded to use locale "zh-TW" and timezone "Asia/Taipei". This is a natural-language policy concern because it imposes a specific regional setting on all runs without offering user opt-in or explaining that the tool is intended only for that locale.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The skill description is written entirely in Traditional Chinese and does not indicate that other languages are supported or that the language choice is intentional and region-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The code explicitly matches Chinese time words like '小時', '分鐘', '天', '週', and '月' when filtering title lines. This bakes in a language/locale assumption in natural-language handling without any visible opt-in or explanation that the skill is intentionally limited to that locale.

Description-Behavior Mismatch

Low
Confidence
84% confidence
Finding
The stated purpose is article content extraction with title, full text, and image links. The implementation additionally injects URL and post_id fields into the returned data, which is broader than the declared output schema, though still related to the same object.

Static analysis

No suspicious patterns detected.