Back to skill

Security audit

OpenNexum TS

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its orchestration purpose, but it needs Review because its init command persistently changes agent instruction files and its generated prompts can turn contract text into shell commands.

Install only after reviewing the `nexum init` behavior and generated prompts. Avoid storing Telegram bot tokens in project config, keep notifications disabled unless task metadata can be sent to Telegram, and do not let untrusted users control contract YAML fields that are used to generate shell commands.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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 (3)

T02 · Agent Memory Poisoning

Error
Location
packages/cli/src/commands/init.ts:14
Finding

Persistent Modification of Agent Instruction Files During Initialization

Content
View full analysis
"; const CALLBACK_BLOCK_END = ""; const CALLBACK_PROTOCOL_BLOCK = `${CALLBACK_BLOCK_START} ## Nexum 回调协议(必须遵守) 每完成一个 nexum 任务后,必须执行: \`\`\` nexum callback --project \`\`\` 这一步会触发评估流程和 Telegram 通知,不可跳过。 ${CALLBACK_BLOCK_END} `; async function upsertCallbackProtocol( projectDir: string ): Promise<{ result: "created" | "updated" | "unchanged"; targetFile: string; }> { const agentsPath = path.join(projectDir, "AGENTS.md"); const claudePath = path.join(projectDir, "CLAUDE.md"); const targetPath = (await fileExists(agentsPath)) ? agentsPath : claudePath; const blockPattern = new RegExp( `${CALLBACK_BLOCK_START}[\\s\\S]*?${CALLBACK_BLOCK_END}\\n?`, "g" ); if (!(await fileExists(targetPath))) { await writeFile(targetPath, CALLBACK_PROTOCOL_BLOCK + "\n", "utf8"); return { result: "created", targetFile: targetPath }; } const current = await readFile(targetPath, "utf8"); const withoutExistingBlock = current.replace(blockPattern, "").trimEnd(); const next = `${withoutExistingBlock ? `${withoutExistingBlock}\n\n` : ""}` + `${CALLBACK_PROTOCOL_BLOCK}\n`; if (next === current) { return { result: "unchanged", targetFile: targetPath }; } await writeFile(targetPath, next, "utf8"); return { result: "updated", targetFile: targetPath }; } // In runInit: const { result: callbackResult, targetFile: callbackTarget } = await upsertCallbackProtocol(projectDir); ``` ### Technical Analysis The documented `nexum init` operation writes a mandatory callback protocol into either `AGENTS.md` or `CLAUDE.md`. These files are commonly loaded as authoritative instructions by coding agents. The insert ...[truncated 1796 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
packages/cli/src/commands/complete.ts:166
Finding

Contract-Controlled Values Are Embedded in an Agent-Executed Shell Command

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
packages/cli/src/commands/callback.ts:15
Finding

Telegram Bot Tokens May Be Stored in Plaintext Project Configuration

Content
View full analysis
({})); const notifyConfig = (config as Record).notify as | Record | undefined; const chatId = notifyConfig?.target ?? process.env['TELEGRAM_CHAT_ID']; const botToken = notifyConfig?.botToken ?? process.env['TELEGRAM_BOT_TOKEN']; if (chatId && botToken) { const message = [ '✅ Generator 完成', '━━━━━━━━━━━━━━━', `📋 任务内容: ${task.name}`, `🆔 任务ID: ${taskId}`, '💬 等待编排者触发 eval', ].join('\n'); await sendMessage(chatId, message, botToken); } ``` The configuration type explicitly permits the token: ```ts export interface NotifyConfig { target?: string; botToken?: string; } ``` ### Technical Analysis The callback accepts `notify.botToken` from `nexum/config.json`. This is an ordinary project configuration file and may be committed to version control, copied into support archives, included in build contexts, or exposed to coding agents. Although environment-variable fallback is supported and `SKILL.md` recommends `TELEGRAM_BOT_TOKEN`, the application still makes plaintext token storage in a project file a supported configuration path. This expands secret exposure beyond the process environment. Telegram Bot API authentication places the bot token in the request URL. That use is required by Telegram's API format, but it increases the importance of keeping the token out of logs and persistent project files. ### Attack Path 1. A user configures `notify.botToken` in `nexum/config.json` because the application supports it. 2. The proje ...[truncated 1086 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (108)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

If only notification or templating behavior is implemented while ACP/OpenClaw orchestration is absent, the skill is materially misdescribed. In a security review, undisclosed divergence is dangerous because approval decisions depend on truthful disclosure of network, filesystem, and secret-accessing behavior.

Content

No source excerpt is available for this finding.

Context Leakage

High
Category
Data Exfiltration
Confidence
85% confidence
Finding

Code or instructions that leak agent conversation context to external services, potentially exposing sensitive user interactions.

Content

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

md
4. Create Contract YAML in docs/nexum/contracts/
5. `nexum spawn <taskId>` — get spawn payload
6. Call sessions_spawn with payload
7. `nexum track <taskId> <sessionKey>` — record session
8. `nexum eval <taskId>` + spawn evaluator
9. `nexum complete <taskId> <verdict>` — process result

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · packages/cli/src/commands/callback.ts (reported line 20)May include surrounding context.

ts
const config = await loadConfig(projectDir).catch(() => ({}));
  const notifyConfig = (config as Record<string, unknown>).notify as Record<string, string> | undefined;
  const chatId = notifyConfig?.target ?? process.env['TELEGRAM_CHAT_ID'];
  const botToken = notifyConfig?.botToken ?? process.env['TELEGRAM_BOT_TOKEN'];

  if (chatId && botToken) {
    const message = [

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · packages/notify/src/telegram.ts (reported line 29)May include surrounding context.

ts
}

export function getBotToken(): string | undefined {
  return process.env["TELEGRAM_BOT_TOKEN"];
}

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · nexum/runtime/eval/NX-003-iter-3.yaml (reported line 23)May include surrounding context.

yaml
}
  },
  "scripts": {
    "build": "tsc && rm -rf dist/templates && cp -r src/templates dist/templates",
    "test": "vitest run",
    "typecheck": "tsc --noEmit"
  },

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · packages/prompts/package.json (reported line 15)May include surrounding context.

json
}
  },
  "scripts": {
    "build": "tsc && rm -rf dist/templates && cp -r src/templates dist/templates",
    "test": "vitest run",
    "typecheck": "tsc --noEmit"
  },

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · nexum/runtime/eval/NX-003-iter-3.yaml (reported line 23)May include surrounding context.

yaml
}
  },
  "scripts": {
    "build": "tsc && rm -rf dist/templates && cp -r src/templates dist/templates",
    "test": "vitest run",
    "typecheck": "tsc --noEmit"
  },

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · packages/prompts/package.json (reported line 15)May include surrounding context.

json
}
  },
  "scripts": {
    "build": "tsc && rm -rf dist/templates && cp -r src/templates dist/templates",
    "test": "vitest run",
    "typecheck": "tsc --noEmit"
  },

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file includes operational instructions in Chinese and presents them as authoritative process guidance, but does not indicate that language choice is optional or user-selectable. This can violate language/locale policy expectations when a skill forces a specific language without opt-in.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill declares required tools and environment usage but does not define an explicit tool/permission scope, while the documentation indicates access to environment variables and outbound network behavior via Telegram. That makes the trust boundary unclear and can lead users or execution frameworks to grant broader capabilities than expected.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quick-start instructs users to set Telegram bot credentials but does not warn that task or project data may be sent to Telegram, a third-party service. In an orchestration skill, notifications can easily include sensitive prompts, task IDs, repository details, or agent outcomes, so lack of disclosure is a real privacy/security issue.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution, suspicious.env_credential_access

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
packages/spawn/src/spawn.ts:21

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
packages/spawn/src/status.ts:19

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
packages/notify/src/telegram.ts:25