Back to skill

Security audit

ClawBrain Smart Retry

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly an error-recovery guide, but it tells the agent to install missing dependencies automatically without clear approval or package-source controls.

Review before installing. The skill should be acceptable only if you are comfortable with an agent being told to install missing dependencies during recovery; safer use would require the agent to identify the package from a trusted manifest and ask before installing an exact version.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (1)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:33
Finding

Automatic Installation of Unverified Dependencies

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 33
Vulnerability Type: Insecure dependency installation
Risk Level: Medium

Vulnerable Code Snippet

markdown
**缺少依赖** → 先安装再执行

English translation: “Missing dependency → install it first, then execute.”

Technical Analysis

This instruction directs the agent to install missing dependencies automatically before continuing execution. It does not require:

  • Explicit user authorization
  • Validation of the inferred package name
  • Use of an approved package registry
  • Version or cryptographic hash pinning
  • Inspection of package provenance
  • Isolation or least-privilege execution
  • Disabling package installation hooks

An attacker may influence a task, project, error message, or dependency reference so that the agent infers and installs an attacker-controlled package. This creates exposure to typosquatting and dependency-confusion attacks. Package managers may execute installation hooks immediately, allowing malicious code to run before the requested task resumes.

Attack Path

  1. The agent processes an untrusted project or task that refers to a missing dependency.
  2. The project, task content, or generated error causes the agent to infer an attacker-selected or ambiguous package name.
  3. Following the Skill instruction, the agent installs the package without requesting approval or validating its identity and origin.
  4. The package manager retrieves a malicious package from a configured registry.
  5. Installation hooks or imported package code execute with the agent process's permissions.
  6. The malicious package may access files and credentials available to that process, modify the working environment, or execute additional commands.

Impact Assessment

Successful exploitation can provide arbitrary code execution with the permissions of the user or service running the agent. The affected scope may include the project workspace, environment variables, package-manager credent ...[truncated 396 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace automatic installation with a requirement to obtain explicit user approval.
  • Determine dependencies from reviewed manifests or lockfiles rather than error text or untrusted task content.
  • Restrict installation to approved registries and verify package namespace and publisher identity.
  • Pin exact versions and cryptographic hashes through a lockfile or equivalent integrity mechanism.
  • Detect potential typosquatting and dependency-confusion conditions before installation.
  • Review package metadata and installation scripts before allowing execution.
  • Disable lifecycle or installation scripts where the package manager supports doing so.
  • Install dependencies inside an isolated, disposable, least-privilege environment.
  • Avoid exposing unrelated credentials, sensitive environment variables, or host directories to the installation process.
  • Record the selected package, version, registry, and verification outcome in an audit log.

A safer replacement instruction would be:

markdown
If a dependency is missing, identify it from a trusted manifest, explain the required package and source, and request user approval before installing an exact, verified version in an isolated environment.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The file's user-facing description and instructions are presented only in Chinese, which can amount to a language-policy violation when no user opt-in or alternative locale is offered. The document does not state that the skill is intended only for Chinese-speaking users or provide any language-selection mechanism.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.