Back to skill

Security audit

ZenTao Analytics

Security checks for vulnerabilities and agentic risk

Overview

This looks like a ZenTao analytics skill, but its documentation overstates real ZenTao access and its CSV export has a report-opening risk.

Install only if you are comfortable reviewing a Chinese-language, early-stage ZenTao analytics skill. Treat the current analyzer as demo/mock code, use read-only ZenTao credentials, avoid broad database accounts, and be careful opening generated CSV files in spreadsheet software until CSV escaping and formula neutralization are fixed.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/export-metrics.js:38
Finding

CSV Formula Injection in Metrics Export

Content
View full analysis

Vulnerability Details

File Location: scripts/export-metrics.js:38-42; scripts/analyze-tasks.js:221-225
Vulnerability Type: CSV Formula Injection and Improper CSV Escaping
Risk Level: Medium

Vulnerable Code

scripts/export-metrics.js:38-42:

js
const headers = Object.keys(data[0]).join(',');
const rows = data.map(item => 
  Object.values(item).map(v => `"${v}"`).join(',')
).join('\n');

const csv = headers + '\n' + rows;

scripts/analyze-tasks.js:221-225:

js
} else if (format === 'csv') {
  const headers = Object.keys(metrics[0]).join(',');
  const rows = metrics.map(m => Object.values(m).join(',')).join('\n');
  const csv = headers + '\n' + rows;
  const outputPath = path.join(outputDir, `zentao-report-${timestamp}.csv`);

Technical Analysis

Both CSV generation implementations serialize values without neutralizing spreadsheet formula prefixes such as =, +, -, and @. When a CSV file is opened in spreadsheet software, a cell beginning with one of these characters may be interpreted as a formula rather than plain text.

Quoting a value, as done in export-metrics.js, does not reliably prevent formula evaluation. That implementation also fails to escape embedded double quotes. The implementation in analyze-tasks.js does not quote or escape commas, quotes, carriage returns, or newlines at all, allowing malformed rows and potentially enabling additional cell-boundary manipulation.

The directly exploitable input path is export-metrics.js, which accepts an arbitrary JSON file through the --input argument and exports its values to CSV. The analyzer currently uses hard-coded sample data, so external exploitation through that script is presently limited. However, its documented and intended design is to consume ZenTao API or database data, at which point attacker-controlled task or employee fields would reach the vulnerable CSV serializer.

Attack Path

...[truncated 1578 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace manual CSV construction with a maintained CSV serialization library that correctly handles commas, quotes, carriage returns, and newlines.
  2. Convert every value to a string and neutralize cells whose first non-whitespace character is =, +, -, or @. A common defense is to prefix such values with an apostrophe before CSV serialization.
  3. Apply the same protection to both headers and data values.
  4. Do not rely on surrounding a value with double quotes to prevent formula execution; CSV quoting controls field parsing, not spreadsheet formula interpretation.
  5. Validate imported JSON structure and reject unexpected nested objects or unsupported value types.
  6. Add automated tests covering:
    • Formula-leading values
    • Embedded double quotes
    • Commas
    • Carriage returns and newlines
    • Leading whitespace before formula prefixes
    • Null, undefined, object, and array values
  7. Apply the hardened serializer consistently in both scripts/export-metrics.js and scripts/analyze-tasks.js before enabling real ZenTao API or database ingestion.
  8. Document that exported reports may contain externally supplied text and should be opened using spreadsheet clients with external links and dangerous formula features disabled.
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (15)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

A second description-behavior mismatch suggests undeclared local file read/write, missing actual ZenTao connectivity, and unsupported claimed features. In a performance-analytics context involving employee data, such inconsistencies are security-relevant because they can mask where sensitive data is sourced, stored, or exported, leading to unauthorized retention or disclosure.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

A second description-behavior mismatch suggests undeclared local file read/write, missing actual ZenTao connectivity, and unsupported claimed features. In a performance-analytics context involving employee data, such inconsistencies are security-relevant because they can mask where sensitive data is sourced, stored, or exported, leading to unauthorized retention or disclosure.

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 40)May include surrounding context.

md
node scripts/analyze-tasks.js --start 2026-02-01 --end 2026-02-28

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/analyze-tasks.js --start 2026-02-01 --end 2026-02-28

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/analyze-tasks.js --start 2026-02-01 --end 2026-02-28

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
node scripts/analyze-tasks.js --start 2026-02-01 --end 2026-02-28

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/zentao-config.md (reported line 12)May include surrounding context.

export ZENTAO_URL=https://your-zentao.com export ZENTAO_API_KEY=your_api_key_here

或在 .env 文件中配置

ZENTAO_URL=https://your-zentao.com ZENTAO_API_KEY=your_api_key_here

text

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill documents use of environment variables and network/database access but do not declare any explicit tool scope, permissions, or allowed-tools boundaries. In an agent setting, this can enable broader-than-expected access to secrets or outbound connections, increasing the risk of unintended data exposure from ZenTao or the host environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description and the substantive user-facing instructions throughout SKILL.md are written in Chinese, which effectively forces a specific language for use of the skill. The policy allows locale constraints only when the skill offers a language choice or clearly documents a justified regional limitation, neither of which is present here.

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 instructions, labels, and report templates exclusively in Chinese, with no indication that the user can choose another language. Under the policy for natural-language violations, forcing a specific language without user opt-in is reportable unless the locale constraint is explicitly documented and justified, which it is not here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file presents all operational instructions, warnings, and examples exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or a documented justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The header comment lists '从禅道 API/数据库获取任务数据' as a function of the script. In code, fetchTaskData states that real API/database querying is not implemented yet and returns hard-coded sample records instead, which directly contradicts the documented behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest and module header describe a ZenTao task analytics skill that accesses the ZenTao API/database and analyzes employee task data. However, fetchTaskData explicitly returns simulated demo data and the real API/DB access is only a TODO comment, so the implemented behavior does not match the claimed data-source behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language strings exclusively in Chinese in the top-level description and runtime console output, which effectively imposes a specific language on users. The policy allows locale constraints only when opt-in or clearly justified as region-specific, but this file provides neither user choice nor a documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script explicitly formats the report timestamp with toLocaleString('zh-CN'), and the surrounding user-facing output is also fixed in Chinese. This imposes a specific language/locale choice without offering the user a way to select or opt into it.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/analyze-tasks.js:18