Back to skill

Security audit

agent- manager

Security checks for vulnerabilities and agentic risk

Overview

This skill is intended to manage OpenClaw agents, but it handles Feishu secrets and workspace paths in ways that could expose credentials or alter unintended files.

Review this skill carefully before installing. Use it only in an OpenClaw environment where you are comfortable letting an agent create persistent workspaces, edit global OpenClaw configuration, bind Feishu bots, and restart the gateway. Prefer a test Feishu app or tightly scoped credentials, rotate any secret that appears in logs or chat transcripts, avoid the default all-open bot setting unless intended, and validate agent IDs before use.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/manage_agent.py:16
Finding

Unvalidated Agent ID Allows Workspace Path Traversal and Destructive File Operations

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/feishu_auth.py:54
Finding

Feishu Application Secret Is Exposed Through Output, Process Arguments, and Plaintext Configuration

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/feishu_auth.py:12
Finding

Predictable Shared Temporary File Insecurely Stores the Feishu OAuth Device Code

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script prints the returned App ID and especially the App Secret directly to stdout, which can expose credentials through shell history capture, terminal logging, CI logs, shared consoles, or monitoring systems. Anyone who obtains the secret may be able to impersonate the application and access Feishu resources tied to it.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly advertises automatic Feishu authorization, credential acquisition, and binding from a chat-driven workflow, but it does not clearly warn users how sensitive OAuth tokens or bot credentials are stored, scoped, or protected. In a skill whose purpose is to create and manage other agents, this omission is more dangerous because it normalizes handing high-value credentials to an automation layer that may propagate access across multiple agents or workspaces.

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 · SKILL.md (reported line 4)May include surrounding context.

md
***

name: agent-manager
description: Manage OpenClaw Agents. Create new agents, configure workspaces, manage Feishu bot integrations (QR code scanning, bindings), and verify multi-bot routing.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------

# Agent 管理专家 (Agent Manager)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill explicitly instructs the operator to obtain Feishu app credentials and then use them in command-line arguments, but it provides no warning or guardrails for handling those secrets safely. This increases the risk of credential exposure through chat transcripts, shell history, logs, process listings, or accidental copy/paste into insecure channels.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill states that it will automatically clean the new agent's .git directory, which destroys repository metadata and can irreversibly remove commit history, remotes, and auditability for that workspace. Doing this without an explicit warning and opt-in is dangerous because users may not realize version-control state will be deleted as part of agent creation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/feishu_auth.py (reported line 16)May include surrounding context.

python
def generate_url():
    try:
        resp = requests.post('https://accounts.feishu.cn/oauth/v1/app/registration',
            data={'action': 'begin', 'archetype': 'PersonalAgent', 'auth_method': 'client_secret', 'request_user_info': 'open_id'},
            headers={'Content-Type': 'application/x-www-form-urlencoded'})
        resp.raise_for_status()

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/feishu_auth.py (reported line 49)May include surrounding context.

python
def generate_url():
    try:
        resp = requests.post('https://accounts.feishu.cn/oauth/v1/app/registration',
            data={'action': 'begin', 'archetype': 'PersonalAgent', 'auth_method': 'client_secret', 'request_user_info': 'open_id'},
            headers={'Content-Type': 'application/x-www-form-urlencoded'})
        resp.raise_for_status()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script writes the device_code to a predictable file in /tmp, which is a shared world-accessible location on many systems. Another local user or process could read, replace, or race this file, allowing session interference or unauthorized polling of the authorization flow.

Content

No source excerpt is available for this finding.

Tainted flow: 'device_code' from requests.post (line 22, network input) → requests.post (network output)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/feishu_auth.py (reported line 49)May include surrounding context.

python
print("Polling Feishu for authorization result...")
    for i in range(20):
        try:
            resp = requests.post('https://accounts.feishu.cn/oauth/v1/app/registration',
                data={'action': 'poll', 'device_code': device_code},
                headers={'Content-Type': 'application/x-www-form-urlencoded'}, timeout=10)
            result = resp.json()

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring says the script only manages agent creation and workspace initialization, but the create path also writes Feishu credentials and bindings into the global ~/.openclaw/openclaw.json configuration. This hidden side effect can cause operators to expose or alter global messaging integrations without realizing the script changes security-relevant state beyond the local agent workspace.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/manage_agent.py (reported line 14)May include surrounding context.

python
def run_cmd(cmd, check=True):
    print(f"Executing: {' '.join(cmd)}")
    subprocess.run(cmd, check=check)

def create_agent(name, agent_id, description=""):
    workspace = f"{os.path.expanduser('~')}/.openclaw/workspace-{agent_id}"

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script writes AGENTS.md and SOUL.md content entirely in Chinese, including operational guidance for the created agent. This imposes a specific language/locale on downstream agent behavior without presenting a user choice or documenting an opt-in, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The skill README is written entirely in Chinese and all invocation examples assume Chinese-language interaction, but it does not state that Chinese is optional or that other languages are supported. This can constitute a language/locale policy issue because the skill appears to impose a specific language without user opt-in or justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The documentation frames the script as a verifier, which implies checking correctness or consistency of bindings. In practice, the code loads the config and lists current bindings and app IDs, with no validation logic beyond detecting an empty bindings map.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
81% confidence
Finding

The script reads a user configuration file from the home directory and prints account/app binding information directly to stdout. While this appears intended for troubleshooting, it can expose potentially sensitive internal identifiers in terminal logs, shared sessions, CI output, or other captured environments, making it an information disclosure issue.

Content

No source excerpt is available for this finding.