Back to skill

Security audit

openviking-token-saver

Security checks for vulnerabilities and agentic risk

Overview

This OpenViking search skill is not clearly malicious, but it needs review because it can run unverified installers, store API keys plainly, start background services, and import broad local file trees.

Install only after reviewing the scripts. Avoid the optional CLI curl|bash path, pin and verify dependencies, restrict what directories are imported, exclude secrets before using add on a project tree, protect ~/.openviking/ov.conf permissions, and start the server/Web UI only when needed with a clear stop plan.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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 (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/install.sh:58
Finding

Unverified Remote Script Downloaded and Executed by Bash

Content
View full analysis
/dev/null; then log_info "通过 cargo 安装 ov_cli..." cargo install --git https://github.com/volcengine/OpenViking ov_cli else log_info "通过安装脚本安装 ov..." curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/ov_cli/install.sh | bash fi log_info "Rust CLI 安装完成" ``` ### Technical Analysis When the user chooses to install the optional Rust CLI and Cargo is unavailable, the installer downloads a shell script from the mutable `main` branch of an external GitHub repository and pipes it directly into Bash. Although the URL points to the declared OpenViking upstream organization, the downloaded content is not pinned to an immutable commit or release. The script does not verify a cryptographic checksum or signature, save the payload for inspection, or display the commands that will execute. Consequently, the effective code executed on a user's system can change after this Skill has been reviewed. This behavior is not required for the Skill's core Python-based search and context-management functionality. The documentation explicitly states that the Rust CLI is optional and that direct mode can operate without a server or CLI. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or the referenced `main` branch. 2. The attacker modifies `crates/ov_cli/install.sh` to include malicious shell commands. 3. A user runs `scripts/install.sh`, agrees to install the Rust CLI, and does not have Cargo installed. 4. `curl` retrieves the attacker's current payload. 5. The pipe sends the response directly to Bash without verification or review. 6. The payload executes with all privileges available to the user running the instal ...[truncated 926 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
scripts/install.sh:35
Finding

Mutable and Unpinned Executable Dependencies

Content
View full analysis
&1 | tail -5 elif [ -x "$VENV_PIP" ]; then log_info "使用已有的 venv pip: $VENV_PIP" $VENV_PIP install openviking --upgrade --force-reinstall 2>&1 | tail -5 else log_info "未检测到 venv,创建新环境..." python3 -m venv "$HOME/.openviking/venv" --system-site-packages $VENV_PIP install openviking --upgrade --force-reinstall 2>&1 | tail -5 fi # ... if command -v cargo &>/dev/null; then log_info "通过 cargo 安装 ov_cli..." cargo install --git https://github.com/volcengine/OpenViking ov_cli else log_info "通过安装脚本安装 ov..." curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/ov_cli/install.sh | bash fi ``` ### Technical Analysis The Python package installation does not specify a reviewed version or package hashes. The use of `--upgrade --force-reinstall` deliberately replaces an existing installation with whatever release the package index currently considers latest. The Cargo installation similarly installs from the current state of a Git repository without a `--rev` value identifying an immutable commit. These dependencies contain executable code and are trusted with the user's files, API credentials, and indexed resources. Creating the virtual environment with `--system-site-packages` also weakens dependency isolation by exposing globally installed Python packages to the environment. This can introduce undeclared versions and make dependency resolution less reproducible. The Skill's documentation reinforces this mutable behavior by declaring the OpenViking package requirement as `latest ...[truncated 1388 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/setup-config.sh:116
Finding

Provider API Keys Written to a Plaintext File Without Enforced Permissions

Content
View full analysis
"$CONFIG_DIR/ov.conf" << OVEOF { "storage": { "workspace": "$WS" }, "log": { "level": "INFO", "output": "stdout" }, "embedding": { "dense": { "api_base": "$API_BASE", "api_key": "$API_KEY", "provider": "$EMB_PROVIDER", "dimension": $EMB_DIM, "model": "$EMB_MODEL" }, "max_concurrent": 10 }, "vlm": { "api_base": "$API_BASE", "api_key": "$API_KEY", "provider": "$VLM_PROVIDER", "model": "$VLM_MODEL", "max_concurrent": 100 } } OVEOF log_info "服务器配置已写入 $CONFIG_DIR/ov.conf" ``` ### Technical Analysis The configuration wizard reads the API key without terminal echo, which protects it during interactive entry, but then writes the key twice into `~/.openviking/ov.conf` as plaintext. The script does not set a restrictive `umask`, create `~/.openviking` with mode `0700`, or set `ov.conf` to mode `0600`. File permissions therefore depend on the user's environment. With a permissive umask, other local accounts or processes may be able to read the key. The configuration also directly interpolates user-provided values into JSON without JSON escaping or validation. Quotes, backslashes, or newlines in the API key, model name, API base, or workspace may corrupt the configuration. This is primarily a reliability issue in the present code because the generated file is parsed as JSON rather than executed as shell code. ### Attack Path 1. A user runs `scripts/setup-config.sh` and enters a valid provider API key. 2. The script writes the key to `~/.openviking/ov.conf`. 3. The file inherits permissions determined by the current umask. 4. A malicious local process, another local user where permissions permit, an overly broad backup process, or an unrelated tool reads ...[truncated 639 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/viking.py:141
Finding

Recursive Resource Ingestion Can Include Secrets and Files Outside the Intended Boundary

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
Findings (35)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose is a context/search skill, but the content also instructs installation, deployment into OpenClaw skill directories, path auto-detection, overwriting/removing directories, and permission changes. This mismatch is dangerous because users or orchestration layers may trust and auto-invoke the skill for harmless search tasks while it actually entails privileged setup and filesystem modification behaviors.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger list contains broad everyday Chinese phrases such as '查一下', '看一下', '帮我找', and generic code/config lookup patterns, which can cause the skill to activate in many unrelated conversations. Because this skill includes shell, file, and setup-oriented behaviors, overbroad triggering raises the risk of unintended invocation of a powerful skill in contexts where the user did not intend to grant such access.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger list contains very broad everyday phrases such as Chinese equivalents of 'search', 'check', 'look', and 'help me find', which are likely to match many unrelated user requests. In an agent environment, this can cause unintended activation of a skill with filesystem/context-search capabilities, leading to overbroad data access, prompt-routing errors, and possible leakage of project or memory contents beyond user intent.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/demo-token-compare.py (reported line 267)May include surrounding context.

python
- 密钥轮换周期: 90 天

## Token 生命周期
- Access Token: 15 分钟
- Refresh Token: 7 天
- 支持 Token 黑名单机制

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
90% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/demo-token-compare.py (reported line 337)May include surrounding context.

python
- POST /api/v1/users - 创建用户
- GET /api/v1/users/:id - 获取用户详情
- PUT /api/v1/users/:id - 更新用户
- DELETE /api/v1/users/:id - 删除用户
- GET /api/v1/users - 用户列表 (分页)

## 认证相关

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The installer fetches a shell script from a remote URL and executes it immediately via bash. This bypasses any integrity verification, pinning, or user review, so a compromised upstream repository, network path, or account could result in arbitrary code execution on the user's machine.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The pipe into bash is a classic unsafe command-chaining pattern that turns downloaded text into immediate code execution. If the fetched content is malicious or tampered with, the user's shell will execute attacker-controlled commands with the user's privileges.

Content

Scanner excerpt · scripts/install.sh (reported line 65)May include surrounding context.

sh
cargo install --git https://github.com/volcengine/OpenViking ov_cli
    else
        log_info "通过安装脚本安装 ov..."
        curl -fsSL https://raw.githubusercontent.com/volcengine/OpenViking/main/crates/ov_cli/install.sh | bash
    fi
    log_info "Rust CLI 安装完成"
else

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The README tells users to configure an external model provider API key and run an OpenViking service, but it does not clearly warn that indexed project content and search/read requests may be sent to third-party model or embedding providers. In a context-database skill meant to ingest project documents and code, that omission can lead users to expose sensitive internal data without informed consent.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill documentation directs the agent/user to run shell scripts, install packages, write configuration, and manipulate files, yet the skill declares no explicit tool scope or allowed-tools boundaries. In an agent ecosystem, this increases the chance that the skill is invoked with broader-than-necessary filesystem and shell access, enabling unintended installation, overwrite, or execution actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Nearly the entire natural-language skill documentation is presented only in Chinese, including usage instructions and trigger examples, without offering a language choice or stating that the skill is region-specific. Under the policy, forcing a specific language without user opt-in can be a locale/language policy violation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
84% confidence
Finding

The skill instructs launching a background API server with nohup, creating a persistent process beyond the current session. Persistent services increase attack surface, can continue consuming local data or exposing APIs after the user forgets about them, and may bypass normal ephemeral-agent expectations.

Content

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

bash
# 启动 API 服务器(后台运行)
nohup ~/.openviking/venv/bin/openviking-server > ~/.openviking/server.log 2>&1 &

# 启动 Console Web UI(后台运行)
nohup ~/.openviking/venv/bin/python3 -m openviking.console.bootstrap \

Session Persistence

Medium
Category
Rogue Agent
Confidence
86% confidence
Finding

The Console Web UI is also started via nohup as a background service, which persists across sessions and exposes an additional local web interface. Even when bound to localhost, a persistent UI can leak sensitive indexed project data to other local processes or users and may remain running unintentionally.

Content

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

md
nohup ~/.openviking/venv/bin/openviking-server > ~/.openviking/server.log 2>&1 &

# 启动 Console Web UI(后台运行)
nohup ~/.openviking/venv/bin/python3 -m openviking.console.bootstrap \
  --host 127.0.0.1 --port 8020 \
  --openviking-url http://127.0.0.1:1933 \
  > ~/.openviking/console.log 2>&1 &

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The tagline and description are presented in Chinese, but the manifest does not indicate that the skill is region-specific or that users can choose their preferred language. This can amount to a language policy issue because the skill appears to impose a specific language without opt-in or justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This shell script presents its user-facing installation banner and subsequent prompts in Chinese, and later instructs the user to invoke the skill with a Chinese phrase. That imposes a specific language/locale on users without offering an alternative or opt-in, which matches the language-policy violation criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The installer asks the user to make installation-path choices and respond to prompts entirely in Chinese, with no English fallback or language selection. Because these are essential operational prompts, the script effectively forces one language for successful use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script tells the user to say a Chinese command phrase to use the skill, without presenting other supported languages or clarifying that the skill is region/language-specific. This is a natural-language locale constraint imposed without user opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Piping a remotely fetched script directly into bash removes any opportunity for inspection and gives network-delivered content immediate execution privileges. The optional prompt about installing the CLI is not a meaningful safety control because it does not disclose that arbitrary remote shell code will be executed.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script persistently modifies the user's shell startup file to export environment variables. While not immediately arbitrary code execution, this changes the user's environment across future sessions without a dedicated consent step and exceeds the narrow context-search/memory behavior described for the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The installer appends exports to the user's shell startup file without a specific warning immediately before the write. Persistent configuration changes can surprise users, affect later shells, and become a foothold for future misconfiguration or abuse if paths or variables are later repurposed.

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 · SKILL.md (reported line 229)May include surrounding context.

md
echo "下一步:"
echo "  1. 运行配置脚本:  bash $SCRIPT_DIR/setup-config.sh"
echo "  2. 启动服务器:    nohup $HOME/.openviking/venv/bin/openviking-server > $HOME/.openviking/server.log 2>&1 &"
echo "  3. 测试连接:      $PYTHON_BIN $SCRIPT_DIR/viking.py info"
echo ""

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 · scripts/install.sh (reported line 129)May include surrounding context.

sh
echo "下一步:"
echo "  1. 运行配置脚本:  bash $SCRIPT_DIR/setup-config.sh"
echo "  2. 启动服务器:    nohup $HOME/.openviking/venv/bin/openviking-server > $HOME/.openviking/server.log 2>&1 &"
echo "  3. 测试连接:      $PYTHON_BIN $SCRIPT_DIR/viking.py info"
echo ""

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

sh
echo "下一步:"
echo "  1. 运行配置脚本:  bash $SCRIPT_DIR/setup-config.sh"
echo "  2. 启动服务器:    nohup $HOME/.openviking/venv/bin/openviking-server > $HOME/.openviking/server.log 2>&1 &"
echo "  3. 测试连接:      $PYTHON_BIN $SCRIPT_DIR/viking.py info"
echo ""

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

sh
echo "下一步:"
echo "  1. 运行配置脚本:  bash $SCRIPT_DIR/setup-config.sh"
echo "  2. 启动服务器:    nohup $HOME/.openviking/venv/bin/openviking-server > $HOME/.openviking/server.log 2>&1 &"
echo "  3. 测试连接:      $PYTHON_BIN $SCRIPT_DIR/viking.py info"
echo ""

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

All user-visible prompts and status messages in this script are in Chinese, and the script does not provide any language selection or document that it is intentionally limited to a Chinese-speaking audience. That creates a natural-language locale policy concern because the skill forces a specific language without user opt-in.

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

sh
DEFAULT_VLM_MODEL="gpt-4o"
        DEFAULT_EMB_MODEL="text-embedding-3-large"
        DEFAULT_EMB_DIM=3072
        DEFAULT_API_BASE="https://api.openai.com/v1"
        ;;
    2)
        VLM_PROVIDER="volcengine"

Static analysis

No suspicious patterns detected.