Back to skill

Security audit

Setup Client Workspace (TNCG)

Security checks for vulnerabilities and agentic risk

Overview

This skill is a real client-onboarding playbook, but it grants client agents broad messaging, session, network, and credential access that should be reviewed before use.

Install only in a controlled OpenClaw environment after tightening tenant boundaries: remove wildcard outbound WhatsApp sending, avoid global session visibility for client agents, do not expose shared production secrets to all sandboxes, replace host-service bridges with tenant-aware authenticated access, pin installed skills, harden credential storage, and do not use the legacy hardcoded cron or Git token URL patterns.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (10)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/openclaw-config.md:161
Finding

Global Session Visibility Enables Cross-Tenant Data Access

Content
View full analysis
"] } } } ``` ### Technical Analysis The configuration grants client agents access to `sessions_list`, `sessions_history`, and `sessions_send` while setting global and sandbox session visibility to `all`. It also adds each client agent to a flat, non-directional inter-agent allowlist. These permissions violate least privilege and contradict the stated requirement for strict isolation between clients. A client agent does not need global session enumeration or history access merely to escalate a support request. Prompt injection or compromise of one client agent could consequently expose sessions belonging to supervisors or other clients. ### Attack Path 1. An attacker sends crafted instructions through the client’s WhatsApp channel or content processed by the agent. 2. The client agent invokes `sessions_list` under global visibility. 3. The attacker identifies sessions belonging to another client or a privileged supervisor. 4. The agent calls `sessions_history` to retrieve content from the selected session. 5. The retrieved information is returned to the attacker or transmitted externally using the messaging tool. 6. Alternatively, the attacker abuses `sessions_send` to inject messages into privileged agent sessions. ### Impact Assessment A compromised client agent may obtain access to cross-client conversation histories ...[truncated 234 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/openclaw-config.md:197
Finding

Shared Production Secret Is Exposed to All Client Sandboxes

Content
View full analysis
/agent/auth-profiles.json` profil `openai:`). Ne jamais mettre dans defaults. ### Nango OAuth2 — config agent client Pour que l'agent client puisse générer des liens OAuth : 1. `NANGO_PROD_SECRET_KEY` est déjà dans les defaults (hérité automatiquement) 2. Copier le skill `nango-oauth` dans le workspace client : `skills/nango-oauth/` 3. L'agent appelle `http://172.17.0.1:3003` (pas localhost) pour l'API Nango ``` ### Technical Analysis The procedure places the same production Nango secret, along with other shared API keys, in the default environment inherited by every client sandbox. Environment variables are accessible to processes and command-execution tools inside the container. The configuration also gives the sandbox a documented route to the Nango service. Compromise of any single client agent can therefore disclose a credential that is not scoped to that client and use it against shared production infrastructure. ### Attack Path 1. An attacker prompt-injects or otherwise compromises one client agent. 2. The agent invokes a command or skill that reads its process environment. 3. The attacker extracts `NANGO_PROD_SECRET_KEY` or another shared API key. 4. The attacker calls the Nango service through `http://172.17.0.1:3003` or reuses the credential externally. 5. If the key has production-wide privileges, the attacker accesses or modifies OAuth integration ...[truncated 371 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/openclaw-config.md:175
Finding

Client Sandboxes Receive Network Paths to Shared Host Services

Content
View full analysis
services host) Le container sandbox de l'agent doit pouvoir joindre les services host. Bridges actifs sur le réseau `bridge` (172.17.0.1) : | Service | Port | Bridge systemd | |---------|------|----------------| | Gateway OpenClaw | 18789 | `socat-bridge-gateway-18789` | | Windmill | 8000 | `socat-bridge-windmill-8000` | | **Nango (OAuth2)** | **3003** | **`socat-bridge-nango-3003`** | Si le sandbox utilise un autre réseau Docker, créer un socat dédié (voir skill `localhost-bridge`). ``` ### Technical Analysis The procedure deliberately exposes the OpenClaw gateway, Windmill, and Nango host services to every client sandbox through shared socat bridges. A sandbox boundary alone does not protect these services when the sandbox is explicitly given a route to them. If any service trusts bridge-originated traffic, uses weak authentication, or contains an exploitable endpoint, a compromised client agent can reach shared host infrastructure and potentially move beyond its tenant boundary. ### Attack Path 1. An attacker controls instructions processed by a client agent. 2. The agent uses browser, command, or HTTP-capable tooling inside the sandbox. 3. The agent probes `172.17.0.1` on ports 18789, 8000, and 3003. 4. The attacker invokes an exposed endpoint using inherited credentials or exploits a vulnerable service. 5. The attacker accesses shared workflows, integrations, gateway functions, or data belonging to other tenants. ### Impact Assessment The reachable scope includes shared gateway, automation, and OAuth infrastructure. Depending on service authorization, exploitation could allow workflow execution, OAuth integration abuse, cross-client data access, gateway manipulation, or broader compromi ...[truncated 31 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/openclaw-config.md:52
Finding

Wildcard WhatsApp Policy Permits Messages to Arbitrary Recipients

Content
View full analysis
": { "name": "", "enabled": true, "dmPolicy": "allowlist", "selfChatMode": true, "allowFrom": ["+"], "allowSendTo": ["*"], "groupPolicy": "allowlist", "debounceMs": 0 } ``` ```markdown - `allowFrom` : mettre uniquement le numéro du client. - `allowSendTo` (optionnel) : autorise l'agent à envoyer à des numéros spécifiques ou `["*"]` pour tous. ``` ### Technical Analysis Although inbound messages are restricted with `allowFrom`, outbound messages are explicitly permitted to every phone number. Prompt-level instructions requiring user approval do not provide a reliable security boundary because prompt injection, model error, or a compromised dependency can bypass them. The agent sends from the client’s linked WhatsApp identity, increasing the credibility and impact of unauthorized messages. ### Attack Path 1. An attacker supplies malicious instructions through an allowed message, web result, document, or third-party skill. 2. The agent is induced to invoke the `message` tool. 3. The wildcard destination policy accepts an attacker-selected phone number. 4. The agent sends sensitive information, spam, phishing content, or impersonating messages from the client’s account. ### Impact Assessment An attacker may communicate with arbitrary third parties under the client’s identity. The impact includes confidential-data disclosure, account reputation damage, fraud, phishing, spam enforcement actions, and unauthorized contact with customers or employees. ]]>
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
references/workflow.md:32
Finding

Unpinned Third-Party Skills Are Installed from Mutable Sources

Content
View full analysis
# Self-improvement (capture erreurs/corrections/apprentissages) clawhub install self-improving-agent # Recherche web Tavily clawhub install tavily-search # Escalation vers le superviseur (webhook gateway) cp -r ~/.openclaw/workspace/skills/escalation skills/escalation ``` ### Technical Analysis The procedure installs third-party skills by mutable package name without a version, immutable digest, signature, or source verification. It also copies an escalation skill from an existing workspace without validating its provenance or contents. The effective dependency payload can therefore change after this project has been reviewed. A registry compromise, package takeover, or poisoned local workspace could introduce malicious Agent instructions or executable components into every newly provisioned client environment. ### Attack Path 1. An attacker compromises a named ClawHub package, its publisher account, or the local source workspace. 2. The package or copied directory is modified to contain malicious instructions or executable behavior. 3. An operator follows the onboarding procedure. 4. The mutable dependency is installed into the new client workspace. 5. The client agent loads and follows the attacker-controlled skill. 6. The dependency accesses secrets, sends messages, changes persistent files, or invokes available tools. ### Impact Assessment The dependency executes within a workspace that has messaging, network, credential, and inter-agent capabilities. A successful supply-chain compromise may affect every client provisioned after the dependency is modified and may expose shared infrastructure. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/openclaw-config.md:81
Finding

OpenAI API Keys Are Written to Plaintext JSON Without Permission Hardening

Content
View full analysis
/agent/auth-profiles.json" with open(path, "r") as f: data = json.load(f) data["profiles"]["openai:"] = { "provider": "openai", "type": "api_key", "key": "" } with open(path, "w") as f: json.dump(data, f, indent=2) PYEOF ``` ### Technical Analysis The script writes a long-lived API key directly into a plaintext JSON file. It does not verify ownership, reject symbolic links, set a restrictive creation mode, or apply owner-only permissions after writing. The broader procedure also duplicates the key into the sandbox environment. If the file is readable by another account, exposed through a backup, or replaced with a symbolic link, the secret may be disclosed or written to an unintended location. ### Attack Path 1. An attacker gains access through another local process, Agent tool, backup, or misconfigured filesystem permission. 2. The attacker reads `auth-profiles.json` and extracts the OpenAI API key. 3. Alternatively, an attacker who can manipulate the path places a symbolic link before setup. 4. The setup script follows the link and writes credential-bearing JSON to an attacker-selected file. 5. The attacker reuses the key for external API requests. ### Impact Assessment The attacker may consume the client’s OpenAI quota, incur charges, access resources permitted to the project key, or disrupt service by exhausting limits. Exposure persists until the key is revoked and rotated. ]]>
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
references/legacy-monolith.md:343
Finding

GitHub Token Is Embedded in the Repository Remote URL

Content
View full analysis
:@github.com//.git" git config user.email "assistant@" git config user.name "" ``` ```markdown Le token est stocké dans `.git/config` (pas versionné). L'agent peut push directement grâce à `network: bridge`. ``` ### Technical Analysis Embedding a GitHub token in the remote URL stores it in plaintext within `.git/config`. The token may be disclosed by `git remote -v`, configuration inspection, filesystem backups, support bundles, shell history, or any Agent with access to the mounted repository. The same guidance gives the Agent direct push capability, so theft of the token can immediately become unauthorized source-code modification. ### Attack Path 1. An attacker compromises or prompt-injects the client Agent. 2. The Agent reads `/mnt/site/.git/config` or invokes `git remote -v`. 3. The attacker extracts the embedded GitHub token. 4. The token is reused against GitHub outside the sandbox. 5. The attacker clones private code, modifies branches, or pushes malicious commits according to the token’s permissions. ### Impact Assessment The attacker may obtain repository read or write access, disclose proprietary source code, alter production website content, introduce malicious code, or compromise deployments linked to the repository. ]]>
Remediation
View remediation

T06 · System Persistence

Error
Location
references/legacy-monolith.md:482
Finding

Recurring Monitoring Job Sends Client Usage Data to a Hardcoded Phone Number

Content
View full analysis
-usage-alert" \ --agent david \ --every "1h" \ --announce --channel whatsapp --to "+886920010612" \ --best-effort-deliver \ --message "Check usage agent aujourd'hui. Alerte si > 5 USD." \ --thinking low \ --model "anthropic/claude-haiku-4-5" ``` ### Technical Analysis This command creates a cross-session recurring task that runs every hour and sends client-related usage information to a fixed telephone number. The recipient is not derived from client configuration and no approval, expiry, ownership verification, or cleanup procedure is defined. Although located in a legacy reference, the file is distributed as part of the project and presents the command as recommended operational guidance. ### Attack Path 1. An operator follows the legacy setup procedure. 2. The command registers a persistent hourly OpenClaw cron job. 3. The task checks usage for each configured client. 4. When its alert condition is met, the task sends the client identifier and spending information to the hardcoded WhatsApp number. 5. The disclosure continues across sessions until the job is manually discovered and removed. ### Impact Assessment The fixed recipient may receive client identity and spending information without client approval. The task survives the original setup run and can continue disclosing information indefinitely. It may also consume model and messaging resources every hour. ]]>
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/legacy-monolith.md:331
Finding

Writable External Host Bind Mount Breaks Workspace Isolation

Content
View full analysis
:@github.com//.git" git config user.email "assistant@" git config user.name "" ``` ```markdown Le token est stocké dans `.git/config` (pas versionné). L'agent peut push directement grâce à `network: bridge`. ``` ### Technical Analysis The configuration explicitly bypasses external bind-source restrictions and mounts a host repository into the sandbox with default read-write behavior. The Agent can alter the complete repository rather than a narrowly scoped content directory and is also given network access and credentials for direct pushes. A container filesystem marked read-only does not protect writable host bind mounts. Prompt injection can therefore turn normal file-editing tools into a host repository modification and deployment channel. ### Attack Path 1. An attacker supplies malicious instructions through WhatsApp, web content, or a document. 2. The Agent writes attacker-selected files under `/mnt/site`. 3. The Agent modifies source, build configuration, workflows, or deployment files in the mounted host repository. 4. The Agent commits the changes and uses the configured token to push them. 5. Automated deployment systems build and publish the malicious commit. ### Impact Assessment The attacker may modify host-resident source code, compromise a client website, steal repository credentials, poison CI/CD workflows, or introduce code that executes in downstream build and production environments. The effect can extend beyond the sandbox and persist in ver ...[truncated 17 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
references/legacy-monolith.md:459
Finding

Force-Kill Gateway Restart Procedure Can Cause Service Disruption

Content
View full analysis
/tmp/openclaw-gateway.log 2>&1 & ``` ### Technical Analysis The restart procedure uses `pkill -9` with a pattern match, which forcefully terminates every matching process without graceful shutdown. SIGKILL prevents cleanup, state flushing, and completion of in-flight operations. Pattern-based termination may also affect unintended processes with matching command lines. The gateway is then relaunched through `nohup` rather than a supervised service manager, weakening restart guarantees, ownership controls, and operational auditing. ### Attack Path 1. An operator or automated Agent follows the legacy restart procedure. 2. `pkill -9 -f openclaw-gateway` terminates all matching gateway processes immediately. 3. Active sessions, writes, or message deliveries are interrupted. 4. The unmanaged `nohup` launch fails, starts with an unexpected environment, or conflicts with another instance. 5. Client messaging and gateway services remain unavailable or operate inconsistently. ### Impact Assessment The procedure can cause denial of service, dropped messages, incomplete state writes, duplicate gateway instances, and loss of in-flight work across all clients served by the gateway. ]]>
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (17)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest description and operational instructions are presented in French, and the skill does not indicate that the user can choose another language. This can violate a language/locale policy when a skill implicitly forces a specific language without user opt-in or documented justification.

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 · references/legacy-monolith.md (reported line 27)May include surrounding context.

1. Créer le workspace

bash
mkdir -p ~/.openclaw/workspace-<client>/docs

2. Créer SOUL.md

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instruction "Répondre en français" mandates a specific language for all interactions. Under the policy, forcing a language without offering user choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The USER.md template sets "Langue : Français" by default rather than capturing the client's actual language preference. This imposes a locale choice without opt-in and may propagate the policy violation into deployed client workspaces.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
90% confidence
Finding

The skill instructs operators to restart the gateway with a detached nohup background process and force-kill any existing gateway process. This creates unmanaged long-lived service persistence outside a proper supervisor, increasing the risk of insecure startup flags, log leakage to /tmp, operational drift, and accidental exposure or bypass of normal service controls in a multi-tenant environment.

Content

Scanner excerpt · references/legacy-monolith.md (reported line 464)May include surrounding context.

md
# Redémarrer la gateway
pkill -9 -f openclaw-gateway || true
nohup openclaw gateway run --bind loopback --port 18789 --force > /tmp/openclaw-gateway.log 2>&1 &

# Lancer le login WhatsApp pour le client
openclaw channels login --channel whatsapp --account <client>

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The document instructs operators to insert a dedicated OpenAI API key directly into an auth-profiles JSON file, but provides no handling controls such as least-privilege scopes, file permission requirements, secret manager usage, rotation guidance, or redaction/logging precautions. In a workspace-setup skill, this is more dangerous because it normalizes plaintext secret placement during routine provisioning, increasing the chance of credential leakage via backups, shell history, repo copies, or overbroad file access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The guidance explicitly places OPENAI_API_KEY and other sensitive values into sandbox environment variables, while also describing a multi-agent sandboxed environment. Environment variables are commonly exposed to child processes, debug output, crash reports, container inspection, and potentially other tooling, so storing long-lived secrets there without explicit safeguards materially increases credential exposure risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The entire checklist and instructions are written in French, including prescriptive wording such as 'Toujours exprimer les rappels ainsi', with no indication that language selection is optional or user-driven. Under the stated policy, forcing a specific language or locale without opt-in is a natural-language policy violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The template instruction 'Répondre en français' imposes a specific language by default. Under the policy, forcing a language without offering user choice or opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The USER.md template includes 'Langue : Français' as a fixed value rather than a user-selected preference. This hard-codes a locale/language assumption without opt-in or an explicit justification.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · references/templates.md (reported line 86)May include surrounding context.

md
- Utiliser l'outil `message`

## Nango — OAuth2 clients
Connecter les services Google des clients → lire `skills/nango-oauth/SKILL.md`

## Escalation
- Lire `skills/escalation/SKILL.md` pour la procédure complète

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
80% confidence
Finding

This line discloses the existence and operational detail of an escalation mechanism, including that a webhook gateway is used to wake a supervisor. In an adversarial prompt-injection setting, revealing internal control-plane components and preferred invocation paths can help an attacker craft targeted social engineering or instruction-hijacking attempts against escalation workflows.

Content

Scanner excerpt · references/templates.md (reported line 89)May include surrounding context.

md
Connecter les services Google des clients → lire `skills/nango-oauth/SKILL.md`

## Escalation
- Lire `skills/escalation/SKILL.md` pour la procédure complète
- Utilise le webhook gateway (pas sessions_send) pour réveiller le superviseur
- Inclure: problème, tentatives, résultat

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The workflow instructs operators to obtain and configure a dedicated OpenAI API key for each client agent, but it gives no handling guidance for secure collection, storage, rotation, masking, or revocation. In a setup skill that creates persistent workspaces and auth profiles, this omission can lead to credential leakage through files, shell history, logs, screenshots, or reuse of improperly scoped secrets.

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 · references/workflow.md (reported line 14)May include surrounding context.

1) Creer le workspace

bash
mkdir -p ~/.openclaw/workspace-<client>/docs

2) Generer les fichiers de base

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The escalation skill is described as sending data to an external webhook gateway to wake a supervisor, but the workflow does not define what data may be transmitted, what should be redacted, or what consent/privacy constraints apply. Because this skill handles client WhatsApp, transcripts, and inter-agent communications, escalation could unintentionally exfiltrate sensitive client content to another service or operator.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The instruction states an absolute rule to use a specific model choice unless there is an explicit request from a named individual. This is a natural-language policy-style constraint that is imposed categorically and is not presented as a user choice or clearly justified compliance requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The operational instructions are presented entirely in French, which can function as a language constraint for users or operators who do not share that locale. There is no note indicating that French is optional, that another language version exists, or that the workflow is intentionally limited to a French-speaking environment.

Content

No source excerpt is available for this finding.