Back to skill

Security audit

Team Builder

Security checks for vulnerabilities and agentic risk

Overview

The skill’s goal is coherent, but its generated install scripts can modify global OpenClaw settings, create scheduled jobs, and unsafely turn configuration input into executable code.

Install only if you need a persistent OpenClaw multi-agent workspace and trust every deployment input. Before running generated files, review apply-config.js, create-crons.sh, and create-crons.ps1; do not use untrusted team-builder.json, --team values, role names, model IDs, team names, timezones, or workspace paths; back up ~/.openclaw/openclaw.json; and confirm you want agent-to-agent communication plus scheduled jobs enabled.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/deploy.js:147
Finding
Arbitrary JavaScript Execution Through Unsafe Generated Source Code<![CDATA[ ## Vulnerability Details **File Location**: `scripts/deploy.js:69-82, 147-149` **Vulnerability Type**: Code injection through unsafe source-code generation **Risk Level**: High ### Complete Vulnerable Code Configuration values are accepted without schema validation or escaping: ```javascript function buildConfigFromJson(p) { const raw = fs.readFileSync(p, 'utf8'); const json = JSON.parse(raw); const roleIds = json.roles && json.roles.length ? json.roles : ROLES.map(r => r.id); const selectedRoles = ROLES.filter(r => roleIds.includes(r.id)); const names = {}; for (const r of selectedRoles) names[r.id] = (json.roleNames && json.roleNames[r.id]) || r.dname; return { teamName: json.teamName || 'Alpha Team', workDir: json.workspaceDir || path.join(home, '.openclaw', 'workspace-team'), tz: json.timezone || 'Asia/Shanghai', mh: json.morningHour || 8, eh: json.eveningHour || 18, tm: json.thinkingModel || suggestModel('think', detectModels()) || 'zai/glm-5', em: json.executionModel || suggestModel('exec', detectModels()) || 'zai/glm-4.7', ceoTitle: json.ceoTitle || 'Boss', selectedRoles, names, }; } ``` These values are then inserted directly into executable JavaScript: ```javascript const wsPath = cfg.workDir.replace(/\\/g, '/').replace(home.replace(/\\/g, '/'), '~'); const agentList = prefixedRoles.map(r => ` { id: "${r.pid}", name: "${cfg.names[r.id]}", workspace: "${wsPath}", model: { primary: "${r.think ? cfg.tm : cfg.em}" }, identity: { name: "${cfg.names[r.id]}" } }`).join(',\n'); const allIds = ['main', ...prefixedRoles.map(r => `"${r.pid}"`)].join(', '); w(path.join(cfg.workDir, 'apply-config.js'), `#!/usr/bin/env node\nconst fs = require('fs');\nconst path = require('path');\nconst cfgPath = path.join(process.env.HOME || process.env.USERPROFILE, '.openclaw', 'openclaw.json');\nlet config = JSON.parse(fs.readFileSync(cfgPath, 'utf8'));\nif (!config.agents) config.agents = {};\nif (!Array ...[truncated 2933 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not generate JavaScript by concatenating configuration values into source code. 2. Generate a data-only JSON file with `JSON.stringify`, and use a fixed, reviewed `apply-config.js` implementation to read it. 3. If source generation remains necessary, serialize every inserted string with `JSON.stringify` rather than manually surrounding it with quotation marks. 4. Apply strict schema validation to: - Team prefixes and role IDs. - Role names. - Model identifiers. - Workspace paths. - Numeric hour fields. - Time-zone identifiers. 5. Reject unexpected control characters, line breaks, null bytes, and invalid field types. 6. Display the generated script path and require the user to review it before execution. 7. Add tests containing quotation marks, backslashes, newlines, comment delimiters, and template-literal metacharacters to ensure generated code remains data rather than executable syntax. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/deploy.js:151
Finding
Shell and PowerShell Command Injection in Generated Cron Installation Scripts<![CDATA[ ## Vulnerability Details **File Location**: `scripts/deploy.js:14-16, 77, 151-171` **Vulnerability Type**: OS command injection through unsafe shell-script generation **Risk Level**: High ### Complete Vulnerable Code The team prefix is accepted directly from command-line arguments: ```javascript const teamFlagIdx = args.indexOf('--team'); const teamPrefix = (teamFlagIdx !== -1 && args[teamFlagIdx + 1]) ? args[teamFlagIdx + 1] + '-' : ''; ``` The time zone is accepted directly from configuration: ```javascript tz: json.timezone || 'Asia/Shanghai', ``` Both values influence executable Bash and PowerShell scripts: ```javascript const crons = [ { name: `${teamPrefix}chief-morning-brief`, cron: `0 ${cfg.mh} * * *`, agent: `${teamPrefix}chief-of-staff`, deliver: '--announce', msg: 'Morning router scan + dashboard + brief.' }, { name: `${teamPrefix}chief-midday-patrol`, cron: `0 ${cfg.mh+4} * * *`, agent: `${teamPrefix}chief-of-staff`, deliver: '--no-deliver', msg: 'Midday router scan only.' }, { name: `${teamPrefix}chief-afternoon-patrol`, cron: `0 ${cfg.mh+7} * * *`, agent: `${teamPrefix}chief-of-staff`, deliver: '--no-deliver', msg: 'Afternoon router scan only.' }, { name: `${teamPrefix}chief-evening-brief`, cron: `0 ${cfg.eh} * * *`, agent: `${teamPrefix}chief-of-staff`, deliver: '--announce', msg: 'Evening summary + dashboard.' }, { name: `${teamPrefix}data-daily-pull`, cron: `0 ${cfg.mh-1} * * *`, agent: `${teamPrefix}data-analyst`, deliver: '--no-deliver', msg: 'Data pull + feedback scan.' }, { name: `${teamPrefix}growth-daily-work`, cron: `0 ${cfg.mh+1} * * *`, agent: `${teamPrefix}growth-lead`, deliver: '--no-deliver', msg: 'GEO + SEO + community.' }, { name: `${teamPrefix}product-lead-daily`, cron: `0 ${cfg.mh+1} * * *`, agent: `${teamPrefix}product-lead`, deliver: '--no-deliver', msg: 'Clarification/PRD/acceptance + route work to devops/fullstack-dev.' }, { name: `${teamPrefix}content-daily-work`, cron: `0 ${cfg.mh+2} * * 1 ...[truncated 3553 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Avoid generating shell source code from configuration values. 2. Prefer a fixed Node.js installer that invokes `openclaw` with `child_process.spawnSync` or `execFileSync` and a separate argument array. 3. Validate the team prefix with a strict allowlist such as: ```text ^[A-Za-z0-9_-]+$ ``` 4. Validate time zones against a trusted list of IANA time-zone identifiers. 5. Require `morningHour` and `eveningHour` to be integers within an explicitly supported range. 6. Reject line breaks and control characters in all values written to executable files, including `teamName`. 7. If script generation is unavoidable, implement and test separate escaping routines for Bash and PowerShell. Do not reuse one command string for both platforms. 8. Quote every generated argument, including agent identifiers, using the correct platform-specific mechanism. 9. Add regression tests covering command substitution, quotation marks, semicolons, pipes, redirection, newlines, and PowerShell subexpressions. 10. Clearly mark generated scripts as containing configuration-derived commands and require review before execution. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (27)

Self-Modification

High
Category
Rogue Agent
Content
- **Incremental**: append new findings, don't rewrite everything
- **Traceable**: dated with evidence so others can verify

### What Agents Can Self-Update
- Their own knowledge files (per ownership table above)
- Their own MEMORY.md (lessons learned, decisions)
- shared/data/ outputs (data-analyst only)
Confidence
91% confidence
Finding
The skill explicitly authorizes agents to self-update knowledge files and their own memory based on execution outcomes. In a multi-agent system that uses these artifacts for future decisions and routing, this creates a persistent prompt/state poisoning surface: a compromised, mistaken, or manipulated agent can write misleading instructions or tainted knowledge that later sessions trust, causing durable misbehavior across the team.

Ae1

High
Category
analysis-evasion
Content
Edit ROLES array in `scripts/deploy.js` to add/remove agents.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Direct Prompt Extraction

High
Category
System Prompt Leakage
Content
- Urgent (priority:high) also notify chief-of-staff
- Timeout monitoring by chief-of-staff (details in chief-of-staff SOUL.md)

## Output rules
- Personal memory: agents/[id]/MEMORY.md
- Daily log: agents/[id]/memory/YYYY-MM-DD.md
- To other agents: shared/inbox/to-[id].md
Confidence
85% confidence
Finding
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
The README presents all operational instructions in Chinese and does not offer an alternative language or indicate that the skill is intentionally limited to Chinese-speaking users. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README instructs users to execute generated scripts that modify OpenClaw configuration and create scheduled tasks, but it does not clearly warn that these actions change persistent local/system state. In an agent-skill context, encouraging blind execution of generated scripts increases the risk of unintended configuration changes, persistence, or abuse if the generated content or workspace path is tampered with.

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill describes operational use of Node.js scripts, shell commands, environment-sensitive configuration changes, and cron creation, but does not declare any explicit tool scope such as allowed tools or permissions. In a skill that modifies `openclaw.json`, restarts services, and interfaces with optional Telegram tokens, missing tool constraints increases the chance of over-broad execution or accidental misuse if an agent is permitted to act on the documented commands.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The manifest description is written as a Chinese-only user-facing description, and the document repeatedly presents key operational guidance in Chinese without stating that other languages are supported. This creates a locale/language constraint without explicit user opt-in, which matches the natural-language policy violation criteria.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The startup sequence and surrounding instructions are written as mandatory operational guidance in Chinese, but the skill does not offer a language selection mechanism or explain that the skill is limited to Chinese-speaking users. For a general-purpose team-building skill, this is a language policy concern.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This markdown file appears to enforce a single language for all users by presenting all methodology and instructions only in Chinese. The policy specifically calls for flagging language or locale constraints when there is no user opt-in, and no justification for a China-specific or Chinese-only scope is provided in the file.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The checklist explicitly requires content to be '面向全球英文用户' and English-formatted URL slugs, which imposes a specific language/locale expectation in natural-language guidance. The policy allows locale constraints only when justified or optional, but this file does not present it as a user choice or region-specific requirement.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This markdown file presents all instructions, templates, and operational guidance solely in Chinese. Under the policy, forcing a specific language without user opt-in or documented justification is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
This markdown file contains only Chinese-language instructions and does not indicate that the skill is region-specific or that users may choose another language. That can violate language/locale policy when a skill effectively forces a specific language without user opt-in.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The entire methodology is written exclusively in Chinese, and there is no indication that language selection is optional or that the skill is intentionally limited to a Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown template includes multiple mandatory operational rules written only in Chinese, such as sections marked 强制 and directives for all roles. Because the file is a shared template intended for all agents, it effectively imposes a specific language on users/agents without any opt-in or documented locale justification.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This markdown file contains multiple mandatory instruction sections written only in Chinese, such as '强制' execution rules and subagent rules, embedded in otherwise English templates. Because the skill does not offer a user or operator language preference or document a justified locale restriction, it effectively forces a specific language for part of the workflow.

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The chief-of-staff section says the role must delegate all multi-step work and must not personally spawn subagents to do concrete work (L123-L130). Later, the same template instructs agents to prefer doing work themselves and only use subagents sparingly (L142-L145), which directly conflicts with the earlier mandatory delegation rule for this role.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The data-analyst section again uses mandatory Chinese-only operational rules inside an English template, and the same pattern continues in later role sections. This creates a language policy issue across the file because critical instructions are not accessible unless the user accepts that locale implicitly.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This code generates multiple markdown files and role instructions containing mandatory Chinese-language text such as '强制' sections and Chinese onboarding/dashboard content. Because the script defaults to these locale-specific instructions for all generated workspaces without offering a language choice or documenting a region-specific requirement, it creates a natural-language locale policy issue.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The generated apply-config.js directly edits the user's global ~/.openclaw/openclaw.json, adds new agents, and sets tools.agentToAgent to enabled with a broad allow list including main and all generated agents. That expands trust boundaries beyond simple workspace deployment and can weaken isolation or unexpectedly grant inter-agent communication privileges across the user's environment.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The generated apply-config.js performs a destructive write to the user's global OpenClaw configuration without any built-in confirmation, backup, or warning in the script itself. If run as suggested in the generated README, users may unintentionally overwrite or alter security-relevant settings, causing privilege expansion or breaking existing agent/tool policy.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The manifest sets the timezone to "Asia/Shanghai", which imposes a specific locale setting in natural-language/config intent without indicating that the user can choose or override it. Under the policy, locale constraints should be optional or clearly justified as region-specific.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The file is primarily written in English but line L015 injects Chinese-language content labels and examples without any note that language should follow user preference or project context. This can create an implicit language/locale constraint in the skill behavior without explicit opt-in.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The file title and all instructional content are written exclusively in Chinese, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the policy rule, forcing a specific language without opt-in can be a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
90% confidence
Finding
The entire skill file is written in Chinese and does not indicate that language selection is optional or limited to a China-specific or Chinese-speaking context. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Context-Inappropriate Capability

Low
Confidence
80% confidence
Finding
The manifest describes deploying a multi-agent team workspace with configurable roles, models, timezone, and onboarding. While generating workspace files is expected, inspecting ~/.openclaw/openclaw.json to enumerate existing model providers reaches into unrelated user-global configuration rather than limiting itself to the provided deployment inputs.

Static analysis

No suspicious patterns detected.