Back to skill

Security audit

zentao-api-old

Security checks for vulnerabilities and agentic risk

Overview

This ZenTao integration is coherent, but it needs review because it handles passwords and sessions insecurely while enabling live changes and deletes in a project-management system.

Install only after reviewing the credential and write-action risks. Use a least-privilege ZenTao account, prefer a test instance first, require HTTPS, do not print credentials, keep TOOLS.md and .zentao/ out of source control, restrict file permissions, and manually confirm any delete, close, cancel, restore, admin, or bulk operation before running it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (5)

T09 · Insecure Skill Coding Practices

Error
Location
TOOLS.md:1
Finding

Plaintext credential storage and credential disclosure through diagnostic output

Content
View full analysis
Optional[Dict[str, str]]: """Read ZenTao credentials from TOOLS.md""" tools_path = Path(__file__).parent.parent / "TOOLS.md" if not tools_path.exists(): return None content = tools_path.read_text(encoding="utf-8") # Locate the ZenTao configuration section zentao_section_start = -1 zentao_section_end = -1 lines = content.split("\n") for i, line in enumerate(lines): if "## ZenTao API" in line or "## ZenTao" in line: zentao_section_start = i elif ( zentao_section_start >= 0 and line.strip().startswith("## ") and zentao_section_start not in [i] ): zentao_section_end = i break if zentao_section_start < 0: return None if zentao_section_end < 0: zentao_section = "\n".join(lines[zentao_section_start:]) else: zentao_section = "\n".join(lines[zentao_section_start:zentao_section_end]) endpoint = None username = None password = None for line in zentao_section.split("\n"): line = line.strip() if "API Address" in line and ":" in line: endpoint = line.split(":")[-1].strip().strip("*").strip() elif "Username" in line and ":" in line: username = line.split(":")[-1].strip().strip("*").strip() elif "Password" in line and ":" in line: password = line.split(":")[-1].strip().strip("*").strip() if endpoint and username and password: return {"endpoint": endpoint, "username": username, "password ...[truncated 1862 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
lib/zentao_client.py:49
Finding

Authentication sessions are persisted in plaintext without restrictive file permissions

Content
View full analysis
Path: """Get the session file path""" key = f"{self.endpoint}:{self.username}" key_hash = hashlib.md5(key.encode()).hexdigest()[:16] return self.session_dir / f"{key_hash}.json" def _save_session(self) -> bool: """Save the session to a file""" try: if not self.sid or not self.session: return False session_file = self._get_session_file() data = { "endpoint": self.endpoint, "username": self.username, "sid": self.sid, "cookies": self.session.cookies.get_dict(), } session_file.write_text(json.dumps(data, ensure_ascii=False, indent=2)) return True ``` ### Technical Analysis The client automatically persists the ZenTao session identifier and all session cookies as unencrypted JSON under the project directory. The directory and file are created using process defaults without explicit restrictive permissions such as `0700` for the directory and `0600` for the file. The truncated MD5-derived filename does not protect the contents; it only obscures the endpoint and username used to select the file. Anyone able to enumerate or read the session directory can recover the authentication material directly. Project-local storage also increases the chance that session files will be included in source-control commits, project archives, backups, or artifact uploads. ### Attack Path 1. A user authenticates through `ZenTaoCl ...[truncated 898 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
lib/zentao_client.py:156
Finding

Credentials and authenticated traffic may be transmitted over unencrypted HTTP

Content
View full analysis
/") print("- **Username:** ") print("- **Password:** ") ``` ### Technical Analysis The endpoint is accepted without scheme validation, and project documentation explicitly recommends an `http://` URL. When HTTP is selected, the client submits the account name and password as form data over an unencrypted connection. Subsequent session identifiers, cookies, API requests, and response data are also exposed to interception and modification. Request timeouts do not provide transport security. Although `requests` verifies certificates for HTTPS by default, that protection is irrelevant when the configured endpoint uses HTTP. ### Attack Path 1. A user follows the documented example and configures an `http://` ZenTao endp ...[truncated 867 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
lib/zentao_client.py:164
Finding

Session identifiers are exposed in request query strings

Content
View full analysis
`. 2. A reverse proxy, ZenTao server, monitoring platform, or diagnostic system records the complete request URL. 3. An attacker or overly broad support account obtains access to those logs. 4. The attacker extracts the SID. 5. The attacker appends the SID to requests sent to the same ZenTao deployment. 6. If the session is still valid, the attacker assumes the victim's authenticated application context. ### Impact Assessment Successful replay provides the permissions associated with the victim's active session. Exposure may affect every operation supported by the client, including access to project records and state-changing or destructive actions. The practical duration of access depends on session expiration, revocation behavior, and any server-side session binding. ]]>
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:4
Finding

Unbounded and unhashed third-party dependency resolution

Content
View full analysis
=2.28.0 ``` ### Technical Analysis The dependency specification sets only a minimum version. Every installation may therefore resolve to a different future version of `requests` and its transitive dependencies. No lock file or package hashes are supplied to verify that reviewed artifacts are installed. This is not evidence that the current `requests` package is malicious. It is a supply-chain hardening weakness because a future compromised release, compromised package index, or unexpected compatibility change could enter the environment without a source change in this project. ### Attack Path 1. A user or automated deployment executes `pip install -r requirements.txt`. 2. The package resolver selects the newest release satisfying `requests>=2.28.0` and resolves transitive dependencies dynamically. 3. A future package release or distribution artifact is compromised, or dependency resolution is redirected to an untrusted index. 4. The compromised package is installed without hash verification. 5. Its code executes during installation or when imported by `zentao_client.py`. 6. The malicious code gains the privileges of the process running the Skill. ### Impact Assessment A compromised dependency executes within the Skill process and could access ZenTao credentials, persisted sessions, API responses, local files readable by the process, and network resources available to the host. The operating-system impact is bounded by the privileges of the installation and runtime accounts, but it may be severe if dependencies are installed or the Skill is run with elevated privileges. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • 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 (120)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README instructs users to store the ZenTao endpoint, username, and password in plaintext in TOOLS.md, with no warning about secret exposure, file permissions, or source-control leakage. In a skill repository, this can lead to credential compromise through accidental commit, workspace exposure, or downstream tool access, enabling unauthorized access to the ZenTao instance.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The troubleshooting guidance explicitly tells users to print the full credentials object to verify endpoint, username, and password correctness. That can expose secrets in console output, logs, transcripts, notebooks, CI logs, or agent memory, creating a straightforward path to credential disclosure and subsequent unauthorized access to the ZenTao instance.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

The batch action endpoint explicitly supports a delete action, which can affect multiple documents at once, but the documentation provides no warning about bulk data loss or destructive impact. For markdown files, SQP-2 requires warnings when described behavior could affect user data or system integrity.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

Scanner excerpt · docs/my.md (reported line 210)May include surrounding context.

md
| 属性 | 值 |
|------|-----|
| 方法 | GET/POST |
| 路径 | `/my-changePassword.json` |
| 描述 | 修改用户密码 |

**参数列表**

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README encourages natural-language driven creation, modification, and closure of ZenTao artifacts without clearly warning that these are live, state-changing operations against a remote project-management system. In an agent/skill context, this increases the chance of accidental destructive or unauthorized actions because users may treat examples as informational rather than operational.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger list includes very broad terms such as '任务' and 'bug', which can match many ordinary user requests and cause the skill to activate when the user did not intend to use the ZenTao integration. Because this skill supports state-changing operations like create, assign, close, and delete, unintended invocation raises the risk of accidental writes or destructive actions in a real project-management system.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation presents destructive and state-changing APIs such as canceling and deleting tasks as routine examples without prominent safety warnings, confirmation requirements, or guidance on least-privilege use. In context, this skill directly targets a production project-management system, so normalizing destructive operations increases the chance of accidental data loss or unauthorized workflow changes if the agent invokes them too readily.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

This example directly instructs printing the credentials structure, which is a clear secret-handling flaw. In the context of an agent skill, outputs may be captured in chat history or telemetry, so exposing authentication material is even more dangerous than in a local-only script.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file describes a "删除日志" endpoint that clears system logs, which can affect user data and system auditability. The description lists only the path and parameter but provides no warning that the action is destructive or potentially irreversible.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file documents multiple admin endpoints for system configuration and maintenance, including 系统配置, 插件管理, 缓存管理, and 系统优化, but provides no warning that these actions can affect system integrity, availability, or existing data. Under the markdown-specific SQP-2 criteria, documentation should disclose potentially impactful behavior to users when describing administrative operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation advertises multiple high-risk administrative and introspection endpoints, including dynamic module/method execution, API debugging, SQL querying, log access, authentication/key management, and rate-limit/cache configuration, without any visible warning about authorization requirements, operational risk, or safe-use constraints. Even as documentation, this materially lowers the barrier to misuse by revealing powerful attack surface and may encourage unsafe use if these endpoints are exposed or insufficiently protected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown file documents an API endpoint for restoring data from backup, which can directly affect existing user data and system state. The description only states the function of the endpoint and does not include any warning about overwrite risk, recovery implications, or the need for caution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The markdown documents an endpoint that deletes backup files, which is a destructive and potentially irreversible action. Although a 'confirm' parameter exists, the documentation does not provide any explicit warning to users that deleting a backup may permanently remove recovery data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file documents a deletion operation (删除区块) but provides no warning about its impact on user data, reversibility, or need for confirmation. Under the markdown-specific SQP-2 criteria, destructive behaviours that could affect user data or system state should include a user-facing warning in the skill description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description explicitly says 永久关闭区块 (permanently close block), which indicates an irreversible or destructive operation. The markdown does not include any caution, confirmation note, or explanation of consequences, so users are not warned about the system-impacting behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file describes a destructive operation, deleting a branch, but provides no warning about data loss, reversibility, or safe-use considerations. Although a confirm parameter exists, the documentation does not explain its effect or warn users that invoking this endpoint can permanently change system state.

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 a delete operation (删除Bug) and a confirmation parameter, but it does not include any warning about permanent data loss, recovery limitations, or the need for careful user confirmation. Under the markdown-specific SQP-2 criteria, descriptions of behaviors that can affect user data should disclose such risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file describes destructive operations such as deleting a version and unlinking related records, but it does not include any warning that these actions modify or remove data. Under the markdown-specific warning criterion, users should be alerted when documented behavior can affect user data or system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The sections for unlinking stories and bugs, including batch unlink operations, describe actions that can alter project data relationships at scale but provide no cautionary note. The absence of any warning in the markdown leaves users uninformed about potentially disruptive data changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This is a markdown file, so SQP-2 applies to missing user warnings in documentation. The file documents endpoints for editing company information and managing permissions/settings, which can affect organizational data and system integrity, but it provides no warning or cautionary note about these sensitive operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This documentation exposes multiple state-changing CI/CD operations such as triggering, canceling, retrying, and reconfiguring Jenkins builds without any cautionary note about authorization, side effects, or operational risk. In a build-management context, these actions can disrupt pipelines, overwrite expected build behavior, or leak sensitive artifacts if readers assume they are safe to call directly.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file describes multiple import and migration operations, including user, task, bug, document, and cross-system migration endpoints, which can affect stored data. Under the markdown criteria for missing warnings, the documentation should disclose risks such as overwriting, duplication, or integrity impacts, but no such warning appears anywhere in the file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file documents a destructive operation, deleting a scheduled task, but provides no warning about the impact of permanent removal or possible effects on task execution/history. Under the markdown-specific warning rule, descriptions that affect user data or system integrity should disclose the risk to users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file documents a delete operation for departments, including a confirmation parameter, but it does not include any warning about data loss, irreversible effects, or operational impact on department structure. Under the markdown-specific SQP-2 criteria, destructive behaviors that can affect user data or system integrity should be accompanied by an explicit warning in the skill description.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents all user-facing documentation exclusively in Chinese, and there is no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific audience. Under the policy for natural-language violations, forcing a specific language without opt-in is a reportable issue.

Content

No source excerpt is available for this finding.