T09 · Insecure Skill Coding Practices
- Location
scripts/collect.js:27- Finding
Persistent authenticated browser state may be included in packaged Skill archives
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly does what it says, but it stores reusable login sessions inside the skill directory and includes packaging code that could archive those sessions.
Review before installing. Use a dedicated or disposable browser profile and non-sensitive test accounts, do not package or share the skill after logging in unless the profile directory is removed, and avoid running it with administrator privileges. Treat generated report paths carefully because brand names are not sanitized.
scripts/collect.js:27Persistent authenticated browser state may be included in packaged Skill archives
scripts/collect.js:23Unsanitized brand argument allows report output path traversal
scripts/collect.js:273Chromium sandbox is disabled while processing external web content
The declared description is for a diagnostic tool that gathers recommendation information from three AI platforms and produces a report. The supplied code does none of that: it is a build/packaging utility for creating a .skill archive from a local directory. It interacts only with the local filesystem and PowerShell, with no evidence of platform data collection, recommendation analysis, or report generation. This is a materially different primary purpose, so it is a clear mismatch.
Referenced artifact was not completely inspected
node scripts/collect.js <品牌> <行业> <城市> [场景数]
Referenced artifact was not completely inspected
node scripts/collect.js <品牌> <行业> <城市> [场景数]
Referenced artifact was not completely inspected
node scripts/collect.js <品牌> <行业> <城市> [场景数]
Referenced artifact was not completely inspected
node scripts/collect.js <品牌> <行业> <城市> [场景数]
Referenced artifact was not completely inspected
node scripts/collect.js <品牌> <行业> <城市> [场景数]
The trigger phrase set is broad and can cause the skill to activate on vague GEO/diagnosis requests without confirming user intent, brand target, or data-collection consent boundaries. In a skill that automates browser-based collection across logged-in third-party platforms, overbroad activation increases the chance of unintended use and unnecessary exposure of authenticated session context.
The skill explicitly states that subsequent runs automatically reuse login state across Doubao, Yuanbao, and Tongyi, but it does not warn users about the privacy and security implications of persistent authenticated sessions. Reusing stored sessions can expose account context, retained cookies, and cross-run data access if the environment is shared or compromised.
The script launches a persistent Chrome profile in a local '.chrome-profile' directory and explicitly tells the user that login state will be remembered for reuse. That means authentication cookies, tokens, and browsing/session artifacts are stored on disk, which can expose user accounts if the machine, repository directory, or generated artifacts are accessed by another user or process. In this skill context, the tool logs into third-party AI platforms, so the persisted profile may contain valuable authenticated sessions across multiple services.
The document formats dates with toLocaleDateString('zh-CN'), which forces a specific locale in generated user-facing content. Under the policy, fixed language or locale behavior should either offer user choice or be clearly documented as a justified region-specific constraint.
The generated footer uses toLocaleString('zh-CN') and Chinese fixed text, which enforces a specific language/locale for report output. This is a natural-language policy concern unless the skill explicitly offers language selection or clearly limits itself to a Chinese-only context.
This code deletes existing output archives with fs.unlinkSync and invokes PowerShell via execSync, but the only visible messages are success/failure logs after or around execution rather than advance disclosure or confirmation. For a packaging script, destructive overwrite/delete behavior and subprocess execution should be explicitly disclosed to the user in code comments, prompts, or accompanying documentation.
The script formats the report timestamp with toLocaleString('zh-CN'), which forces a specific locale in output. There is no user opt-in or documented justification that this skill is strictly limited to Chinese-language operation.
This code derives an output path, generates a DOCX buffer, and writes the file to disk using fs.writeFileSync. Although it logs the resulting filename after the write, there is no warning beforehand or other disclosure in this file that a new document will be created automatically.
The success and error messages are emitted only in Chinese (e.g. '打包成功' and '打包失败'), which imposes a specific language on users without opt-in. This is a natural-language policy concern because the file provides no documented reason for a Chinese-only locale or any mechanism to select another language.