T08 · Insecure Dependencies
- Location
scripts/start-mcp.js:43- Finding
Environment-Controlled Module Resolution Allows Arbitrary Server Code Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stated TraeCN MCP purpose, but its launcher can load server code from environment-influenced locations and should be reviewed before installation.
Install only if you trust the TRAECNclaw server installation and can control the MCP client's working directory, NODE_PATH, and PATH. Prefer a fixed, verified absolute server path or a trusted package install, keep the gateway bound to loopback, and treat command approvals, settings changes, and conversation deletion as high-impact actions.
scripts/start-mcp.js:43Environment-Controlled Module Resolution Allows Arbitrary Server Code Execution
scripts/start-mcp.js:64Unqualified PATH Search Permits MCP Server Spoofing
The declared description presents the skill as an MCP interface for operating TraeCN, but the body also includes setup and bootstrap behaviors such as validating local installations, generating client configuration, and writing files. This mismatch can cause operators to grant the skill more trust or broader deployment than intended, while hidden setup behaviors expand its effective attack surface into local filesystem and execution-adjacent actions.
Referenced artifact was not completely inspected
rce checkout. Then run `npm run --silent setup:mcp` from the checkout, or `node scripts/setup-mcp.js` from this Skill directory, to validate the server and prin
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
process.exit(1);
}
// Chdir to repo root so .env and relative file reads resolve correctly.
try {
process.chdir(path.dirname(serverPath));
} catch (cause) {
The skill exposes environment-backed capabilities through documented variables like TRAECN_GATEWAY_TOKEN and host/port overrides, but it does not declare an explicit tool scope such as permissions or allowed-tools. That makes the skill's effective authority less transparent to the host and reviewer, increasing the risk of unintended secret access or use of environment-derived connectivity without a clear least-privilege boundary.
The examples for listing and toggling settings rely on the Chinese section label "通用" while another field uses the English label "Auto Save", creating an undocumented locale assumption. This can violate language/locale policy because the skill behavior appears tied to a specific UI language without user opt-in or justification.
This JSON manifest/example file includes a locale-specific value, "通用", for the settings section. In a manifest-style reference file, hard-coding a localized label without explaining when this variant applies can make invocation behavior ambiguous across installations that use different UI languages.
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
},
{
"name": "traecn_decide_approval",
"description": "Approve or deny the unsafe or ambiguous command card currently visible in TraeCN. Approval revalidates the exact expectedCommand against the card and requires acknowledgeRisk plus an audit reason recorded locally; denial needs only the decision. Never approve beyond the scope the user authorized.",
"inputSchema": {
"type": "object",
"properties": {