Back to skill

Security audit

Changshu Dev Assistant

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a coherent developer/database assistant, but it includes under-scoped high-impact integrations that users should review before installing.

Install only if you are comfortable reviewing and controlling the external integrations. Avoid using the generic `run <skill>` feature with untrusted skills, do not place database passwords on the command line, use only approved HTTPS LLM endpoints, and treat any SQL/code/chat content submitted to the LLM as leaving your machine. Review or remove the external dm_converter dependency path before using SQL conversion or diagnostics.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (6)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/dameng_tool.py:226
Finding

Unverified Dynamic Import of a Mutable External Converter Module

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/changshu_assistant_main.py:110
Finding

LLM Credentials and Prompt Data Can Be Transmitted over Plaintext HTTP

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/dameng_tool.py:1239
Finding

Database Password Accepted as a Plaintext Command-Line Argument

Content
View full analysis
2 else '' if subcmd != 'connect': print("错误: test子命令仅支持 connect") print("用法: python dameng-tool.py test connect [host] [port] [user] [password]") return host = sys.argv[3] if len(sys.argv) > 3 else 'localhost' port = int(sys.argv[4]) if len(sys.argv) > 4 else 5236 user = sys.argv[5] if len(sys.argv) > 5 else '' password = sys.argv[6] if len(sys.argv) > 6 else '' result = tool.test_connect(host=host, port=port, user=user, password=password) print(tool.format_connect_result(result)) if not result["connected"]: sys.exit(1) ``` The documented usage reinforces this unsafe interface: ```text python3 scripts/dameng_tool.py test connect host port user password ``` ### Technical Analysis The database password is passed as a positional process argument. Depending on the operating system and deployment environment, command arguments can be exposed through process listings, process telemetry, shell history, audit logs, terminal recording, orchestration metadata, wrapper scripts, and diagnostic reports. The password is legitimately transmitted to the explicitly selected Dameng database through `dmPython.connect()`. The vulnerability is not the database connection itself, but the unnecessary exposure of the secret before it reaches the driver. ### Attack Path 1. A user follows the documented command and enters a database password directly in the shell. 2. The shell may save the command, including the password, in its history. 3. While the process is running, another local account or monitoring component may inspect its command line. 4. Process collectors, CI systems, terminal logs, or suppo ...[truncated 635 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/dameng_tool.py:884
Finding

Unvalidated Schema Identifier Is Interpolated into SQL

Content
View full analysis
Dict: """测试达梦数据库连接(需要dmPython,可选依赖) Args: host: 数据库主机地址 port: 端口号(达梦默认5236) user: 用户名 password: 密码 schema: 目标SCHEMA(可选) """ # ... conn = dmPython.connect( user=user, password=password, server=host, port=port ) result["connected"] = True cursor = conn.cursor() # 切换SCHEMA(如果指定) if schema: cursor.execute(f"SET SCHEMA {schema}") ``` ### Technical Analysis The public `test_connect()` method directly interpolates `schema` into an SQL statement. Parameterized value placeholders generally cannot be used for database identifiers, but this does not make raw interpolation safe. The identifier must be validated and quoted according to the database's identifier rules. The currently inspected command-line path does not expose a schema argument, which reduces immediate exploitability. Other Python callers can nevertheless invoke this public method with untrusted input. Exploitation also depends on whether the Dameng driver accepts stacked statements or another syntactically valid injection form. ### Attack Path 1. Another component calls `test_connect()` and allows an untrusted user to control the `schema` argument. 2. The attacker provides input containing identifier delimiters or additional SQL syntax. 3. The method builds `SET SCHEMA` by direct string interpolation. 4. The database parses the resulting statement. 5. If the supplied syntax is accepted, attacker-selected SQL behavior occurs under the database account used for the connection. ### Impact Assessment Potential impact is ...[truncated 428 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
templates/QUICKSTART.md:18
Finding

Installation Guidance Uses Unpinned Third-Party Dependencies

Content
View full analysis
Remediation
View remediation

other

Warning
Location
templates/QUICKSTART.md:190
Finding

Privacy Documentation Incorrectly Claims That Data Is Never Uploaded

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (57)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Prompt template CRUD and rendering with persistence to local files are materially different from the stated database-migration/security-scan/search focus. Hidden local write behavior can surprise users, create persistence they did not expect, and expand the attack surface when combined with shell or LLM workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Prompt template CRUD and rendering with persistence to local files are materially different from the stated database-migration/security-scan/search focus. Hidden local write behavior can surprise users, create persistence they did not expect, and expand the attack surface when combined with shell or LLM workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

Prompt template CRUD and rendering with persistence to local files are materially different from the stated database-migration/security-scan/search focus. Hidden local write behavior can surprise users, create persistence they did not expect, and expand the attack surface when combined with shell or LLM workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Prompt template CRUD and rendering with persistence to local files are materially different from the stated database-migration/security-scan/search focus. Hidden local write behavior can surprise users, create persistence they did not expect, and expand the attack surface when combined with shell or LLM workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Prompt template CRUD and rendering with persistence to local files are materially different from the stated database-migration/security-scan/search focus. Hidden local write behavior can surprise users, create persistence they did not expect, and expand the attack surface when combined with shell or LLM workflows.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Prompt template CRUD and rendering with persistence to local files are materially different from the stated database-migration/security-scan/search focus. Hidden local write behavior can surprise users, create persistence they did not expect, and expand the attack surface when combined with shell or LLM workflows.

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

md
python3 scripts/dameng_tool.py check input.sql

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
python3 scripts/dameng_tool.py check input.sql

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
python3 scripts/dameng_tool.py check input.sql

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
python3 scripts/dameng_tool.py check input.sql

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/dameng_tool.py check input.sql

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/dameng_tool.py check input.sql

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

This block enables inspection and, more importantly, execution of arbitrary Hermes skills via subprocess based on user input. That is a significant capability expansion unrelated to the declared purpose and can expose users to prompt injection, sensitive data access, or execution of risky downstream tooling through untrusted skills.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill documents capabilities that imply shell execution, filesystem access, environment-variable access, and network use, but it does not declare any explicit tool scope or permission boundaries. In an agent setting, this increases the chance of over-broad execution or user surprise, especially because the skill also supports DB connectivity and LLM-backed operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The documentation shows a command that passes database credentials on the command line, which can expose secrets via shell history, process listings, audit logs, and terminal recordings. In a development-assistant context, this is especially risky because users may copy-paste the example verbatim into shared or monitored environments.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill documents external LLM/API configuration and interactive chat usage but does not warn that prompts, code, SQL, or project data may be transmitted to third-party model providers. This can lead to accidental disclosure of proprietary source, credentials, schema details, or regulated data.

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 user-facing content in Chinese, including headings, descriptions, and recommendations, with no indication that the user can choose another language. The policy explicitly calls for flagging language or locale constraints when they are forced without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 187)May include surrounding context.

md
| Line (pre-fix) | Hardcoded Value | Fix |
|---|---|---|
| `LLMClient.__init__` | `model_name='gpt-3.5-turbo'`, `provider='openai'` | New `_resolve()` method: env var → config.yaml → empty string |
| `_call_openai` | `api_base or "https://api.openai.com/v1"` | Empty-check with error message, no fallback URL |
| `_call_anthropic` | `api_base or "https://api.anthropic.com/v1"` | Same pattern |
| `call_llm` | `if self.provider == 'openai'` routing | Default route is openai-compatible for any non-anthropocustom provider |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/hardcoding-audit-2026-06-20.md (reported line 9)May include surrounding context.

md
| Line (pre-fix) | Hardcoded Value | Fix |
|---|---|---|
| `LLMClient.__init__` | `model_name='gpt-3.5-turbo'`, `provider='openai'` | New `_resolve()` method: env var → config.yaml → empty string |
| `_call_openai` | `api_base or "https://api.openai.com/v1"` | Empty-check with error message, no fallback URL |
| `_call_anthropic` | `api_base or "https://api.anthropic.com/v1"` | Same pattern |
| `call_llm` | `if self.provider == 'openai'` routing | Default route is openai-compatible for any non-anthropocustom provider |

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 187)May include surrounding context.

md
|---|---|---|
| `LLMClient.__init__` | `model_name='gpt-3.5-turbo'`, `provider='openai'` | New `_resolve()` method: env var → config.yaml → empty string |
| `_call_openai` | `api_base or "https://api.openai.com/v1"` | Empty-check with error message, no fallback URL |
| `_call_anthropic` | `api_base or "https://api.anthropic.com/v1"` | Same pattern |
| `call_llm` | `if self.provider == 'openai'` routing | Default route is openai-compatible for any non-anthropocustom provider |

### config.yaml

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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 · references/hardcoding-audit-2026-06-20.md (reported line 10)May include surrounding context.

md
|---|---|---|
| `LLMClient.__init__` | `model_name='gpt-3.5-turbo'`, `provider='openai'` | New `_resolve()` method: env var → config.yaml → empty string |
| `_call_openai` | `api_base or "https://api.openai.com/v1"` | Empty-check with error message, no fallback URL |
| `_call_anthropic` | `api_base or "https://api.anthropic.com/v1"` | Same pattern |
| `call_llm` | `if self.provider == 'openai'` routing | Default route is openai-compatible for any non-anthropocustom provider |

### config.yaml

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file contains only Chinese-language content and does not indicate that the user can choose another language or that the skill is intentionally limited to a Chinese-speaking audience for a specific reason. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

技能清单描述将该技能定位为“以达梦数据库工具为核心,专注SQL Server→达梦迁移、代码安全扫描、知识库搜索”,但本文件把“测试用例生成、测试运行和覆盖率分析”描述为已集成的完整核心能力。这不是实现上述三项既有目标的显然必要细节,而是一个额外的功能域,导致技能宣称范围与文档描述的实际能力不一致。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The implementation materially exceeds the declared scope by acting as a general LLM assistant with outbound API access, while the manifest emphasizes Dameng migration, code scanning, and knowledge search. Scope drift is dangerous because users may trust the narrower description and unknowingly send sensitive prompts or trigger capabilities they did not expect.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

User prompts are sent to external model providers whenever configured, but the interface does not warn users, obtain confirmation, or clearly identify the destination. In a developer/database assistant, prompts may contain source code, SQL, credentials, internal hostnames, or incident data, so silent transmission materially increases confidentiality risk.

Content

No source excerpt is available for this finding.