Back to skill

Security audit

快速创建AI智能体虚拟公司

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly builds an OpenClaw virtual company, but it also creates employee instructions that allow broad ongoing personal-assistant monitoring and persistent actions beyond that stated purpose.

Review before installing. Use this only if you are comfortable with it creating and changing OpenClaw workspaces/configuration, and remove or constrain the generated AGENTS.md heartbeat, personal-service monitoring, bootstrap, memory, and git push instructions before giving employees access to private accounts or repositories.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T09 · Insecure Skill Coding Practices

Warning
Location
AGENTS.md:23
Finding

Overbroad Persistent Collection and Reloading of Conversation History

Content
View full analysis

Vulnerability Details

File Location: AGENTS.md, lines 23-53
Vulnerability Type: Persistent storage and repeated loading of potentially sensitive conversation data
Risk Level: Medium

Relevant source excerpt, faithfully translated into English:

markdown
**The following must be read before work every day:**
1. **Previous business day's chat history**
2. **Recent week's work logs** (`memory/YYYY-MM-DD.md`)
3. **Recent month's weekly logs** (for example, `memory/week-XX.md`)
4. **Recent quarter's monthly logs** (for example, `memory/month-XX.md`)

**Logging rules:**
- **Daily log**: Automatically summarize and write to `memory/YYYY-MM-DD.md` at the end of the day
- **Weekly log**: Automatically summarize and write to `memory/week-XX.md` at the end of the week
- **Monthly log**: Automatically summarize and write to `memory/month-XX.md` at the end of the month
- **Backfill mechanism**: If not written in time, write it at the start of the next business day
- **Chat history**: Automatically save every 10 minutes

- **Daily notes:** `memory/YYYY-MM-DD.md` (create `memory/` if needed) — raw logs of what happened
- **Long-term:** `MEMORY.md` — your curated memories, like a human's long-term memory

Capture what matters. Decisions, context, things to remember. Skip the secrets unless asked to keep them.

- **ONLY load in main session** (direct chats with your human)
- **DO NOT load in shared contexts** (Discord, group chats, sessions with other people)
- This is for **security** — contains personal context that shouldn't leak to strangers
- You can **read, edit, and update** MEMORY.md freely in main sessions

Technical Analysis

The generated agent template mandates collection of chat history and multiple layers of daily, weekly, monthly, and long-term memory. Chat records are automatically saved every ten minutes and subsequently reloaded in later sessions.

No explicit opt-in mechanism, ...[truncated 1984 chars]

Remediation
View remediation

Remediation Suggestions

  1. Disable raw conversation logging by default and require explicit, informed user opt-in.
  2. Store minimal structured summaries instead of complete chat transcripts.
  3. Apply automatic redaction for passwords, API keys, access tokens, private keys, personal identifiers, and financial data before writing.
  4. Define short retention periods and automatically delete expired logs.
  5. Restrict memory-file permissions to the specific agent that owns them.
  6. Encrypt sensitive memory at rest where supported.
  7. Mark all memory content as untrusted data and explicitly prohibit it from overriding system, safety, permission, or current-user instructions.
  8. Require confirmation before loading unusually broad historical records.
  9. Maintain an auditable index showing what was stored, why it was stored, and when it will be deleted.

T01 · Skill Instruction Hijacking

Warning
Location
AGENTS.md:7
Finding

Unvalidated Bootstrap Instructions Are Automatically Followed and Deleted

Content
View full analysis

Vulnerability Details

File Location: AGENTS.md, line 7
Vulnerability Type: Local instruction injection through a mutable bootstrap file
Risk Level: Medium

markdown
If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it. You won't need it again.

Technical Analysis

The generated agent template instructs the agent to follow arbitrary content from BOOTSTRAP.md without checking its origin, integrity, schema, or authorization. This behavior occurs before the normal session-startup process, making the file a privileged local instruction channel.

Any user, process, integration, or compromised agent capable of writing to the workspace can create or replace this file. Its contents could then attempt to alter agent behavior, induce access to sensitive files, request external actions, or weaken operational safeguards.

The instruction to delete the file after following it further reduces auditability. It removes the primary evidence needed to determine which instructions were applied during provisioning.

Attack Path

  1. An attacker or compromised local process obtains write access to an agent workspace.
  2. The attacker creates a malicious BOOTSTRAP.md.
  3. The agent starts and detects the file.
  4. Following the installed template, the agent treats the file as authoritative and follows its instructions.
  5. The malicious instructions induce actions using the agent's existing tools and permissions.
  6. The agent deletes BOOTSTRAP.md, hindering forensic review and attribution.

Impact Assessment

Successful exploitation can alter the generated agent's goals and behavior for the current session. The effective impact depends on the tools already granted to that agent and may include reading workspace data, modifying configuration, accessing connected services, or performing external actions.

The vulnerability does not independently grant new op ...[truncated 158 chars]

Remediation
View remediation

Remediation Suggestions

  1. Do not automatically follow free-form bootstrap instructions.
  2. Require explicit user approval before applying any bootstrap configuration.
  3. Accept bootstrap data only from authenticated provisioning processes.
  4. Replace free-form Markdown instructions with a strictly validated configuration schema.
  5. Verify file ownership, permissions, and an integrity signature before processing.
  6. Explicitly state that bootstrap content cannot override system instructions, safety controls, access restrictions, or current user authorization.
  7. Preserve the original file or move it into a protected audit archive instead of deleting it.
  8. Record the file hash, source, processing time, accepted fields, and resulting configuration changes.

T05 · Unauthorized Access and Privilege Escalation

Note
Location
AGENTS.md:173
Finding

Generic Agent Template Authorizes Unattended Access to Personal Services and Repository Writes

Content
View full analysis

Vulnerability Details

File Location: AGENTS.md, lines 173-178 and 204-213
Vulnerability Type: Excessive default capabilities and ambiguous authorization for proactive actions
Risk Level: Low

markdown
**Things to check (rotate through these, 2-4 times per day):**

- **Emails** - Any urgent unread messages?
- **Calendar** - Upcoming events in next 24-48h?
- **Mentions** - Twitter/social notifications?
- **Weather** - Relevant if your human might go out?

**Proactive work you can do without asking:**

- Read and organize memory files
- Check on projects (git status, etc.)
- Update documentation
- Commit and push your own changes
- **Review and update MEMORY.md** (see below)

Technical Analysis

The template is intended to be copied into multiple employee workspaces, but it generically directs those employees to inspect email, calendar, and social-media services during recurring heartbeat activity. It also states that repository commits and pushes can occur without asking.

These capabilities are not required for the Skill's core organization-building function and are not constrained by employee role, repository, branch, service account, data scope, or explicit per-integration consent. Although another section generally advises asking before external actions, the quoted proactive authorization creates ambiguity and may be interpreted as standing approval.

Replicating this template across many generated employees increases the number of identities that may exercise unnecessary access, contrary to least-privilege principles.

Attack Path

  1. The Skill creates one or more employees using the shared AGENTS.md template.
  2. Email, calendar, social-media, or repository credentials become available to an employee through its environment or tool configuration.
  3. A recurring heartbeat activates the proactive checklist.
  4. The employee accesses private communications or connected-service met ...[truncated 888 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove email, calendar, social-media, and repository-push authorization from the generic employee template.
  2. Grant integrations only to roles that demonstrably require them.
  3. Require explicit user opt-in for each service, account, repository, and data scope.
  4. Make heartbeat tasks local and read-only by default.
  5. Require confirmation before every externally visible or state-changing operation, including repository pushes.
  6. Use separate, least-privileged service accounts for individual employees.
  7. Constrain repository access to approved repositories and protected branches.
  8. Prevent direct pushes to protected branches and require reviewed pull requests.
  9. Log all heartbeat access and external mutations with the responsible agent identity.
  10. Revoke unused credentials and periodically review each employee's effective permissions.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (23)

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

This section expands the skill from company-building into a general personal-assistant agent that performs periodic monitoring, project checks, memory maintenance, and proactive outreach. That scope creep is dangerous because it authorizes actions and access patterns unrelated to the declared skill purpose, increasing the chance of overreach into sensitive user data and unintended side effects.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

Instructions to check emails, social mentions, weather, and calendar are unrelated to building a virtual company and create a strong risk of off-purpose surveillance and data handling. In this skill context, those actions are especially dangerous because users would not reasonably expect a company-builder to monitor personal communications and schedules.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is configured to auto-activate on broad, common intents such as creating a company, building a team, or collaboration. In a system where skill activation can lead to file and configuration changes later in the workflow, overly broad triggering increases the chance of unintended invocation and can steer unrelated conversations into a state-changing administrative flow.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The trigger list contains many generic terms like 'team', 'employee', 'skill', 'cooperate', and 'organization', with no disambiguation or negative conditions. Because this skill ultimately performs persistent filesystem and configuration operations, this broad matching materially raises the risk of accidental activation and unintended progression toward privileged actions.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions require repeated reading of prior chats and persistent logs across daily, weekly, and monthly files, creating a built-in retention and resurfacing mechanism for user-provided data. This is risky because it normalizes broad collection and reuse of potentially sensitive information beyond the immediate task, especially in a skill not framed as a memory or archival system.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · AGENTS.md (reported line 68)May include surrounding context.

md
## Red Lines

- Don't exfiltrate private data. Ever.
- Don't run destructive commands without asking.
- `trash` > `rm` (recoverable beats gone forever)
- When in doubt, ask.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file says it is safe to freely search the web and check calendars, even though those capabilities are not part of the company-builder skill description. Allowing undeclared external data access broadens the trust boundary and can lead to unnecessary collection or exposure of user information.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

A broad rule to react to any message matching a configurable heartbeat prompt can trigger the skill outside intended user workflows. That increases the risk of unintended invocation, unauthorized background actions, and prompt-based manipulation through crafted messages or workspace content.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
86% confidence
Finding

This section explicitly authorizes proactive work without asking, including reading memory files, checking projects, updating documentation, and committing/pushing changes. That enables autonomous actions affecting user data and repositories without a contemporaneous request, which is especially risky in a skill whose declared purpose is only company-building documentation and structure generation.

Content

Scanner excerpt · AGENTS.md (reported line 206)May include surrounding context.

md
- Nothing new since last check
- You just checked <30 minutes ago

**Proactive work you can do without asking:**

- Read and organize memory files
- Check on projects (git status, etc.)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction says everyone should operate in the same working language and applies to all members, including AI assistants. This is a natural-language locale policy constraint, but the file does not present it as optional, offer language choice, or justify why a Chinese-only requirement is necessary.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document is written as mandatory rules for all members and presents all operational and communication standards exclusively in Chinese, including required phrasing and output expectations. Because the policy applies broadly to "所有成员" and does not offer any language choice or opt-in, it creates a natural-language locale constraint that matches the language/locale policy violation criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The natural-language instructions, prompts, examples, and expected inputs are all specified in Chinese, which effectively forces a specific language for interaction. The file does not state that the skill is region-specific nor offer users an opt-in or alternative language behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list is extremely broad and includes everyday terms such as '团队', '员工', '合作', and '技能', which can cause the skill to activate outside the user's intended context. Because this skill performs high-impact administrative actions such as creating files, modifying configuration, and changing agent structure, accidental activation increases the chance of unauthorized or unintended persistent changes.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
96% confidence
Finding

This duplicate finding points to the same behavior: the skill performs real persistent changes based on session input, including writing files and editing runtime configuration. In the context of a company-builder skill with broad triggers and support for employee/department changes, persistence makes unintended activation or prompt manipulation substantially more dangerous because changes survive the session and affect future agent behavior.

Content

Scanner excerpt · README.md (reported line 73)May include surrounding context.

md
增加/删除岗位
继续招聘员工
用户确认后,执行真实创建操作:
创建目录和文件(使用 mkdir/write 等工具实际执行)
配置OpenClaw(实际修改配置文件)
显示创建进度和结果
提示重启才生效

Session Persistence

Medium
Category
Rogue Agent
Confidence
96% confidence
Finding

This duplicate finding points to the same behavior: the skill performs real persistent changes based on session input, including writing files and editing runtime configuration. In the context of a company-builder skill with broad triggers and support for employee/department changes, persistence makes unintended activation or prompt manipulation substantially more dangerous because changes survive the session and affect future agent behavior.

Content

Scanner excerpt · README.md (reported line 73)May include surrounding context.

md
增加/删除岗位
继续招聘员工
用户确认后,执行真实创建操作:
创建目录和文件(使用 mkdir/write 等工具实际执行)
配置OpenClaw(实际修改配置文件)
显示创建进度和结果
提示重启才生效

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document instructs the agent to create directories/files, modify OpenClaw configuration, and copy skills into persistent locations, but does not require a clear risk disclosure, dry-run preview, or safety checks beyond a general confirmation step. This is dangerous because users may not understand the scope of local side effects, and a mistaken confirmation could cause persistent environment changes.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The workflow explicitly persists user-provided organizational data by writing files and modifying configuration after confirmation. This creates session persistence and durable state based on conversational input, which can become unsafe if prior prompts were ambiguous, manipulated, or contained incorrect information, especially because the persisted state affects future agent behavior.

Content

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

md
- 4. 增加/删除岗位
   - 5. 继续招聘员工
9. 用户确认后,执行**真实创建**操作:
   - **创建目录和文件**(使用 mkdir/write 等工具实际执行)
   - **配置OpenClaw**(实际修改配置文件)
   - 显示创建进度和结果
   - 提示重启才生效

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The workflow explicitly persists user-provided organizational data by writing files and modifying configuration after confirmation. This creates session persistence and durable state based on conversational input, which can become unsafe if prior prompts were ambiguous, manipulated, or contained incorrect information, especially because the persisted state affects future agent behavior.

Content

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

md
- 4. 增加/删除岗位
   - 5. 继续招聘员工
9. 用户确认后,执行**真实创建**操作:
   - **创建目录和文件**(使用 mkdir/write 等工具实际执行)
   - **配置OpenClaw**(实际修改配置文件)
   - 显示创建进度和结果
   - 提示重启才生效

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill includes destructive operations such as dissolving departments, firing employees, and removing entries from configuration and Telegram bindings, yet it lacks strong destructive-action safeguards. Without explicit warnings, scoped previews, dependency checks, and rollback support, legitimate use can still cause accidental loss of configuration or service disruption.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file includes a Chinese instruction inline within otherwise English operational guidance, but does not state that multilingual output is optional or based on user preference. This can violate a language/locale policy if the organization expects the skill to avoid forcing a language without user opt-in.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes organizational design and file generation for a virtual company. A recommendation to use ElevenLabs TTS for stories and movie summaries is an unrelated capability that is not justified by the skill's company-building purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown file presents the skill's identity, responsibilities, and communication style only in Chinese. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation, and the file does not state that the skill is region-specific or provide any language choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains natural-language guidance exclusively in Chinese, and nowhere indicates that the user may choose another language or that the skill is intentionally limited to a Chinese-language context. Under the policy rule for language or locale constraints, forcing a specific language without opt-in is a reportable issue.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.