Back to skill

Security audit

DeepSeek-Harness-cordis-plugin-builder

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent plugin-building guide, not malware, but it includes review-worthy examples for unpinned code execution and unauthenticated HTTP endpoints.

Install only if you are comfortable using a Chinese-language DSH plugin-development guide. Review generated plugin code before running it, pin exact package versions, avoid npx -y on sensitive machines, and add authentication/session checks before using the HTTP endpoint examples.

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

T09 · Insecure Skill Coding Practices

Error
Location
references/30-capability/harness-integration.md:213
Finding

Unauthenticated HTTP Endpoint Exposes Session-Derived Topic Data

Content
View full analysis
webServer.register({ kind: 'exact', path: '/api/my-plugin/topics', handler(_req, res) { res.writeHead(200, { 'Content-Type': 'application/json' }) res.end(JSON.stringify(engine.getLatestTopics(sessionId))) }, })) } ``` ### Technical Analysis The documented HTTP handler returns session-derived topic data without authenticating the requester or verifying that the requester is authorized to access the referenced session. The request object is explicitly ignored, while `sessionId` is obtained from an ambient scope rather than from a trusted, authenticated server-side identity. The related client documentation states that these HTTP endpoints can be accessed using same-origin `fetch()` and that the `trustedHosts` restriction does not apply to ordinary HTTP requests. Same-origin routing is not an authorization mechanism. It does not protect the endpoint from: - Other components executing under the same origin. - A compromised or malicious client plugin. - Unauthorized local clients that can connect to the web server. - Remote clients if the server is bound or forwarded beyond localhost. - Cross-site request attacks where ambient cookie credentials are accepted. No request method restriction, session ownership validation, authentication check, or CSRF protection is shown. ### Attack Path 1. A developer follows the documented example and registers `/api/my-plugin/topics`. 2. The plugin reads topics derived from a DSH conversation session. 3. An unauthorized client, malicious same-origin plugin, or reachable local process requests the endpoint. 4. The handler ignores ...[truncated 904 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/10-setup/environment.md:24
Finding

Unpinned Third-Party Packages Are Installed and Executed with User Privileges

Content
View full analysis
Remediation
View remediation
pnpm exec dsh plugin --profile web add @kiwifruit/dsh-context-pro@ ``` 2. Avoid `npx -y` for packages that have not already been reviewed. Install a fixed version locally and execute it through the project lockfile. 3. Commit and review `pnpm-lock.yaml` or the applicable lockfile for project installations. 4. Verify package publisher identity, provenance, signatures, registry metadata, and integrity hashes where supported. 5. Inspect package contents and lifecycle scripts before installation, for example using package metadata and tarball inspection. 6. Use immutable commit hashes for GitHub dependencies rather than mutable branches or tags. 7. Test community plugins in an isolated environment with no production credentials or sensitive files. 8. Disable unnecessary install scripts and maintain the narrowest possible allowlist for dependencies that genuinely require native builds. 9. Keep the existing warning that plugins run with user privileges, but place it immediately before installation commands. 10. Update all marketplace and plugin examples to use placeholders such as `@` rather than presenting unpinned community packages as default commands. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • YARA SignaturesMalware Match, Webshell Match, Cryptominer Match
Findings (33)

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/10-setup/environment.md (reported line 49)May include surrounding context.

pro

3. 验证已生效

pnpm exec dsh plugin --profile web list

text

### 方式 B:全局安装

```bash
npm install -g @deepseek-ai/dsh
dsh --version      # 验证成功
# 后续可直接使用 dsh 命令
dsh plugin --profile web add <package>

若遇 EACCES 权限错误,推荐配置 npm 全局目录到用户空间:

bash
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc   # 或 ~/.zshrc
source ~/.bashrc
npm install -g @deepseek-ai/dsh

方式 C:npx 临时调用(零安装,推荐尝鲜)

bash
# 启动 Web UI
npx -y @deepseek-ai/dsh web

# 安装插件
npx @deepseek-ai/dsh plugin --profile web add <package>

# 卸载插件
npx @deepseek-ai/dsh plugin --profile web remove <package>

-y 自动确认下载,首次稍慢,后续使用 npx 缓存。

3. 安装后验证

bash
pnpm exec dsh plugin --profile web list

能正常列出已安装包即表示 DSH CLI 可用。

4.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/20-develop/identity-seam.md (reported line 376)May include surrounding context.

md
一句话:**换 agent 就是换 session,换 session 就是换身份宇宙。每个宇宙内部等式自洽,宇宙之间靠血统记录和 seed 传递显式关联,绝不共享身份标识。**

[Capability Seams](seams.md)
<!-- 作用域 Agent 注册(待补充) -->
[Cordis Waterfall Dispatch](events.md)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/20-develop/identity-seam.md (reported line 376)May include surrounding context.

md
一句话:**换 agent 就是换 session,换 session 就是换身份宇宙。每个宇宙内部等式自洽,宇宙之间靠血统记录和 seed 传递显式关联,绝不共享身份标识。**

[Capability Seams](seams.md)
<!-- 作用域 Agent 注册(待补充) -->
[Cordis Waterfall Dispatch](events.md)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/20-develop/identity-seam.md (reported line 479)May include surrounding context.

md
如果还想深入理解这套防御哲学,可以看看 <!-- 防御性模式(待补充) -->。

<!-- 防御性模式(待补充) -->
[Session Log and Events](agent-lifecycle.md)
[Capability Seams](seams.md)

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/20-develop/identity-seam.md (reported line 479)May include surrounding context.

md
如果还想深入理解这套防御哲学,可以看看 <!-- 防御性模式(待补充) -->。

<!-- 防御性模式(待补充) -->
[Session Log and Events](agent-lifecycle.md)
[Capability Seams](seams.md)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest description and the main heading are written entirely in Chinese, and the file does not indicate that other languages are supported or that Chinese is a justified requirement. Under the policy for natural-language violations, forcing a specific language without user opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document explicitly states that Creator mode is a high-trust development mode that executes model-generated code, but the warning is brief and embedded in reference material rather than presented as a prominent user-facing safety control. In a skill whose purpose is to teach plugin construction and troubleshoot plugin loading, this materially increases the chance that users will run untrusted generated code in their workspace without fully understanding the implications.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents the skill documentation entirely in Chinese from the title onward, with no indication that the user can choose another language or that the locale restriction is required for a region-specific purpose. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

The npx dsh xxx example is similarly unpinned and may resolve to whatever package/version is currently available to the user environment. That creates nondeterministic execution and a dependency-confusion/supply-chain window if the package source changes or a malicious release is published. Because this is an installation guide for extensible tooling, users may run it with broad trust and local access, increasing blast radius.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
86% confidence
Finding

The npx dsh xxx example is similarly unpinned and may resolve to whatever package/version is currently available to the user environment. That creates nondeterministic execution and a dependency-confusion/supply-chain window if the package source changes or a malicious release is published. Because this is an installation guide for extensible tooling, users may run it with broad trust and local access, increasing blast radius.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/10-setup/environment.md (reported line 47)May include surrounding context.

若遇 EACCES 权限错误,推荐配置 npm 全局目录到用户空间:

bash
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc   # 或 ~/.zshrc
source ~/.bashrc

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

npx -y @deepseek-ai/dsh web automatically downloads and executes the latest package without prompting, removing a user checkpoint while preserving the same supply-chain risk. If the package or one of its dependencies is compromised, arbitrary code could run immediately under the user's account. The danger is increased here because the command is positioned as a convenience path for newcomers, who are less likely to validate what gets executed.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The unpinned npx @deepseek-ai/dsh plugin --profile web add <package> command can fetch and run whichever current release is available at execution time. That enables unexpected code execution if the package, registry path, or transitive dependencies are compromised. In a plugin-management workflow, this is especially risky because it may directly lead users into installing additional code with local file and network access.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The unpinned npx @deepseek-ai/dsh plugin --profile web remove <package> command has the same runtime package-fetch risk as the other npx examples. Even though the user intent is removal, the CLI itself must still be downloaded/executed first, so a malicious upstream package could still run arbitrary code. The context makes this more dangerous because users may assume cleanup operations are inherently safe and lower their guard.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

Line L48 recommends adding a scripts/ directory for dynamic scripts, which implies executable custom code, but provides no user warning about potential system-impacting behavior. For markdown files, safety-relevant behaviors that could affect system integrity should be accompanied by disclosure or cautionary guidance.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The title and all instructional content in this file are written in Chinese, with no indication that users may choose another language or that the document is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all instructions and usage guidance exclusively in Chinese, which effectively forces a specific language on users. The policy allows locale constraints only when the skill offers opt-in or clearly documents a justified region-specific limitation, neither of which appears here.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown explains that hooks run as external shell commands and may write data to external storage such as files or databases. Under the markdown-specific SQP-2 criteria, the document should explicitly warn users that these behaviors can affect local data and system state, but it presents them as architecture details without a user-facing caution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill document is written in Chinese and does not provide any indication that language selection is optional or that the content is intentionally restricted to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is clearly justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file explains that cordis_define submits JS code and cordis_run activates it in the current process, and recommends it for experiments or temporary extensions. While it notes technical constraints such as restart loss, it does not explicitly warn users that running such code can affect system behavior, state, or integrity because it executes inside the current process.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file title and the entire instructional content are written in Chinese, with no indication that other languages are supported or that the language choice is intentional and user-selectable. Under the policy rule, forcing a specific language without opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file contains all user-facing instructional content in Chinese, and there is no indication that users may choose another language or that the document is intentionally restricted to a Chinese-speaking audience. That can violate language/locale policy when a skill forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file is written with a Chinese title and Chinese instructional content, but it does not indicate that the language choice is optional or tied to a region-specific requirement. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown file is entirely written in Chinese beginning at L001, and it does not indicate that the skill is region-specific or that users may choose another language. Under the policy rule for natural-language violations, forcing a specific language without opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file title and all instructional content are written entirely in Chinese, with no indication that language selection is optional or that the skill is region-specific. Under the stated policy, forcing a specific language/locale without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.