Back to skill

Security audit

GLM Search Pro

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent web-search skill, but it needs review because optional MCP setup stores an API key and can run unpinned npm code during setup or MCP use.

Use the cURL mode unless you specifically need MCP. Before using MCP setup, review the unpinned npx mcporter calls, avoid running setup in untrusted environments, and understand that MCP stores your Zhipu API key on disk and includes it in a URL query parameter.

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

Warning
Location
scripts/glm-search.sh:122
Finding

Unpinned mcporter Package Is Downloaded and Executed at Runtime

Content
View full analysis
/dev/null && ! command -v npx &>/dev/null; then echo "Error: mcporter/npx not found." >&2 echo "Install: npm i -g mcporter" >&2 return 1 fi local extra_args=() [ -n "$DOMAIN" ] && extra_args+=("search_domain_filter=$DOMAIN") exec npx -y mcporter --config "$MCP_CONFIG" call "glm-search.${MCP_TOOL}" \ search_query="$QUERY" \ count="$COUNT" \ search_recency_filter="$RECENCY" \ content_size="$CONTENT_SIZE" \ "${extra_args[@]+"${extra_args[@]}"}" ``` The same unsafe package invocation also occurs during MCP verification in `scripts/setup.sh:71`: ```bash RESULT=$(npx -y mcporter --config "$MCP_CONFIG" list glm-search 2>&1) || true ``` ### Technical Analysis The scripts invoke `npx -y mcporter` without specifying a reviewed package version or verifying package integrity. When the package is not already present in the relevant npm cache, `npx` can retrieve the current package release from the configured npm registry and execute it immediately. The `-y` option suppresses the installation confirmation. Consequently, the code executed by the Skill can change after the Skill itself has been reviewed. Compromise of the package, its maintainer account, a transitive dependency, or the configured npm registry could result in arbitrary code execution. The risk is increased because `mcporter` is given access to `mcporter.json`. In MCP mode, that file contains the Zhipu API key in the broker URL. Although the script checks whether a globally installed `mcporter` executable exists, it still invokes `npx`, rather than explicitly invoking that installed executable. ### Attack Path 1. An attacker compromises the `mcporter` package, one of its dependencies, its publishing acco ...[truncated 1247 chars]
Remediation
View remediation
... ``` 2. Prefer declaring the dependency in a package manifest and committing a lockfile with integrity hashes. 3. Install dependencies in a controlled setup phase using `npm ci`, then invoke the pinned local executable: ```bash ./node_modules/.bin/mcporter --config "$MCP_CONFIG" ... ``` 4. Do not download executable dependencies during ordinary search operations. 5. Use a trusted registry and incorporate package provenance, signature, and integrity validation into the release process. 6. Run the dependency with the minimum filesystem and environment access necessary. Avoid exposing unrelated credentials to its process. 7. If a reviewed global `mcporter` installation is supported, invoke `mcporter` directly rather than checking for it and then executing `npx`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup.sh:43
Finding

Environment-Controlled API Key Is Interpolated into Executable Python Source

Content
View full analysis
Remediation
View remediation
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
  • Rogue AgentSelf-Modification, Session Persistence
Findings (15)

Instruction Override

High
Category
Prompt Injection
Confidence
90% confidence
Finding

This pattern attempts to override system instructions or ignore safety constraints. Without LLM analysis, manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 165)May include surrounding context.

If the Gateway runs as a systemd user service:

bash
# Edit the service override
systemctl --user edit openclaw-gateway

# Add the following in the editor:

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises capabilities that include reading environment variables, invoking shell commands, and potentially writing files during setup, but it does not declare an explicit tool scope such as permissions or allowed-tools. This weakens least-privilege controls and makes it harder for a host to constrain execution, especially because setup paths persist configuration and include secret material.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are broad and include generic terms like "look up," "search for," and multilingual equivalents, which can cause the skill to activate in contexts where the user did not intend outbound web access. Unintended activation increases the chance of unnecessary data transmission to an external provider and unexpected shell/API execution.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · SKILL.md (reported line 101)May include surrounding context.

Examples

bash
# Basic search (cURL mode auto-selected)
glm-search "OpenClaw framework"

# Recent news, more results

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The skill instructs users to persist the API key in a long-lived systemd user service file, creating session persistence for a secret beyond the current shell session. Persistent plaintext secrets on disk increase exposure through backups, local compromise, accidental disclosure, or broader-than-expected file access; in this skill's context, that risk is elevated because the same documentation also supports optional disk-based MCP configuration containing credentials.

Content

Scanner excerpt · SKILL.md (reported line 177)May include surrounding context.

systemctl --user restart openclaw-gateway

text

Or create the file manually:

```bash
mkdir -p ~/.config/systemd/user/openclaw-gateway.service.d

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The MCP broker example places the API key in the URL query string (?Authorization=<ZHIPU_API_KEY>). Query parameters are commonly exposed through logs, browser history, shell history, proxy/CDN logs, monitoring systems, and referrer propagation, so documenting this pattern without a clear warning can lead users to leak long-lived credentials unintentionally.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · references/api-notes.md (reported line 53)May include surrounding context.

md
- `medium` — 400-600 character summaries
- `high` — up to 2500 character summaries (higher cost)

## cURL Examples

### Basic

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/glm-search.sh (reported line 57)May include surrounding context.

sh
echo "  -e, --engine NAME  pro|sogou|quark|std (default: pro)" >&2
  echo "  -r, --recency F    noLimit|oneYear|oneMonth|oneWeek|oneDay" >&2
  echo "  -s, --size SIZE    medium|high" >&2
  echo "  -i, --intent       Enable intent recognition (cURL mode)" >&2
  echo "  -d, --domain D     Restrict to domain" >&2
  echo "  --curl             Force cURL mode" >&2
  echo "  --mcp              Force MCP mode" >&2

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
98% confidence
Finding

Using exec npx -y mcporter without pinning an exact package version allows the script to download and execute whatever version is current at runtime. If the npm package is compromised, typo-squatted, or a malicious version is published, running this skill could lead to arbitrary code execution in the user's environment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script sends the user's query and optional domain filter to an external third-party API over the network without any explicit consent prompt or warning at the moment of transmission. In an agent skill context, users may provide secrets, internal project names, or sensitive research terms, creating a meaningful privacy and data-leakage risk.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/setup.sh (reported line 44)May include surrounding context.

sh
# 4. Write mcporter config with restrictive permissions
mkdir -p "$MCP_DIR"
chmod 700 "$MCP_DIR"

python3 << PYEOF
import json, os, stat

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The script executes npx -y mcporter without pinning an exact package version, so setup behavior depends on whatever package version is current at execution time. If the package is compromised, typosquatted, or a malicious new release is published, arbitrary code could run during setup on the user's machine.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

This second invocation again uses npx -y mcporter without a pinned version, creating the same supply-chain risk during the verification step. Because setup scripts are often run with user trust and access to secrets, an unexpected package update could execute attacker-controlled code and access the API key or local files.

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/setup.sh (reported line 87)May include surrounding context.

sh
fi
fi

echo "Verifying cURL connection..."
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \