Back to skill

Security audit

ClawHub Quarantine Installer

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly security-focused, but it asks users to run high-impact unpinned installation commands for suspicious skills without enforcing a real sandbox.

Install only after careful review. Treat this as a helper for organizing files and producing a basic text report, not as a sandbox. Run it only inside a disposable VM or container with no sensitive credentials, pin and verify the clawhub CLI if possible, and manually inspect any installed skill before moving it into production.

Vulnerability Patterns
  • 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
  • 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 (2)

T08 · Insecure Dependencies

Error
Location
scripts/install_and_audit.sh:8
Finding
Unpinned Package Retrieval and Execution Through npx<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install_and_audit.sh`, lines 8-19 **Vulnerability Type**: Unpinned third-party package execution **Risk Level**: High ### Vulnerable Code ```bash CLAWHUB_BIN="npx clawhub" if [ -z "$SKILL_NAME" ]; then echo "Uso: $0 <nome-da-skill>" exit 1 fi mkdir -p "$QUARANTINE_DIR" mkdir -p "$AUDIT_REPORT_DIR" echo "Iniciando instalação da skill '$SKILL_NAME' em quarentena..." # Using --dir to specify the installation directory for the skill $CLAWHUB_BIN install "$SKILL_NAME" --dir "$QUARANTINE_DIR" --force ``` The associated documentation also recommends an unpinned installation command in `SKILL.md`, line 52: ```text * **`clawhub` CLI**: Pode ser instalado globalmente via `npm i -g clawhub`. ``` ### Technical Analysis The script invokes `npx clawhub` without specifying an exact package version or validating package integrity. If the package is not already available locally, `npx` may retrieve the current package from the configured npm registry and execute it. Consequently, the code executed during installation is not fully determined by the reviewed project. It can change after the audit due to a legitimate update, registry compromise, maintainer-account compromise, package takeover, or malicious registry configuration. The globally documented `npm i -g clawhub` command has the same version-pinning weakness. The CLI is executed before the downloaded skill is audited. Any malicious behavior in the CLI, its dependencies, or applicable lifecycle behavior therefore occurs before the project’s pattern-based security checks can provide a warning. ### Attack Path 1. An attacker compromises the `clawhub` package, one of its dependencies, its maintainer account, or the package distribution path. 2. The attacker publishes a malicious version under the expected package name. 3. A user runs `scripts/install_and_audit.sh`. 4. `npx clawhub` resolves and downloads the unpinned package version. 5. The packa ...[truncated 917 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin `clawhub` to an exact, reviewed version rather than resolving the latest available release. 2. Declare the dependency in a project manifest and commit the corresponding lockfile. 3. Use npm integrity verification and retain verified package hashes in the release process. 4. Install the dependency in a controlled build stage instead of allowing `npx` to retrieve packages during each audit. 5. Invoke the verified local executable directly, for example through a project-local `node_modules/.bin` path. 6. Disable dependency lifecycle scripts where compatible with the required CLI behavior. 7. Use a trusted registry configuration and prevent environment-controlled registry substitution. 8. Run the verified CLI inside a disposable sandbox with no sensitive credentials and minimal network access. 9. Record the exact CLI version and integrity information in every generated audit report. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
scripts/install_and_audit.sh:4
Finding
Filesystem Directory Is Presented as Quarantine Without Enforced Isolation<![CDATA[ ## Vulnerability Details **File Location**: `scripts/install_and_audit.sh`, lines 4-19 **Vulnerability Type**: Ineffective security boundary and unsafe execution environment **Risk Level**: High ### Vulnerable Code ```bash QUARANTINE_BASE_DIR="$HOME/.openclaw/clawhub-quarantine" QUARANTINE_DIR="$QUARANTINE_BASE_DIR/skills" AUDIT_REPORT_DIR="$QUARANTINE_BASE_DIR/reports" AUDIT_SCRIPT="$(dirname "$0")/clawhub-quarantine.sh" CLAWHUB_BIN="npx clawhub" if [ -z "$SKILL_NAME" ]; then echo "Uso: $0 <nome-da-skill>" exit 1 fi mkdir -p "$QUARANTINE_DIR" mkdir -p "$AUDIT_REPORT_DIR" echo "Iniciando instalação da skill '$SKILL_NAME' em quarentena..." # Using --dir to specify the installation directory for the skill $CLAWHUB_BIN install "$SKILL_NAME" --dir "$QUARANTINE_DIR" --force ``` The documentation acknowledges remote-code risk in `SKILL.md`, line 17, but the implementation does not enforce the documented VM or container requirement: ```text * **Importante:** O script `install_and_audit.sh` usa `npx clawhub install --force`. Este comando irá **baixar e executar código remoto** do registro `npm`. **É crucial que esta skill seja executada APENAS em um ambiente isolado (como uma VM ou container Docker) que não tenha acesso a dados sensíveis ou à sua máquina de produção.** A quarentena isolada é projetada para mitigar, mas não eliminar, todos os riscos. ``` ### Technical Analysis The implemented “quarantine” is only a destination directory under the current user’s home directory. Selecting an installation directory does not create a process-security boundary. The installer retains the invoking user’s filesystem permissions, environment variables, network connectivity, process capabilities, and access to resources outside the quarantine directory. There are no namespace restrictions, container controls, read-only mounts, syscall filters, resource limits, network restrictions, credential sanitization, or disposable user accounts. The use of `--force ...[truncated 1847 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Perform installation inside a disposable virtual machine or container rather than merely changing the destination directory. 2. Refuse to continue unless the script can verify that it is running in an approved isolated environment. 3. Run the installer as a dedicated, unprivileged user with no access to the operator’s home directory. 4. Start the process with a clean environment and explicitly pass only required non-secret variables. 5. Mount the host filesystem read-only or expose only an empty temporary workspace. 6. Disable network access by default; if registry access is required, restrict egress to explicitly approved endpoints and disable it before inspecting the installed content. 7. Apply process and resource controls, including namespace isolation, syscall filtering, capability removal, process limits, memory limits, and execution timeouts. 8. Download and statically inspect package contents before permitting lifecycle hooks or other code execution. 9. Avoid `--force` by default and require an explicit, highly visible override for flagged packages. 10. Treat the generated `ripgrep` report only as an initial heuristic. Add archive inspection, dependency inventory, lockfile analysis, secret scanning, and manual source review before executing downloaded code. 11. Update the user-facing output to state clearly that the directory itself is not a security sandbox. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
The skill markets itself as a quarantine and security-audit mechanism, but the described implementation does not provide a true isolated runtime, real behavioral monitoring, or meaningful dependency investigation. This mismatch is dangerous because it can create false assurance: users may treat untrusted skills as safely vetted while still executing remote code and performing only superficial text-pattern scanning.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill describes behavior that can access environment context and invoke external tooling, but it does not declare any explicit tool scope or permissions boundary. In a package that installs and audits untrusted skills, missing scope is dangerous because operators and platforms cannot enforce least privilege or clearly understand what resources the skill may touch.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
Using `npx clawhub install --force` without a pinned version causes the runtime to fetch and execute whatever version of `clawhub` is current at execution time. That creates a supply-chain risk where a compromised, malicious, or simply breaking upstream release can execute arbitrary code during installation, especially severe here because the skill explicitly installs suspicious third-party skills.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The second reference to unpinned `npx clawhub` repeats the same supply-chain hazard: the auditing workflow depends on code fetched at runtime from npm without version control. In this context, that undermines the trustworthiness of the quarantine process itself because the installer used to inspect suspicious skills is also mutable and remotely supplied.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The script invokes `npx clawhub` without pinning an exact package version, so execution depends on whatever version `npx` resolves at runtime. In a security-sensitive quarantine installer, this creates a supply-chain risk: a newer, compromised, or unexpected CLI version could run arbitrary code during installation or alter audit behavior.

Session Persistence

Medium
Category
Rogue Agent
Content
exit 1
fi

mkdir -p "$QUARANTINE_DIR"
mkdir -p "$AUDIT_REPORT_DIR"

echo "Iniciando instalação da skill '$SKILL_NAME' em quarentena..."
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.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
Todo o conteúdo descritivo e operacional do arquivo está em português, incluindo instruções de uso e avisos de segurança, sem indicar opção de idioma ou justificativa regional. Isso pode violar uma política de idioma/locale quando a skill força um idioma específico sem opt-in do usuário.

Natural-Language Policy Violations

Low
Confidence
98% confidence
Finding
The usage text is hard-coded in Portuguese, which imposes a specific language on users. This pattern continues in other user-facing output and there is no opt-in, fallback, or documented locale constraint visible in the file.

Natural-Language Policy Violations

Low
Confidence
96% confidence
Finding
The audit progress/report strings are emitted only in Portuguese, which constitutes a language policy concern when no user choice or justification is provided. The file does not indicate that this skill is region-specific or Portuguese-only by design.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
Error/help output shown to users is restricted to Portuguese only. Because the file provides no mechanism to choose language and no documented regional limitation, this is a natural-language policy violation under the locale rule.

Natural-Language Policy Violations

Low
Confidence
97% confidence
Finding
This shell script presents all user-facing messages in Portuguese, including usage, status, warnings, and error messages. Because the file provides no opt-in, fallback, or documentation that the skill is intentionally locale-specific, it conflicts with the policy against forcing a specific language without user choice.

Static analysis

Detected: suspicious.env_credential_access

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
scripts/clawhub-quarantine.sh:33