Back to skill

Security audit

Google Vertex AI Memory Bank

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly coherent for setting up cloud-backed memory, but it installs and builds mutable remote code while also enabling persistent cross-agent storage of conversation and workspace data.

Review the remote repository and setup script before running it. Use a dedicated GCP project with least-privilege credentials, expect prompts and synced markdown files to be stored in Vertex AI Memory Bank, disable autoCapture or autoSyncFiles if you do not want automatic memory storage, and prefer a pinned, verified plugin version over the current git clone/git pull plus npm install flow.

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
scripts/setup.sh:85
Finding
Unpinned Remote Plugin and Dependency Code Is Retrieved and Executed<![CDATA[ ## Vulnerability Details **File Location**: `scripts/setup.sh:85-94` **Vulnerability Type**: Unverified third-party code and dependency execution **Risk Level**: Medium ### Vulnerable Code ```bash if [ -d "$PLUGIN_DIR" ]; then echo "Plugin directory exists. Pulling latest..." cd "$PLUGIN_DIR" && git pull else git clone https://github.com/Shubhamsaboo/openclaw-vertexai-memorybank.git "$PLUGIN_DIR" cd "$PLUGIN_DIR" fi npm install npm run build ``` ### Technical Analysis The setup script clones or updates a remote Git repository without pinning it to a reviewed commit, release tag, or cryptographically verified artifact. The effective code installed by the Skill can therefore change after the Skill itself has been audited. The script subsequently runs `npm install`, which may execute npm package lifecycle scripts, and `npm run build`, which executes a script defined by the remotely retrieved repository. Neither the repository revision nor installed dependency artifacts are verified before execution. If the destination directory already exists, the script also trusts it without verifying its canonical path, configured Git remote, current branch, or repository ownership. A locally substituted repository at the expected path could therefore supply an attacker-controlled build script. This creates a supply-chain code-execution channel through: - Compromise or unauthorized modification of the upstream Git repository. - Force-pushing or changing the mutable default branch. - Compromise of a transitive npm dependency or its lifecycle scripts. - Replacement of the expected local plugin directory with a malicious Git repository. - Changes in dependency resolution when a reproducible, reviewed lockfile is not enforced with `npm ci`. ### Attack Path 1. An attacker compromises the upstream plugin repository, an npm dependency, or a maintainer account. Alternatively, the attacker prepares a malicious Git repository at `~/.openclaw/plugins/opencla ...[truncated 1476 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Pin the plugin source** - Check out an explicitly reviewed commit rather than the mutable default branch. - Verify that the checked-out commit exactly matches the expected hash. - Prefer signed release tags or signed commits and validate their signatures. 2. **Verify downloaded artifacts** - Publish versioned release archives with cryptographic checksums or signatures. - Store the expected checksum in the audited Skill and reject mismatches. 3. **Make dependency installation reproducible** - Require a reviewed and committed `package-lock.json`. - Replace `npm install` with `npm ci` so installation fails if the manifest and lockfile disagree. - Pin dependency versions and routinely audit direct and transitive packages. 4. **Restrict lifecycle scripts** - Initially install dependencies using `npm ci --ignore-scripts` where compatible. - Explicitly review and separately invoke only the lifecycle or build scripts required by the plugin. - Run installation and compilation in a sandbox or container with minimal filesystem, network, credential, and cloud access. 5. **Validate an existing plugin directory** - Resolve and validate the directory's canonical path. - Confirm that it is an actual Git repository owned by the expected user. - Verify its configured remote URL against an allowlist. - Fetch and check out only the pinned commit rather than invoking an unrestricted `git pull`. - Reject dirty working trees or unexpected local modifications. 6. **Minimize credentials during installation** - Do not expose active Google Cloud credentials to dependency installation or build processes unless strictly required. - Separate plugin compilation from cloud provisioning and execute the build in a restricted environment. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill instructs users to run shell commands and a setup script, but it does not declare any tool scope or allowed tools. This weakens security review and execution controls because consumers cannot easily tell that the skill requires command execution and networked installation steps.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The skill prominently advertises auto-recall, auto-capture, file sync, and cross-agent memory, but it does not clearly warn that potentially sensitive prompts, facts, and workspace markdown files may be transmitted to and stored in Vertex AI. In this context, the omission is dangerous because the core feature is persistent third-party storage of user and workspace data across sessions and agents.

External Transmission

Medium
Category
Data Exfiltration
Content
gcloud config set project YOUR_PROJECT_ID

# Create a reasoning engine for Memory Bank
curl -X POST \
  "https://REGION-aiplatform.googleapis.com/v1beta1/projects/YOUR_PROJECT_ID/locations/REGION/reasoningEngines" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
Confidence
89% confidence
Finding
The documented curl command sends authenticated requests to a Google Vertex AI endpoint using an access token from gcloud, which is an external transmission of data and credentials in the broad security sense. While expected for legitimate cloud setup, it is still security-relevant because it provisions remote resources and transmits project identifiers and authenticated API calls to a third party.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The script enables a GCP API and creates a Vertex AI reasoning engine immediately after basic prompts, without an explicit confirmation describing that billable cloud resources and project state will be modified. In an installation/setup context this behavior is expected, but it is still dangerous because a user may run the script assuming it only performs local configuration and unintentionally incur cost or alter the target project.

External Transmission

Medium
Category
Data Exfiltration
Content
# Create reasoning engine
echo "Creating Memory Bank instance (reasoning engine)..."
RESPONSE=$(curl -s -X POST \
  "https://${REGION}-aiplatform.googleapis.com/v1beta1/projects/${PROJECT_ID}/locations/${REGION}/reasoningEngines" \
  -H "Authorization: Bearer $(gcloud auth print-access-token)" \
  -H "Content-Type: application/json" \
Confidence
88% confidence
Finding
The script sends an authenticated POST request with the user's access token to the Vertex AI API to create a remote resource. In this skill's context, external transmission is expected, but it remains security-relevant because it uses live cloud credentials and changes remote infrastructure without a strong approval boundary beyond normal script execution.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script clones code from a remote GitHub repository and then executes `npm install` and `npm run build`, which can run arbitrary package lifecycle scripts and build steps from untrusted remote content. This creates a supply-chain execution risk: compromise of the repository or dependencies could lead to arbitrary code execution on the user's machine during setup.

Missing User Warnings

Low
Confidence
84% confidence
Finding
The script offers to restart the OpenClaw gateway, but it does not explain the operational impact such as interrupting active sessions or changing runtime behavior immediately. Although it asks for confirmation, the lack of context can still surprise operators in multi-agent or shared environments.

Static analysis

No suspicious patterns detected.