Back to skill

Security audit

Smarttable Weekly Check

Security checks for vulnerabilities and agentic risk

Overview

The skill appears purpose-built for WeCom weekly report auditing, but it uses a persistent logged-in browser profile and opens user-supplied URLs with Chromium sandboxing disabled, which needs review before use.

Only install or run this skill on a trusted machine and with authorization to process the WeCom weekly-report data. Use a links file you control, avoid shared machines, clear the persistent browser profile when finished, and prefer hardening the script to allow only expected WeCom HTTPS hosts and to run Chromium with sandboxing enabled.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/extract_weekly.js:128
Finding

Unrestricted URL Navigation in a Chromium Process with the Sandbox Disabled

Content
View full analysis
l.trim()) .filter(l => l.startsWith('http')); if (links.length === 0) { console.error('链接文件为空或格式不正确'); process.exit(1); } console.log(`发现 ${links.length} 个链接`); ``` ```javascript const userDataDir = path.join(os.homedir(), '.smarttable-check-browser'); console.log('\n启动浏览器...'); browser = await puppeteer.launch({ headless: false, defaultViewport: null, userDataDir, args: ['--no-sandbox', '--disable-blink-features=AutomationControlled'] }); ``` ```javascript const page1 = await browser.newPage(); await page1.goto(links[0], { waitUntil: 'domcontentloaded', timeout: 30000 }); ``` ```javascript const page = await browser.newPage(); await page.goto(url, { waitUntil: 'domcontentloaded', timeout: 30000 }); await sleep(3000); ``` ### Technical Analysis The links file is treated as externally supplied input, but the only validation performed is a string-prefix check for `http`. The code does not parse the URL, require HTTPS, constrain the destination to an approved WeChat domain, reject unexpected ports, or prevent navigation to loopback and private-network addresses. Every accepted URL is subsequently opened through `page.goto()`. Consequently, an attacker who can modify or provide the links file can cause the browser to access arbitrary attacker-controlled or internal-network resources. The Chromium process is also launched with `--no-sandbox`. Disabling the browser sandbox removes an important isolation boundary intended to limit the impact of a compromised renderer. A successful Chromium exploit delivered by an attacker-controlled page could therefore have a substantially greater effect than it would unde ...[truncated 1900 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/analyze.js:159
Finding

Markdown Injection in the Weekly Analysis Report

Content
View full analysis
{ report += `### ${r.name}\n\n`; report += '| 规则 | 问题 |\n|------|------|\n'; r.issues.filter(i => i.level === '❌').forEach(i => { report += `| ${i.rule} | ${i.detail} |\n`; }); if (r.issues.some(i => i.level === '⚠️')) { r.issues.filter(i => i.level === '⚠️').forEach(i => { report += `| ${i.rule} | ${i.detail} |\n`; }); } report += '\n**多周数据对比:**\n\n'; report += '| 周期 | 工作字数 | 本周工作内容(摘要) | 下周计划(摘要) |\n'; report += '|------|---------|---------------------|-----------------|\n'; Object.entries(r.works).forEach(([k, v]) => { const wChars = countChars(v || ''); const wSummary = (v || '(空)').substring(0, 60).replace(/\n/g, ' '); const pSummary = (r.plans[k] || '(空)').substring(0, 50).replace(/\n/g, ' '); report += `| ${k} | ${wChars} | ${wSummary}... | ${pSummary}... |\n`; }); ``` ```javascript results.forEach(r => { const issueSummary = r.issues.map(i => `${i.rule}: ${i.detail}`).join('; '); const taskCount = countTasks(r.works[latestLabel] || ''); report += `| ${r.name} | ${r.status} | ${r.workChars} | ${taskCount} | ${issueSummary || '-'} |\n`; }); ``` ### Technical Analysis Employee names, weekly work content, and next-week plans originate from remotely retrieved collaborative-sheet data. These values are directly interpolated into a Markdown report without escaping Markdown metacharacters or removing raw HTML. Replacing newline characters in summaries does not neutralize table delimiters, Markdown links, image syntax, inline HTML, or other formatting constructs. An attacker who can edit a source sheet can therefore control portions of the generated report's rendered structure. The exact result depends on the Markdown viewer. A permissive viewer may render r ...[truncated 1474 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/project_summary.js:87
Finding

Markdown Injection in the Project Summary Report

Content
View full analysis
{ report += `| ${proj} | ${members.length} | ${members.map(m => m.name).join('、')} |\n`; }); report += `\n---\n\n`; sortedProjects.forEach(([proj, members]) => { report += `## ${proj}\n\n`; report += `**参与人员(${members.length}人):** ${members.map(m => m.name).join('、')}\n\n`; members.forEach(m => { report += `### ${m.name}\n\n`; report += `${m.tasks}\n\n`; }); }); ``` ### Technical Analysis Project names, employee names, and task descriptions are extracted from collaborative-sheet content and inserted directly into Markdown structural contexts. Project names become both table cells and second-level headings, employee names become headings, and task text is inserted as unrestricted Markdown body content. No Markdown escaping, HTML sanitization, or output encoding is applied. Because task text is emitted verbatim, an attacker can inject arbitrary Markdown constructs and any raw HTML supported by the downstream renderer. Project and employee fields can additionally alter the heading hierarchy or break the summary table. ### Attack Path 1. An attacker with access to a source sheet enters a crafted project name, employee name, or task description. 2. The extraction process stores that content in the corresponding weekly JSON file. 3. `project_summary.js` parses the project sections but preserves attacker-controlled project names and task bodies. 4. The generator inserts those values directly into `project_summary.md`. 5. A recipient opens the report in a Markdown renderer. 6. The injected syntax changes the rendered report, displays attacker-controlled links or content, or causes rem ...[truncated 618 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (20)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

The declared description emphasizes a browser-automation/data-acquisition tool for Enterprise WeCom smart tables, including Puppeteer-based browser startup, internal API retrieval, multi-link checking, login waiting, and project-level aggregation. The supplied code chunk does not do those things. It is only an offline analyzer that consumes already extracted local JSON files and generates a Markdown quality report using several rules. Automatic report generation is consistent, and the 4-rule-style weekly report checking is broadly aligned, but the major acquisition and interaction capabilities described in the declaration are absent. Therefore the description materially overstates and misrepresents the behavior of this code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description presents a weekly-report auditing tool for Enterprise WeCom smart tables, centered on browser automation, API data retrieval, rule-based quality checks, and reporting features. The supplied code does none of that. It is a maintenance utility for repairing malformed local JSON files, specifically replacing problematic quote characters and rewriting corrected JSON back to disk. This is not a supporting implementation detail of the declared functionality in the provided chunk; its primary purpose is materially different and it introduces undeclared local file modification behavior. Therefore the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a comprehensive weekly report checking tool centered on browser automation, API-based data retrieval, and rule-based quality inspection of members' reports. The supplied code chunk does something much narrower and materially different: it reads existing local JSON week data, extracts project-tagged sections from work text, aggregates contributors by project, and outputs a Markdown summary. While 'project dimension summary' is mentioned in the description, that is only one auxiliary feature; this code lacks the primary declared behaviors such as link checking, Puppeteer/browser automation, internal API retrieval, login handling, and four-rule quality evaluation. Therefore the code chunk does not accurately represent the declared purpose.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 14)May include surrounding context.

md
**一键操作:** 整个提取流程已封装为 `scripts/extract_weekly.js`,自动完成启动浏览器→登录检测→等待扫码→提取数据→保存→关闭。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 41)May include surrounding context.

md
**一键操作:** 整个提取流程已封装为 `scripts/extract_weekly.js`,自动完成启动浏览器→登录检测→等待扫码→提取数据→保存→关闭。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

md
node scripts/analyze.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 63)May include surrounding context.

md
node scripts/analyze.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 47)May include surrounding context.

md
node scripts/project_summary.js

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 65)May include surrounding context.

md
| `fix_json.js` | 修复弯引号编码损坏的 JSON 文件 |

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
84% confidence
Finding

The skill explicitly describes networked behavior such as launching a browser, waiting for login, and calling an internal WeCom API, but it declares no corresponding tool scope or permission boundaries. That creates an authorization and review gap: operators cannot easily tell that the skill may access remote services and authenticated enterprise data before running it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill describes extracting structured weekly-report data from an internal Enterprise WeChat API and saving it locally, but it does not prominently warn about the sensitivity of employee work-report content or the privacy/compliance implications of collecting and storing it. This increases the risk of unauthorized collection, over-retention, or accidental disclosure of internal business and personnel data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states that it uses a persistent browser profile to retain Enterprise WeChat login state on disk, but it does not clearly warn that authentication cookies or session artifacts may remain locally accessible. If that profile directory is exposed, copied, or used on a shared machine, an attacker could potentially reuse enterprise session state or harvest sensitive cached data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents all rule descriptions, examples, and implementation guidance exclusively in Chinese. Under the policy-violation category, forcing a specific language without user opt-in or a documented regional justification can be a natural-language policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file’s natural-language interface and outputs are explicitly fixed in Chinese, including the header comments and generated report content. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script automates extraction of employee weekly reports, including names and work/plan content, and writes the data as local JSON files without any access-control, minimization, retention, or user warning. In this skill context, the data is likely internal employee and project information, so silent bulk collection and local persistence increases the risk of privacy leakage, unauthorized reuse, or accidental exposure from the operator workstation.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The manifest only provides a brief description of the tool as a weekly report checking utility, but it does not specify when the skill should be invoked, what exact user intents it matches, or any exclusions. In a manifest file, this lack of trigger specificity can cause ambiguous or overly broad activation behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The only natural-language description is in Chinese, which may implicitly constrain the skill's language or locale behavior without offering a user choice or documenting that it is intentionally region-specific. This can be a language policy concern when no opt-in or justification is present in the file.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
92% confidence
Finding

The dependency uses a caret range (^24.0.0), which permits automatic installation of newer minor/patch releases that may change behavior or introduce supply-chain risk. In a skill that launches a browser and processes internal weekly-report data, dependency drift can increase the chance of pulling in a compromised or incompatible package version without review.

Content

Scanner excerpt · package.json (reported line 6)May include surrounding context.

json
"version": "1.1.0",
  "description": "企业微信智能表格周报检查工具",
  "dependencies": {
    "puppeteer": "^24.0.0"
  }
}

Unverifiable Dependency: puppeteer has 1 known advisory(ies) (CVE-2019-5786 (Use-After-Free in puppeteer)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
78% confidence
Finding

The manifest does not pin Puppeteer to an exact version, so it is not possible to verify from this file alone whether the installed release avoids known advisories. Given this skill uses Puppeteer to automate a browser for internal data access, uncertainty around browser-automation package security raises supply-chain and client-side compromise concerns if an affected version is resolved.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The script explicitly sorts project names using the 'zh' locale via localeCompare, and surrounding user-facing strings are all hardcoded in Chinese. This imposes a specific language/locale behavior without offering any user choice or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.