Back to skill

Security audit

Nano Gpt Plugin

Security checks for vulnerabilities and agentic risk

Overview

The NanoGPT provider behavior is mostly coherent, but its bundled development workflow can delete remote OpenClaw session data and expose API keys or transcripts, so it needs review before use.

Do not run final_integration_test.sh against any non-disposable host or account. Treat the NanoGPT API key as sensitive, rotate it if it has appeared in logs, avoid committing test_results/, and verify the exact package name and dependency set before installing. Normal provider use appears purpose-aligned, but the bundled development and release workflow needs containment and cleanup fixes.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (5)

T09 · Insecure Skill Coding Practices

Error
Location
final_integration_test.sh:17
Finding

API Key Disclosure Through Shell Tracing and Command-Line Expansion

Content
View full analysis
/dev/null; mkdir -p $REMOTE_PLUGIN_DIR && tar -xzf - -C $REMOTE_PLUGIN_DIR" # 2) Remove existing plugin and install echo "Step 2: Installing plugin..." ssh -o ConnectTimeout=120 "$REMOTE_HOST" "set -x ; rm -rf /home/node/.openclaw/extensions/nano-gpt 2>/dev/null; rm ~/.openclaw/agents/main/sessions/* ;cd '$REMOTE_PLUGIN_DIR'; openclaw plugins install '$REMOTE_PLUGIN_DIR' " # 3) Start gateway echo "Step 3: Starting gateway..." ssh -o ConnectTimeout=30 "$REMOTE_HOST" "nohup openclaw gateway run > /tmp/gateway.log 2>&1 & sleep 5; openclaw gateway health" # 4) Onboard with NanoGPT echo "Step 4: Onboarding with NanoGPT..." ssh -o ConnectTimeout=30 "$REMOTE_HOST" "openclaw onboard --non-interactive --accept-risk --nano-gpt-api-key \"$NANOGPT_API_KEY\" --flow quickstart --skip-health" ``` ### Technical Analysis The script enables `set -x` before expanding `NANOGPT_API_KEY` into an SSH command. Shell tracing prints expanded commands to standard error, so the real API key can be written to interactive terminal output, CI logs, build logs, or other log collectors. The key is also supplied as a command-line argument to `openclaw onboard`. Depending on process visibility and timing, command arguments may be observable through process-inspection interfaces on the remote system. The remote installation command independently enables `set -x`, demonstrating that traced execution is part of the test workflow. Although transmitting the key to NanoGPT is necessary for the provider, exposing it through diagnostic tracing ...[truncated 874 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
final_integration_test.sh:28
Finding

Integration Test Deletes All Remote Main-Agent Sessions

Content
View full analysis
/dev/null; rm ~/.openclaw/agents/main/sessions/* ;cd '$REMOTE_PLUGIN_DIR'; openclaw plugins install '$REMOTE_PLUGIN_DIR' " ``` ### Technical Analysis The integration script deletes every file matched by `~/.openclaw/agents/main/sessions/*` on the configured remote host. The deletion is not restricted to sessions created by this plugin or by the current test run. Testing model registration and usage reporting does not require deleting unrelated agent history. The operation therefore exceeds the minimum privileges and data scope necessary for the declared provider functionality. The script uses `set -e`, but the deletion itself has no confirmation, backup, dedicated test profile, or ownership validation. ### Attack Path 1. A contributor follows the repository instructions and runs `bash final_integration_test.sh`. 2. The script connects to the host identified by the `ssh_gateway` alias. 3. The remote shell expands `~/.openclaw/agents/main/sessions/*`. 4. Every matching session file belonging to the remote account is deleted. 5. Unrelated conversations or workflow state become unavailable. No external attacker is required; the destructive effect occurs through normal use of the supplied integration workflow. An attacker who can influence the SSH alias or persuade an operator to run the script could direct the same operation at an unintended environment. ### Impact Assessment The command can destroy all session-history files for the remote account's main OpenClaw agent. This may cause irreversible conversation loss, loss of workflow context, operational disruption, and deletion of evidence needed for troubleshooting or auditing. Its scope includes ...[truncated 43 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
final_integration_test.sh:69
Finding

Integration Workflow Copies Full Session Transcripts Into Project Artifacts

Content
View full analysis
/dev/null || echo 'test-nano-final-$(date +%s)'") echo "Looking for session: $LAST_SESSION_ID" scp "$REMOTE_HOST:/home/node/.openclaw/agents/main/session/${LAST_SESSION_ID}.jsonl" "$PLUGIN_DIR/test_results/$DATE/" 2>/dev/null || true # Also collect any test-nano files from recent runs as fallback scp "$REMOTE_HOST:/home/node/.openclaw/agents/main/sessions/test-nano-*.jsonl" "$PLUGIN_DIR/test_results/$DATE/" 2>/dev/null || true ``` The repository instructions explicitly direct contributors to retain these transcript artifacts: ```markdown Use `final_integration_test.sh` to run integration tests and collect data. To verify `include_usage: true` is being added correctly, check that `totalTokens > 0` in collected session `*.jsonl` files. ``` ```markdown ### Integration test artifacts After running `final_integration_test.sh`, artifacts are saved to `test_results//`: - `gateway.log` — gateway service logs - `*.jsonl` — session transcripts with usage data Check that `totalTokens > 0` in session files to verify `include_usage: true` is working. ``` ### Technical Analysis The required verification is whether a token counter is greater than zero. Instead of extracting that narrow value on the remote test environment, the workflow copies complete JSONL session records and gateway logs into a project directory. Session records may contain prompts, model responses, personal information, tool output, system context, and other sensitive content unrelated to usage accounting. The wildcard fallback can collect multiple transcripts from previous runs rather than only the session created by the current test. Bec ...[truncated 1104 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
AGENTS.md:166
Finding

Repository Instructions Encourage Access to Cross-Session Codex Memory

Content
View full analysis
`: `` ``` The related maintenance instruction states: ```markdown - If project-level memory files are created, add them to the memory index section above. ``` ### Technical Analysis The runbook exposes an absolute path to persistent Codex memory and directs contributors or agents to maintain an index containing absolute memory-file paths and summaries. Such memory may contain information originating from other sessions or projects. NanoGPT provider development does not require inventorying the host agent's global memory directory. The instruction therefore creates an unnecessary path for cross-session data access and repository disclosure. This is not confirmed memory poisoning because the text does not instruct the plugin to write attacker-controlled rules into memory; the confirmed concern is excessive access to persistent state. ### Attack Path 1. An automated coding agent loads and follows `AGENTS.md`. 2. The agent inspects `/home/node/.codex/memories` to determine whether files have appeared. 3. The agent reads memory content sufficiently to generate summaries. 4. Absolute paths and summaries are added to the repository runbook. 5. The repository or resulting artifacts expose information derived from unrelated persistent sessions. ### Impact Assessment The accessible scope depends on the contents and permissions of `/home/node/.codex/memories`. Potential exposure includes cross-project context, user preferences, operational notes, prior-session information, and sen ...[truncated 223 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
package.json:51
Finding

Unnecessary Runtime Dependency and Mismatched Published Package Identity

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (22)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

The wildcard deletion of ~/.openclaw/agents/main/sessions/* removes all session files for the remote user, not just artifacts created by this test. This can destroy unrelated records and is especially risky on shared or persistent hosts where other agent sessions may exist.

Content

Scanner excerpt · final_integration_test.sh (reported line 28)May include surrounding context.

sh
# 2) Remove existing plugin and install
echo "Step 2: Installing plugin..."
ssh -o ConnectTimeout=120 "$REMOTE_HOST" "set -x ; rm -rf /home/node/.openclaw/extensions/nano-gpt 2>/dev/null; rm ~/.openclaw/agents/main/sessions/* ;cd '$REMOTE_PLUGIN_DIR'; openclaw plugins install '$REMOTE_PLUGIN_DIR' "

# 3) Start gateway
echo "Step 3: Starting gateway..."

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The wildcard deletion of ~/.openclaw/agents/main/sessions/* removes all session files for the remote user, not just artifacts created by this test. This can destroy unrelated records and is especially risky on shared or persistent hosts where other agent sessions may exist.

Content

Scanner excerpt · final_integration_test.sh (reported line 28)May include surrounding context.

sh
# 2) Remove existing plugin and install
echo "Step 2: Installing plugin..."
ssh -o ConnectTimeout=120 "$REMOTE_HOST" "set -x ; rm -rf /home/node/.openclaw/extensions/nano-gpt 2>/dev/null; rm ~/.openclaw/agents/main/sessions/* ;cd '$REMOTE_PLUGIN_DIR'; openclaw plugins install '$REMOTE_PLUGIN_DIR' "

# 3) Start gateway
echo "Step 3: Starting gateway..."

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The wildcard deletion of ~/.openclaw/agents/main/sessions/* removes all session files for the remote user, not just artifacts created by this test. This can destroy unrelated records and is especially risky on shared or persistent hosts where other agent sessions may exist.

Content

Scanner excerpt · final_integration_test.sh (reported line 28)May include surrounding context.

sh
# 2) Remove existing plugin and install
echo "Step 2: Installing plugin..."
ssh -o ConnectTimeout=120 "$REMOTE_HOST" "set -x ; rm -rf /home/node/.openclaw/extensions/nano-gpt 2>/dev/null; rm ~/.openclaw/agents/main/sessions/* ;cd '$REMOTE_PLUGIN_DIR'; openclaw plugins install '$REMOTE_PLUGIN_DIR' "

# 3) Start gateway
echo "Step 3: Starting gateway..."

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
100% confidence
Finding

The wildcard deletion of ~/.openclaw/agents/main/sessions/* removes all session files for the remote user, not just artifacts created by this test. This can destroy unrelated records and is especially risky on shared or persistent hosts where other agent sessions may exist.

Content

Scanner excerpt · final_integration_test.sh (reported line 28)May include surrounding context.

sh
# 2) Remove existing plugin and install
echo "Step 2: Installing plugin..."
ssh -o ConnectTimeout=120 "$REMOTE_HOST" "set -x ; rm -rf /home/node/.openclaw/extensions/nano-gpt 2>/dev/null; rm ~/.openclaw/agents/main/sessions/* ;cd '$REMOTE_PLUGIN_DIR'; openclaw plugins install '$REMOTE_PLUGIN_DIR' "

# 3) Start gateway
echo "Step 3: Starting gateway..."

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · final_integration_test.sh (reported line 28)May include surrounding context.

sh
# 2) Remove existing plugin and install
echo "Step 2: Installing plugin..."
ssh -o ConnectTimeout=120 "$REMOTE_HOST" "set -x ; rm -rf /home/node/.openclaw/extensions/nano-gpt 2>/dev/null; rm ~/.openclaw/agents/main/sessions/* ;cd '$REMOTE_PLUGIN_DIR'; openclaw plugins install '$REMOTE_PLUGIN_DIR' "

# 3) Start gateway
echo "Step 3: Starting gateway..."

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The runbook instructs users to execute npx clawhub publish <plugin-dir> without pinning a version. npx will fetch and execute the latest package from the registry at run time, which creates a supply-chain risk: a compromised or malicious upstream release could run arbitrary code on the contributor's machine or in CI. In this operational context, the instruction is especially risky because it appears in a standard release workflow and may be followed routinely with elevated trust.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The publishing command is an external release action that can distribute code publicly or to a package hub, yet the runbook gives it as a routine step without a prominent warning or confirmation requirement. If an agent or contributor follows it mechanically, unreviewed or malicious changes could be published, causing downstream supply-chain impact and reputational damage. In this skill context, release instructions are particularly sensitive because they turn local modifications into externally consumable artifacts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README instructs users to provide an API key through an onboarding flow that stores the key in OpenClaw configuration, but it gives no warning about credential sensitivity, storage location, or safe handling practices. This can lead users to persist secrets in plaintext or insecure local config stores, increasing the risk of accidental disclosure through filesystem access, backups, screenshots, or source-control mistakes.

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 · final_integration_test.sh (reported line 24)May include surrounding context.

sh
# 1) Sync plugin to remote
echo "Step 1: Syncing plugin to remote host..."
tar --exclude='.git' --exclude='node_modules' --exclude='pnpm-lock.yaml' -czf - . | \
  ssh -o ConnectTimeout=30 "$REMOTE_HOST" "rm -rf $REMOTE_PLUGIN_DIR 2>/dev/null; mkdir -p $REMOTE_PLUGIN_DIR && tar -xzf - -C $REMOTE_PLUGIN_DIR"

# 2) Remove existing plugin and install
echo "Step 2: Installing plugin..."

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script executes rm -rf against the remote plugin directory and installed extension path, and also deletes session files with rm ~/.openclaw/agents/main/sessions/*. Although there are brief progress echo statements, there is no explicit disclosure that remote files and session data will be deleted, no confirmation prompt, and no inline warning comment describing the destructive impact.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
65% 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 · final_integration_test.sh (reported line 32)May include surrounding context.

sh
# 3) Start gateway
echo "Step 3: Starting gateway..."
ssh -o ConnectTimeout=30 "$REMOTE_HOST" "nohup openclaw gateway run > /tmp/gateway.log 2>&1 & sleep 5; openclaw gateway health"

# 4) Onboard with NanoGPT
echo "Step 4: Onboarding with NanoGPT..."

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script forwards NANOGPT_API_KEY to a remote host over an SSH command line during onboarding. Even if SSH encrypts transport, the secret is exposed to the remote environment and may be recoverable from process listings, shell history, logs, or downstream tooling on that host.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The code sends the bearer token to nano-gpt.com usage and balance endpoints, which is a network operation involving credentials. While the code is functional, there is no nearby user-facing warning, confirmation, or explanatory comment disclosing that account/auth data will be sent to external services for usage and balance checks.

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The 'Standard Update Procedure' presents a broad sequence of operational steps as a default workflow, including version bumping, commit, push, and publish, but it does not clearly state trigger conditions, approval requirements, or exclusion criteria. In an agent-facing runbook, this can cause an automated system or contributor to perform external, irreversible actions even when only local documentation or code changes were intended. The danger is amplified because these steps culminate in repository and release side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file outlines behavior involving NANOGPT_API_KEY, user-specific pricing, usage tracking, and balance checking. Under the markdown-file criteria for SQP-2, these privacy- and account-affecting behaviors should be accompanied by a clear warning or disclosure to users, but none is present in the plan text.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Using a peer dependency version of "*" allows installation against any OpenClaw release, including versions with known security advisories or incompatible security behavior. In a provider plugin context, this increases supply-chain and runtime risk because the plugin may be loaded into a highly privileged host environment with broad access to models, credentials, and workspace data.

Content

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

json
],
  "license": "MIT",
  "peerDependencies": {
    "openclaw": "*"
  },
  "devDependencies": {
    "typescript": "^6.0.2",

Unverifiable Dependency: openclaw has 16 known advisory(ies) (CVE-2026-53846 (OpenClaw: Workspace .env npm_execpath could influence bundled runtime dependency); CVE-2026-32064 (OpenClaw's andbox browser noVNC observer lacked VNC authentication); CVE-2026-32006 (OpenClaw has a BlueBubbles group allowlist mismatch via DM pairing-store fallbac) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

The manifest accepts any OpenClaw version despite the host platform having numerous known advisories, making it impossible to verify that deployments will avoid vulnerable releases. In plugin ecosystems, the host application is part of the trusted computing base, so unconstrained compatibility can expose the plugin and its users to host-level flaws affecting secrets, workspace access, or sandbox boundaries.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

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

json
"openclaw": "*"
  },
  "devDependencies": {
    "typescript": "^6.0.2",
    "vitest": "^3.1.4"
  },
  "dependencies": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

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

json
},
  "devDependencies": {
    "typescript": "^6.0.2",
    "vitest": "^3.1.4"
  },
  "dependencies": {
    "clawhub": "^0.9.0"

Unverifiable Dependency: vitest has 3 known advisory(ies) (CVE-2026-47429 (When Vitest UI server is listening, arbitrary file can be read and executed); CVE-2026-84373 (Vitest: Path Traversal / Arbitrary File Read via @vitest/mocker Redirect Mock); CVE-2025-24964 (Vitest allows Remote Code Execution when accessing a malicious website while Vit)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
79% confidence
Finding

The runtime dependency clawhub is specified with a broad caret range, which permits automatic uptake of future releases not explicitly reviewed by the plugin author. Because this package is part of the production dependency tree for an authentication and usage-tracking provider plugin, dependency drift could introduce malicious or vulnerable code into a privileged execution path.

Content

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

json
"vitest": "^3.1.4"
  },
  "dependencies": {
    "clawhub": "^0.9.0"
  }
}

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The test case title at L174 states 'falls back to weekly when daily is absent', which documents an expected weekly fallback. However, the assertion at L189 expects result.period to be 'monthly', directly contradicting that stated intent.

Content

No source excerpt is available for this finding.