Back to skill

Security audit

OpenViking 上下文数据库

Security checks for vulnerabilities and agentic risk

Overview

This skill matches its OpenViking context-search purpose, but its installer and configuration steps introduce high-impact local execution, credential storage, and broad indexing risks that need review before use.

Review this before installing. Use a disposable environment or virtual environment, avoid running installers as root, skip the optional Rust CLI unless needed, inspect any downloaded installer before execution, and restrict imports to reviewed folders that exclude secrets. After setup, check permissions on ~/.openviking/ov.conf, consider provider keys with limited quota/scope, and understand that indexed content and stats can persist across sessions.

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 (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/install.sh:45
Finding

Unverified Remote Script Downloaded and Executed Through 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 a user elects 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. The project does not pin the script to an immutable commit, verify a cryptographic checksum or signature, save it for inspection, or constrain the commands it may execute. Consequently, the effective code executed on the user's computer can change after this Skill has been reviewed. The host belongs to the organization associated with the declared OpenViking dependency, which reduces the likelihood of intentional abuse but does not remove the supply-chain risk. A compromised upstream repository, maintainer account, branch, or release process could cause arbitrary commands to run. The Rust CLI is optional, while the Skill's primary Python functionality can operate without this remote shell execution; therefore, this behavior exceeds the minimum execution exposure required for the core functionality. ### Attack Path 1. An attacker compromises the upstream OpenViking repository, a maintainer account, or its branch-management process. 2. The attacker modifies `crates/ov_cli/install.sh` on the mutable `main` branch. 3. A user runs `scripts/install.sh`, chooses to install the optional Rust CLI, and does not have Cargo installed. 4. `curl` retrieves t ...[truncated 862 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/install.sh:33
Finding

Dependency Installations Resolve Mutable and Unpinned Upstream Code

Content
View full analysis
&1 | tail -5 log_info "openviking 安装完成" ``` ```bash if command -v cargo &>/dev/null; then log_info "通过 cargo 安装 ov_cli..." cargo install --git https://github.com/volcengine/OpenViking ov_cli ``` ### Technical Analysis The Python package installation does not specify an exact version or verify package hashes. It also uses `--upgrade --force-reinstall`, which replaces an existing installation even when replacement is unnecessary. The result depends on whichever package currently resolves under the `openviking` name in the configured Python package index. The Cargo installation similarly identifies a Git repository but does not pin an immutable tag or commit with `--rev`. It therefore builds code from the repository's current default branch. Both commands allow dependency behavior to change after the Skill has been audited. These are recognized third-party sources consistent with the declared functionality, and no direct evidence of dependency confusion, typosquatting, or a currently malicious package was found. The confirmed issue is the lack of reproducibility and integrity controls, which creates a supply-chain exploitation path if an upstream project, package registry, account, or release is compromised. ### Attack Path 1. An attacker compromises the Python package, package registry account, Git repository, or relevant maintainer account. 2. The attacker publishes a malicious package version or updates the repository's default branch. 3. A user executes `scripts/install.sh`. 4. `pip` retrieves the newest resolvable package, or Cargo retrieves the current repository state, without an approved version/hash/commit constraint. 5. Ins ...[truncated 686 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

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

Model Provider API Key Stored in Plaintext Without Enforced File 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 ``` ### Technical Analysis The configuration wizard reads the API key without terminal echo, which appropriately prevents shoulder-surfing during entry. It then writes that key in plaintext to `~/.openviking/ov.conf`, placing the same value in both the embedding and VLM sections. The script does not set a restrictive `umask`, create the file atomically with mode `0600`, or correct permissions after writing it. The resulting access mode is controlled by the user's ambient `umask`. On a system with a permissive `umask`, other local users or processes may be able to read the provider credential. The file location under the user's home directory is appropriate to the declared functionality, but storing reusable credentials requires explicit least-privilege permissions rather than relying on environment defaults. ### Attack Path 1. A user runs `scripts/setup-config.sh` under a permissive `umask`, or an existing configuration file has permissive permissions. 2. The script writes the reusable API key to `~/.openviking/ov.conf` without enforcing mode `0600`. 3. Another local account or process with filesystem access reads the configuration file. 4. The attacker extracts the API key. 5. The attacker submits re ...[truncated 682 chars]
Remediation
View remediation
"$tmp_config" << OVEOF { ... } OVEOF python3 -m json.tool "$tmp_config" >/dev/null mv -f "$tmp_config" "$CONFIG_DIR/ov.conf" chmod 600 "$CONFIG_DIR/ov.conf" ``` ]]>
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 (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Although the skill advertises OpenViking context-database functions, it also directs remote package and CLI installation and mentions shell profile modification, which materially expands its capability surface. Combining search/memory features with software installation increases the chance of unexpected code execution and persistent host changes under a benign-sounding description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

Although the skill advertises OpenViking context-database functions, it also directs remote package and CLI installation and mentions shell profile modification, which materially expands its capability surface. Combining search/memory features with software installation increases the chance of unexpected code execution and persistent host changes under a benign-sounding description.

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 - 用户列表 (分页)

## 认证相关

Chaining Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The '| bash' pattern is dangerous because it chains network retrieval directly into code execution without any validation step. In the context of an agent-related tool installer, this increases risk because users may run it in environments containing API keys, configs, or workspace data that could be stolen or altered if the remote content is compromised.

Content

Scanner excerpt · scripts/install.sh (reported line 52)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
88% confidence
Finding

The README instructs users to configure a model provider API key and start a service, but does not disclose that document content, queries, or metadata may be transmitted to external providers during embedding, retrieval, summarization, or other model-backed operations. This is especially risky in a context-database skill because users may assume data stays local while the system can process sensitive material using third-party services authenticated by those credentials.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README encourages users to import local project documents into the context database but does not warn that this operation reads, indexes, and may subsequently expose sensitive local file contents through search, summaries, or downstream model interactions. In a skill explicitly designed for semantic search and long-term memory, omission of this privacy notice increases the risk of users unintentionally ingesting secrets, internal docs, credentials, or regulated data.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill instructs the agent to execute shell commands, install software, and interact with the filesystem, but it does not declare any tool scope such as allowed-tools or permissions. That creates an under-specified trust boundary: a user may believe this is a read/search skill while it can drive installation and persistent local changes.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The natural-language instructions and examples are predominantly in Chinese, and the file does not indicate that this locale is optional or limited to a China-specific audience. This can violate language/locale policy when a skill effectively forces one language without user opt-in.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
88% confidence
Finding

The skill recommends running the server under nohup in the background, creating a persistent service and log file outside the immediate session. Persistent background processes enlarge the attack surface, can continue handling sensitive context after the user forgets they are running, and may survive oversight or cleanup expectations.

Content

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

bash
openviking-server
# 或后台运行:
nohup openviking-server > ~/.openviking/server.log 2>&1 &

核心操作

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that resources can be added and that statistics are persisted in ~/.openviking/session_stats.json, but it does not warn that imported files/URLs and session-derived memory may retain sensitive data across sessions. In a memory/context skill, persistence is especially sensitive because operators may feed internal documents, URLs, or secrets expecting transient use.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger set includes generic phrases such as "context database", "layered context", "token saving", and especially command-like terms such as "memsearch" and "memread" that could match ordinary user requests beyond this specific skill. Overly broad activation increases the chance of unintended invocation, which can cause unnecessary context access, tool use, or resource loading in situations where the user did not intend to use this skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This Python file contains its primary docstring, usage guidance, and scenario descriptions entirely in Chinese, and later user-facing console output is also hard-coded in Chinese. Because the file does not offer a language selection or explain that it is intended only for Chinese-speaking users, it violates the natural-language policy rule on forced language/locale without user opt-in.

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's user-facing prompts and next-step instructions are predominantly in Chinese, including the suggested invocation phrase at L141. This imposes a specific language on users without offering an alternative locale or documenting that the skill is region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script's user-facing prompts and status messages are written exclusively in Chinese, including confirmation and next-step instructions. This can violate a language/locale policy when no opt-in or justification is provided, because users are forced into a specific language during installation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The installer downloads a shell script from a remote URL and immediately executes it via bash, giving the remote content full code-execution capability on the user's machine. In an installer for a context/database tool, this is broader than necessary and especially risky because any compromise of the upstream repository, transport path, or referenced script would result in arbitrary command execution.

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's interactive prompts and status messages are presented in Chinese, which imposes a specific language on all users. There is no opt-in, fallback language, or documented region-specific justification for this locale choice.

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"

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 73)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"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script collects an API key and writes it directly into a persistent config file under the user's home directory without warning the user about credential storage or setting restrictive file permissions. This increases the chance of unintended disclosure through permissive filesystem access, backups, dotfile syncing, or accidental sharing of the config file.

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-level description and all user-facing strings are written in Chinese, indicating the tool is designed to communicate in a single language by default. There is no opt-in, locale selection, or documentation justifying a Chinese-only constraint, which can violate language/locale policy expectations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The add command accepts arbitrary HTTP/HTTPS URLs and ingests them as resources, which expands the skill from passive context browsing into network retrieval and content ingestion. In an agent setting, this can be abused to fetch attacker-controlled content, poison the context store, or cause unintended outbound network access that is not clearly conveyed by the skill description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Recursive directory ingestion can process large or unintended sets of files and write them into the OpenViking workspace without an upfront safety check. In an agent workflow, this can lead to bulk data collection, accidental indexing of sensitive files, resource exhaustion, or irreversible workspace contamination from a broad path selection.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

The user-facing tagline and description are written entirely in Chinese, which imposes a language choice without indicating user opt-in or documenting that the skill is intentionally region-specific. Under the stated policy, language constraints should either be optional for users or clearly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring presents this script as a demonstration of token savings for layered context loading, which implies analysis and console output. In addition to that demo behavior, the code persists a JSON report to token-report.json, introducing filesystem modification not mentioned in the script description.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.