T09 · Insecure Skill Coding Practices
- Location
scripts/lib.mjs:25- Finding
CSV Formula Injection Through Untrusted Douban and Markdown Fields
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it claims: it exports a user's Douban collection data to local CSV files, with some practical privacy and spreadsheet-safety cautions.
Install only if you intend to export Douban activity data locally. Run the browser scraper only with a browser session you control, choose an output directory deliberately, and do not add the suggested cron job unless recurring sync is wanted. Treat the generated CSV files as containing untrusted external text; import them with formula evaluation disabled or inspect/sanitize them before opening in spreadsheet software.
scripts/lib.mjs:25CSV Formula Injection Through Untrusted Douban and Markdown Fields
Referenced artifact was not completely inspected
- `scripts/douban-browser-scraper.mjs` — via Puppeteer CDP, needs a running browser
The skill requires environment access and performs network-driven export/sync behavior, but it does not declare an explicit tool scope such as allowed tools or permissions. This weakens least-privilege controls and can cause an agent runtime or reviewer to underestimate that the skill can read environment configuration and fetch remote content, increasing the chance of unintended access or execution in broader contexts.
The script navigates an attached browser to Douban pages and extracts user account data, which necessarily sends requests to remote Douban services using the browser's authenticated session. While progress logs exist, they do not clearly warn the user that the script will access account-linked data over the network.
The code creates an output directory and writes multiple CSV files containing the user's Douban activity, including titles, dates, ratings, statuses, and comments. Although it logs progress after writing, there is no prior disclosure, confirmation, comment, or docstring warning that personal data will be persisted to disk under the user's home directory.
The usage comments instruct the user to run the script while logged in and fetch pages from their Douban account, extracting titles, links, dates, ratings, and comments, then copying the data to the clipboard. Although the file comments describe what the script does at a high level, they do not explicitly warn the user that authenticated account data will be retrieved and exported from the browser session.
This file embeds user-facing status labels and trigger-like matching patterns only in Chinese, which indicates the skill is effectively restricted to a single language. Under the policy, forcing a specific language without user opt-in or a clearly documented regional justification is a natural-language policy concern.
The skill description explains export and sync behavior but does not clearly warn that it writes and updates local CSV files and suggests ongoing automation via cron. This can mislead users or orchestrators about persistence and local side effects, raising the risk of unintended file modifications or unattended recurring execution.
The category definitions embed Chinese strings such as '读过', '看过', and '想玩', and the generated output uses these values directly. This imposes a specific language/locale in user-visible output without opt-in or explanation, which can violate language-choice policy expectations.
The script's documented purpose is to migrate existing local Douban Markdown files to CSV, but it refuses to run unless DOUBAN_USER is supplied from the environment and uses that value to shape the output path. For a local file-format migration utility, dependency on process environment for user identity is not clearly justified by the stated purpose and expands capability beyond straightforward file conversion.
Detected: suspicious.dynamic_code_execution, suspicious.env_credential_access