Back to skill

Security audit

OpenViking Light

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to be a legitimate RAG knowledge tool, but it needs Review because it can send stored knowledge and user questions to a configurable external MiniMax endpoint and auto-installs a dependency at runtime.

Install only if you are comfortable with knowledge-base entries and questions being sent to the configured MiniMax-compatible endpoint during Q&A. Avoid storing secrets or sensitive private notes unless the endpoint and environment are trusted, pin and install dependencies outside runtime, and lock MINIMAX_API_HOST to an approved HTTPS MiniMax endpoint.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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 (3)

T01 · Skill Instruction Hijacking

Warning
Location
scripts/ask.py:145
Finding

Untrusted Retrieved Knowledge Can Hijack LLM Instructions

Content
View full analysis
Remediation
View remediation
Untrusted reference data only: ... ``` 4. Restrict write access to the knowledge store and authenticate any higher-level interface that invokes document insertion. 5. Track document provenance and trust level, and exclude untrusted documents from sensitive workflows. 6. Consider scanning stored content for common instruction-injection patterns, while treating filtering only as defense in depth. 7. Avoid placing unrelated sensitive documents in the same model context. 8. Apply the same changes to both `scripts/ask.py` and the `cmd_ask` implementation in `scripts/bm25.py`. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/ask.py:27
Finding

Unrestricted API Host Configuration Can Expose Credentials and Retrieved Knowledge

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/ask.py:19
Finding

Missing Dependency Is Installed at Runtime Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (28)

Tainted flow: 'req' from os.environ.get (line 100, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
92% confidence
Finding

The request destination is derived from the MINIMAX_API_HOST environment variable and is used to send the full prompt, including retrieved knowledge-base content and the user's query, to a remote endpoint. This enables data exfiltration to an attacker-controlled host if the environment is tampered with, and the skill context increases risk because the content being retrieved may contain prior memory or sensitive notes.

Content

Scanner excerpt · scripts/ask.py (reported line 109)May include surrounding context.

python
method="POST"
    )
    try:
        with urllib.request.urlopen(req, timeout=60) as resp:
            result = json.loads(resp.read())
            if "choices" not in result:
                raise RuntimeError(f"Chat failed: {result}")

Tainted flow: 'req' from os.environ.get (line 132, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
98% confidence
Finding

The request destination is derived from MINIMAX_API_HOST and the request body contains user queries plus retrieved knowledge-base contents, so sensitive local data can be sent to an arbitrary remote endpoint controlled via environment configuration. This is a real exfiltration risk, especially because the skill is presented as lightweight/local and users may not expect outbound transmission of stored memory.

Content

Scanner excerpt · scripts/bm25.py (reported line 141)May include surrounding context.

python
method="POST"
    )
    try:
        with urllib.request.urlopen(req, timeout=60) as resp:
            result = json.loads(resp.read())
            if "choices" not in result:
                raise RuntimeError(f"Chat failed: {result}")

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description claims a 'pure local' implementation, but the skill also documents use of a remote MiniMax API and package installation via pip, both of which require network access. That mismatch is security-relevant because users may provide sensitive memory-retrieval queries believing data stays local when it may be transmitted externally.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description claims a 'pure local' implementation, but the skill also documents use of a remote MiniMax API and package installation via pip, both of which require network access. That mismatch is security-relevant because users may provide sensitive memory-retrieval queries believing data stays local when it may be transmitted externally.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description claims a 'pure local' implementation, but the skill also documents use of a remote MiniMax API and package installation via pip, both of which require network access. That mismatch is security-relevant because users may provide sensitive memory-retrieval queries believing data stays local when it may be transmitted externally.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The script automatically executes a shell command to install a package at runtime using os.system(). Even though the command string is not directly user-controlled, this creates a dangerous supply-chain and execution pathway: a skill invocation can trigger arbitrary package download/install behavior from the environment's configured package indexes, without user consent.

Content

Scanner excerpt · scripts/ask.py (reported line 22)May include surrounding context.

python
import jieba
except ImportError:
    print("正在安装 jieba 分词器...")
    os.system(f"{sys.executable} -m pip install jieba -q")
    import jieba

DATA_FILE = Path.home() / ".openviking/light/data/bm25_store.json"

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
94% confidence
Finding

The script automatically executes a shell command to install a package at runtime via os.system. Even though the command string is mostly fixed, this introduces unnecessary command execution and supply-chain risk, and in hostile or misconfigured environments could run an unexpected interpreter or install untrusted code without user consent.

Content

Scanner excerpt · scripts/bm25.py (reported line 25)May include surrounding context.

python
import jieba
except ImportError:
    print("正在安装 jieba 分词器...")
    os.system(f"{sys.executable} -m pip install jieba -q")
    import jieba

DATA_DIR = Path.home() / ".openviking/light/data"

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill description claims a pure local Python RAG implementation, but the ask flow sends prompts and retrieved knowledge to the MiniMax API. This deceptive mismatch materially increases security risk because users may place sensitive information in the knowledge base under the false assumption that processing remains local.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · scripts/bm25.py (reported line 228)May include surrounding context.

python
"results": [{"id": i["id"], "title": i["title"], "content": i["content"], "score": round(s, 4)} for s, i in results],
            "answer": None
        }, ensure_ascii=False, indent=2))
        return

    prompt = f"""你是一个助手,基于以下参考知识回答用户问题。

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

A lightweight search tool should not need shell execution capability during normal operation, yet this script uses it to install software. That expands the attack surface substantially: if the environment, package source, or interpreter path is compromised, the search action can become a vehicle for arbitrary code execution or unauthorized network activity.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

The script executes a shell command to install a package at runtime using os.system. Even though the command string is not directly user-controlled here, invoking pip during normal search execution introduces unintended code execution and supply-chain risk, because package installation runs arbitrary package setup/install logic and reaches out to external package sources.

Content

Scanner excerpt · scripts/search.py (reported line 18)May include surrounding context.

python
import jieba
except ImportError:
    print("正在安装 jieba 分词器...")
    os.system(f"{sys.executable} -m pip install jieba -q")
    import jieba

DATA_FILE = Path.home() / ".openviking/light/data/bm25_store.json"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README explicitly states that user queries are sent to the MiniMax API for answer generation, but it does not warn operators that retrieved knowledge and user prompts may leave the local environment. In a memory/RAG skill, users may ask about prior conversations or stored notes, so the absence of a clear privacy and transmission notice can lead to unintended disclosure of sensitive data to a third-party service.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill declares no explicit tool scope or permissions even though its documented behavior requires shell execution, file writes, environment variable access, and outbound network access. This weakens least-privilege controls and makes it harder for reviewers and users to understand what the skill can do, increasing the risk of unexpected data access or exfiltration if the skill is invoked.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The trigger phrases are broad, natural-language patterns likely to overlap with ordinary conversation, which can cause accidental invocation of the skill. In this context, misfires matter because the skill may access local memory stores and potentially send user queries to an external LLM, creating privacy and consent risks.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill states that it reads an API key from environment variables but does not clearly disclose to users that their queries may be sent to an external MiniMax service. For a memory/knowledge lookup skill, this is particularly dangerous because prompts may contain sensitive prior-chat content, notes, or proprietary information that users expect to remain local.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill performs runtime package installation during normal query handling, which is unrelated to the core retrieval task and expands the attack surface. In a skill intended for lightweight local RAG, unexpected dependency installation is especially unsafe because users do not expect code execution with package-management side effects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script automatically installs a package via shell command without confirmation or warning to the user. Silent modification of the runtime environment is unsafe because it can introduce unreviewed code, break reproducibility, and create a supply-chain exposure disproportionate to the skill's stated purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill metadata and comments describe the implementation as purely local and not requiring external model downloads, yet the code sends prompts to the MiniMax chat API. This is a security-relevant trust violation because users may provide sensitive memory queries under the false assumption that processing stays local.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The code transmits retrieved knowledge-base content and the user's query to an external LLM API without explicit in-code warning or consent flow. Given this skill is for memory/knowledge retrieval, the transmitted text may contain sensitive personal or organizational data, making silent disclosure materially dangerous.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module documentation states that it avoids external APIs/models, but the code later performs remote chat completions. Misrepresentation of network behavior is security-relevant because it undermines informed consent and can cause users to expose confidential data they otherwise would not share.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Auto-installing a dependency by invoking pip from within the skill exceeds the minimally necessary behavior for a retrieval tool and silently changes the local environment. This creates avoidable supply-chain and integrity risks, especially if the package index or environment is compromised.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The ask command packages user queries and retrieved knowledge-base contents into a prompt and sends them to an external LLM API without an explicit user warning or consent step. Because the stored content may contain prior conversations, notes, or sensitive memory, this can leak private data to a third party.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill claims to be a pure local search utility requiring no external API or model downloads, but it performs an on-demand pip installation when jieba is missing. This breaks the local-only trust boundary and can unexpectedly contact external package indexes, which is risky in environments that assume offline or controlled execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script automatically installs a package without prior warning, approval, or a separate setup phase. This is dangerous because users invoking a simple local search may unknowingly trigger external network access and execution of package installation code, violating least surprise and potentially bypassing operational controls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The docstring, CLI descriptions, status messages, and generated prompt all assume Chinese-language interaction and direct the model to answer in that context. This imposes a specific language/locale behavior without any user opt-in or documented justification.

Content

No source excerpt is available for this finding.