Back to skill

Security audit

DataMaster Pro

Security checks for vulnerabilities and agentic risk

Overview

This data-analysis skill is not proven malicious, but it needs review because it overstates its capabilities and contains unsafe network, credential, file-output, and PDF-generation handling.

Review this skill carefully before installing. Use it only on trusted datasets and trusted URLs, avoid passing secrets in command-line headers, prefer HTTPS-only public endpoints, do not run PDF generation with untrusted report names, and store generated reports in a controlled directory because they may contain sensitive data.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (4)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/data-fetch.js:58
Finding

Unrestricted URL Fetching Enables Server-Side Request Forgery

Content
View full analysis
{ const urlObj = new URL(url); const lib = urlObj.protocol === 'https:' ? https : http; const reqOptions = { hostname: urlObj.hostname, port: urlObj.port || (urlObj.protocol === 'https:' ? 443 : 80), path: urlObj.pathname + urlObj.search, method: options.method || 'GET', headers: { 'User-Agent': 'DataMaster-Pro/1.0', ...options.headers } }; const req = lib.request(reqOptions, (res) => { ``` ```js async function fetchAPI(url, method, headers) { console.log(`📡 正在请求 API: ${url}`); try { const response = await httpRequest(url, { method, headers }); const data = JSON.parse(response); console.log(`✅ 成功获取 ${Array.isArray(data) ? data.length : 1} 条数据`); return data; } catch (error) { console.error(`❌ API 请求失败: ${error.message}`); throw error; } } async function fetchWeb(url, selector) { console.log(`🌐 正在抓取网页: ${url}`); try { const html = await httpRequest(url); ``` ```js if (options.url) { data = await fetchWeb(options.url, options.selector); } else if (options.api) { data = await fetchAPI(options.api, options.method, options.headers); } ``` ### Technical Analysis The command-line `--url` and `--api` values are passed directly to Node.js HTTP clients. The implementation does not: - Restrict requests to approved destinations. - Require HTTPS. - Reject loopback, private, link-local, multicast, or reserved IP ranges. - Block cloud instance metadata addresses. - Resolve and validate hostnames before connecting. - Protect against DNS rebinding. - Apply connection, response, or body-size limits. Network retrieval is necessary for the declared data-f ...[truncated 1440 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/data-fetch.js:58
Finding

Sensitive Authentication Headers Can Be Sent to Arbitrary Destinations over Plaintext HTTP

Content
View full analysis
{ const urlObj = new URL(url); const lib = urlObj.protocol === 'https:' ? https : http; const reqOptions = { hostname: urlObj.hostname, port: urlObj.port || (urlObj.protocol === 'https:' ? 443 : 80), path: urlObj.pathname + urlObj.search, method: options.method || 'GET', headers: { 'User-Agent': 'DataMaster-Pro/1.0', ...options.headers } }; ``` ```js async function fetchAPI(url, method, headers) { console.log(`📡 正在请求 API: ${url}`); try { const response = await httpRequest(url, { method, headers }); ``` The Skill documentation explicitly demonstrates an authorization header: ```json { "type": "api", "url": "https://api.example.com/v1/data", "headers": { "Authorization": "Bearer TOKEN" } } ``` ### Technical Analysis The documented `Bearer TOKEN` is a placeholder rather than a real embedded secret, and no fixed exfiltration destination was identified. However, the implementation accepts arbitrary headers and forwards them to any user-selected HTTP or HTTPS destination. Because plaintext HTTP is supported, credentials such as bearer tokens, API keys, session cookies, and custom authentication headers can be exposed to network observers. The implementation also does not bind credentials to a specific approved origin, so a token intended for one service can be sent to an attacker-controlled host. Passing secrets directly on the command line creates an additional exposure risk because command-line arguments may be visibl ...[truncated 1199 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/report-generate.js:456
Finding

Unvalidated Report Names Enable Path Traversal and Conditional Shell Command Injection

Content
View full analysis
... `; fs.writeFileSync(path.join(OUTPUT_DIR, `${fileName}.html`), htmlContent, 'utf8'); } saveAsMarkdown(content, fileName) { fs.writeFileSync(path.join(OUTPUT_DIR, `${fileName}.md`), content, 'utf8'); } ``` ```js saveAsPDF(content, fileName) { // 先保存为HTML this.saveAsHTML(content, fileName); // 尝试使用外部工具转换为PDF try { const htmlPath = path.join(OUTPUT_DIR, `${fileName}.html`); const pdfPath = path.join(OUTPUT_DIR, `${fileName}.pdf`); // 检查是否安装了wkhtmltopdf或其他PDF工具 execSync('wkhtmltopdf --version', { stdio: 'ignore' }); execSync(`wkhtmltopdf "${htmlPath}" "${pdfPath}"`, { stdio: 'ignore' }); console.log('📄 PDF报告已生成'); // 删除临时HTML文件 fs.unlinkSync(htmlPath); ``` ```js function main() { const args = process.argv.slice(2); if (args.length === 0) { console.log('用法: node report-generate.js <数据文件路径> [报告名称]'); console.log('示例: node report-generate.js ./data/cleaned-data.json 销售分析报告'); process.exit(1); } const dataPath = args[0]; const reportName = args[1] || 'data-report'; if (!fs.existsSync(dataPath)) { console.error('❌ 数据文件不存在:', dataPath); process.exit(1); } const generator = new ReportGenerator(); generator.generateReport(dataPath, reportName); } ``` ### Technical Analysis The report name is taken directly from a command-line argument. It is incorporated into a filename and passed to `path.join()` without basename enforcement or containment validation. Path components such as `../` can therefore cause output files to be written outsi ...[truncated 2666 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/report-generate.js:329
Finding

Untrusted Data and Titles Are Embedded into Generated HTML Without Context-Aware Escaping

Content
View full analysis
{ const metric = analysis.metrics[field]; metricsContent += `\n### ${field}\n`; metricsContent += `- 总计: ${metric.sum.toLocaleString()}\n`; metricsContent += `- 平均值: ${metric.average.toFixed(2)}\n`; metricsContent += `- 最小值: ${metric.min}\n`; metricsContent += `- 最大值: ${metric.max}\n`; metricsContent += `- 中位数: ${metric.median.toFixed(2)}\n`; }); ``` The resulting content is inserted directly into an HTML document: ```js const htmlContent = ` 数据分析报告 ... ${content} `; fs.writeFileSync(path.join(OUTPUT_DIR, `${fileName}.html`), htmlContent, 'utf8'); ``` The visualization generator also inserts a command-line title directly into the HTML `` context: ```js function wrapInHTML(svg, title) { return `<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>${title} body { margin: 0; padding: 20px; background: #f5f5f5; font-family: Arial, sans-serif; display: flex; justify-content: center; align-items: center; min-height: 100vh; } ... <body> <div class="chart-container"> ${svg} </div> </body> </html>`; } ``` ### Technical Analysis The report generator reads attacker-influenced JSON field names and uses them to construct report text. ...[truncated 2366 chars]
Remediation
View remediation
`. 3. Do not treat Markdown-like report content as trusted HTML. Render it with a maintained Markdown parser configured to disable raw HTML, or sanitize the rendered output with a strict allowlist. 4. Sanitize field names, insight messages, trend labels, template values, and any future raw-data excerpts. 5. Add a restrictive Content Security Policy, for example one that disables scripts and external object embedding. 6. Avoid inline event handlers and active SVG content. 7. Consider generating inert Markdown by default and requiring explicit selection of HTML output. 8. Add tests using payloads in: - JSON field names. - Command-line titles. - Template values. - String values included in future report features. 9. If reports are hosted, serve them from an isolated origin without authentication cookies or access to privileged application APIs. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是覆盖数据抓取、清洗、可视化、报告生成的一体化数据分析技能包;但提供的代码仅实现了数据清洗相关流程,以及简单的数据质量统计输出。它从本地文件读取数据,不包含网络抓取或自动采集逻辑;也没有图表、可视化输出;报告部分仅为控制台文本摘要,而非完整分析报告。代码的主要目的与声明中的“数据清洗”部分一致,但明显不足以支撑所宣称的完整能力范围,因此描述对实际行为有较大夸大,构成不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

描述与代码只有“数据抓取”部分基本一致,但整体存在明显能力夸大。该脚本的主要功能是通过命令行从网页或 API 拉取数据,做简单解析后保存到文件;数据库部分并未真正实现。它没有体现“数据分析技能包”中所说的清洗、可视化、生成报告等关键能力,因此描述不能准确代表代码实际行为,构成实质性不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个较完整的数据分析流程工具包,包括抓取、清洗、可视化和报告生成;但提供的代码仅实现了可视化子功能。它只从本地文件系统读取 CSV/JSON,解析数据后生成图表并保存为 SVG/HTML,没有任何网络抓取、数据清洗流水线、分析报告生成或自动化分析逻辑。因此描述显著夸大了代码能力,属于描述与实际行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

声明描述强调一个覆盖抓取、清洗、可视化、报告生成的综合型数据分析技能包,但提供的代码块仅对应“报告生成”子功能。它读取现有本地数据文件,进行基础统计、异常/完整性检查和简单时间趋势分析,然后按模板输出报告。代码中没有任何数据抓取、数据清洗或图表可视化生成逻辑,因此与声明的能力范围存在明显不一致。此外,PDF 输出依赖调用外部系统工具 wkhtmltopdf,这属于实际代码具备的额外执行能力,声明中未体现。综合来看,描述比代码行为宽泛得多,且遗漏了外部命令执行这一点,因此应判定为不匹配。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file documents network access and database connectivity as core functionality, including direct API and database examples. While there is a brief generic note about data security later, the description does not clearly warn users up front about privacy, credential handling, or the risk of transmitting sensitive business data to external endpoints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The document promotes install.bat and run.bat as one-click actions, but does not explain what they will do to the user's system or data before execution. For a skill that performs fetching, cleaning, visualization, and report generation, users should be warned that running these scripts may install dependencies, contact external resources, and create output files automatically.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly advertises web scraping, API access, and database connectivity, but does not warn users that using these features causes outbound network access and potential transmission of sensitive data, credentials, or queried content. In a data-analysis context, this matters because users may point the skill at internal APIs, authenticated endpoints, or regulated datasets without understanding the egress implications.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The header and all user-facing console messages are written in Chinese, indicating the skill is effectively limited to a specific language. The file does not provide any opt-in, configuration, or documentation explaining that the tool is region-specific, so this is a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's title, comments, usage output, and runtime messages are presented in Chinese, indicating a fixed language choice for users. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale constraint is documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · README.md (reported line 18)May include surrounding context.

md
console.log('  node data-fetch.js --db <连接字符串> --query <SQL>');
      console.log('\n示例:');
      console.log('  node data-fetch.js --url "https://example.com/data" --selector "table"');
      console.log('  node data-fetch.js --api "https://api.example.com/v1/data" --output data.json');
      return;
    }

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

md
console.log('  node data-fetch.js --db <连接字符串> --query <SQL>');
      console.log('\n示例:');
      console.log('  node data-fetch.js --url "https://example.com/data" --selector "table"');
      console.log('  node data-fetch.js --api "https://api.example.com/v1/data" --output data.json');
      return;
    }

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/data-fetch.js (reported line 250)May include surrounding context.

js
console.log('  node data-fetch.js --db <连接字符串> --query <SQL>');
      console.log('\n示例:');
      console.log('  node data-fetch.js --url "https://example.com/data" --selector "table"');
      console.log('  node data-fetch.js --api "https://api.example.com/v1/data" --output data.json');
      return;
    }

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script imports child_process and invokes wkhtmltopdf via execSync in saveAsPDF, which executes an external system binary. Although the command uses internally constructed file paths rather than obvious direct shell injection from user input, spawning external binaries expands the attack surface and can become dangerous if output paths, PATH resolution, or surrounding environment are manipulated; it is also beyond what is necessary for basic report generation in a skill context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The default configuration sets language: 'zh-CN', and the rest of the script emits Chinese messages and uses Chinese locale formatting, but there is no indication that users can opt into another language. This can violate language/locale policy because it forces a specific locale by default rather than offering choice or documenting a region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The configuration hard-codes the AI insights language to zh-CN, which imposes a specific language/locale choice in natural-language output. There is no indication elsewhere in the file that users can choose another locale or that this restriction is explicitly opt-in or justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The configuration forces generated AI insights to use the zh-CN locale via the language field. Per policy, a fixed language setting is a natural-language policy concern unless the skill offers user opt-in or clearly documents a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This manifest is entirely hard-coded for Chinese usage, including the name, description, title template, and date format using Chinese month/day notation. Because the file provides no language or locale opt-in and does not document that it is intentionally limited to a China-specific context, it violates the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

Most of the natural-language instructions and product positioning are presented only in Chinese, despite some English labels. Under the stated policy, forcing a specific language without offering user choice can be a locale/language policy issue unless clearly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill generates reports and output files but does not tell users that analysis artifacts may be written to disk and persist after execution. In data-analysis workflows, reports can contain sensitive business metrics or extracted records, so silent persistence increases accidental disclosure risk on shared machines or synced folders.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The generated HTML hard-codes lang="zh-CN", which imposes a specific language/locale on all outputs. The file does not offer a user opt-in or configuration for locale, and there is no clear region-specific justification documented in the script.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This JSON manifest-style file says the template is suitable for sales reports, market analysis, and business decisions, but it does not provide specific trigger phrases, scope boundaries, or exclusion conditions. That broad description could overlap with many ordinary business-analysis requests and lead to unintended template selection.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

This manifest-style JSON says the template is suitable for performance analysis, system monitoring, and technical metrics reports, but it does not define specific activation phrases, scope boundaries, or exclusion conditions. In a manifest context, such broad applicability can increase the chance of unintended invocation because there is no explicit trigger specificity or negative examples.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
scripts/report-generate.js:462