Back to skill

Security audit

Auto Model Switch

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly coherent, but it can automatically change model routing through a gateway token and may send that token over unencrypted HTTP if configured that way.

Review this skill before installing. Use it only with a local gateway or HTTPS gateway, protect and rotate OPENCLAW_GATEWAY_TOKEN, and understand that heartbeat mode can change the active model without asking at the moment of switching. Also consider updating dependencies and confirming that the fallback models meet your cost, data-handling, and compliance expectations.

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)

T09 · Insecure Skill Coding Practices

Warning
Location
auto_model_switch.js:149
Finding

Gateway bearer token may be transmitted over unencrypted HTTP

Content
View full analysis
{ ``` The same credential is transmitted when changing the configured model: ```javascript const options = { method: 'POST', headers: { 'Authorization': `Bearer ${this.gatewayToken}`, 'Content-Type': 'application/json', 'Content-Length': Buffer.byteLength(data) } }; const req = client.request(url, options, (res) => { ``` The documentation explicitly demonstrates `OPENCLAW_GATEWAY_URL="http://localhost:3000"`. While loopback traffic has less exposure than traffic crossing a network, the code does not enforce loopback-only use for HTTP. An operator can configure a remote or shared-network HTTP endpoint, causing the bearer token and gateway responses to travel without transport encryption. Bearer tokens are replayable credentials. HTTP provides no confidentiality or server authentication, so an on-path party may observe the token or impersonate the gateway. The implementation also does not issue a warning when a non-loopback HTTP URL is used. ### Attack Path 1. An operator follows the documented configuration pattern but sets `OPENCLAW_GATEWAY_URL` to an `http://` addr ...[truncated 1431 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
package-lock.json:14
Finding

Dependencies are resolved through a third-party npm registry mirror

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (19)

Known Vulnerable Dependency: js-yaml==4.1.1 — 4 advisory(ies): CVE-2026-84375 (js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources); CVE-2026-59869 (js-yaml: YAML merge-key chains can force quadratic CPU consumption); GHSA-5p4m-2wfm-xmqj (JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026) +1 more

High
Category
Supply Chain
Confidence
97% confidence
Finding

The lockfile pins js-yaml to version 4.1.1, and the reported advisories describe CPU-denial-of-service conditions during parsing of crafted YAML inputs. If this skill parses attacker-controlled or user-supplied YAML, an adversary could trigger excessive CPU consumption and degrade or stall the agent process. In the context of an agent skill, this is more dangerous when configuration or external content can be provided dynamically.

Content

No source excerpt is available for this finding.

Known Vulnerable Dependency: js-yaml==4.1.1 — 4 advisory(ies): CVE-2026-84375 (js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources); CVE-2026-59869 (js-yaml: YAML merge-key chains can force quadratic CPU consumption); GHSA-5p4m-2wfm-xmqj (JS-YAML: Quadratic CPU consumption in !!omap resolution (3.x and 4.x) — CVE-2026) +1 more

High
Category
Supply Chain
Confidence
96% confidence
Finding

The package depends on js-yaml in a version range associated with multiple published advisories involving CPU exhaustion during YAML parsing. If this skill parses attacker-controlled or even semi-trusted YAML, an attacker could trigger denial of service through resource-intensive payloads, which is especially relevant for an automation skill expected to remain available during failure conditions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file includes an example exporting OPENCLAW_GATEWAY_TOKEN, which is a sensitive credential, but provides no warning about keeping it secret, avoiding shell history exposure, or using safer secret-management practices. Under the markdown-specific warning criteria, credential-related behavior that can affect privacy or system integrity should be disclosed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The README content is written entirely in Chinese and does not provide an alternative language option or indicate that the skill is intentionally limited to a Chinese-speaking audience. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill documents executable commands and operational behaviors that imply access to environment variables, reading configuration, and writing state, but it does not declare any explicit tool scope or permissions boundary. This increases the chance of over-broad execution in hosts that rely on manifest-level scoping, making unintended file or secret access harder to audit and constrain.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill instructs users to export a gateway token in environment variables without any guidance on secret handling, storage, rotation, or avoiding disclosure in logs and shell history. Because this skill interacts with a gateway service, token exposure could allow unauthorized API access or abuse of the model-switching backend.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language interface is consistently Chinese, including comments, status messages, errors, help text, and notifications. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation because users are not given any mechanism to select another language.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file header documents '自动检测API限流' as a provided feature. However, the code never inspects gateway HTTP responses for 429 or similar rate-limit indicators, and recordRateLimit() is defined but not invoked anywhere. This is an active contradiction between documented capability and implemented behavior.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says the skill automatically switches models when tokens are exhausted or when the model is rate-limited. In code, shouldSwitch() only checks token usage percentage against a critical threshold, while rate-limit state is only used to exclude backup candidates in getNextModel() and never triggers a switch from the current model. This means one of the core claimed behaviors is not actually implemented.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The skill can automatically issue a network request to reconfigure the model selection on the gateway without interactive confirmation at the moment of action. In a sensitive agent environment, automatic reconfiguration can unexpectedly alter routing, cost, policy boundaries, or data-handling characteristics, especially if backup models differ in trust, retention, or compliance posture.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module title and description are written entirely in Chinese and provide no indication that language selection is optional or that the skill is intended only for a Chinese-language environment. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This manifest contains user-facing natural language such as the title comment and notification message exclusively in Chinese. Under the policy, forcing a specific language without user opt-in or clear locale justification 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

This file contains natural-language comments and status strings in Chinese, which imposes a specific language on users and maintainers. Under the policy, forcing a language without user opt-in or a documented regional justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python file contains user-facing strings and docstrings entirely in Chinese, including status and completion messages printed during execution. Because the file provides no opt-in, language selection, or justification that it is intended only for a Chinese-speaking context, it appears to impose a specific language/locale in a way that violates the stated policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documentation forces a specific language for all user-facing instructions, and there is no indication that the skill is region-specific or that users can opt into another language. This matches the policy category for language or locale constraints without user choice or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The file consistently forces a single language for the skill description and usage instructions, and does not provide an opt-in or alternative language. Per the policy, locale or language constraints should either offer user choice or be explicitly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The package description is written only in Chinese, which can amount to a language/locale policy issue when the skill metadata is presented to users without offering an alternative language or documenting that the skill is intended for a Chinese-only audience. The file does not indicate any user opt-in or justified region-specific scope.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
90% confidence
Finding

Using a caret range for dependencies allows newer compatible versions to be installed over time, which reduces build reproducibility and can unexpectedly introduce vulnerable or malicious transitive updates. In a skill package, this increases supply-chain risk because installs may not be deterministic across environments.

Content

Scanner excerpt · package.json (reported line 20)May include surrounding context.

json
"author": "龙虾小队",
  "license": "MIT",
  "dependencies": {
    "js-yaml": "^4.1.0"
  }
}