Back to skill

Security audit

huawei-cloud-openviking-agent-integration

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent OpenViking memory-integration purpose, but it makes persistent agent changes while relying on mutable remote code and unsafe endpoint handling.

Install only if you are comfortable giving the skill persistent control over agent startup templates and plugin configuration. Prefer local or trusted HTTPS OpenViking endpoints, avoid passing root API keys on the command line, and review or pin the remote plugin sources before use.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/agents/hermes.sh:44
Finding
Persistent Code Execution Through Unsafe Endpoint Interpolation<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/integrate.sh:19-23` - `scripts/agents/hermes.sh:44-66` - `scripts/agents/workswarm.sh:171-180,246` - `scripts/agents/openclaw.sh:124-126,203-205,281` - `scripts/agents/kimicode.sh:22-53,113` **Vulnerability Type**: Persistent shell and generated-code injection **Risk Level**: High ### Vulnerable Code The command-line endpoint is accepted without syntax or scheme validation: ```bash while [[ $# -gt 0 ]]; do case "$1" in --agent) AGENT="$2"; shift 2 ;; --all) ALL_AGENTS=true; shift ;; --endpoint) OV_ENDPOINT="$2"; OV_MCP_URL="${OV_ENDPOINT}/mcp"; shift 2 ;; --api-key) OV_API_KEY="$2"; shift 2 ;; ``` Hermes embeds the endpoint directly into a persistent shell script: ```bash "$OV_PY" - "$tpl" "$OV_ENDPOINT" "$OV_SHARED_DIR" <<'PYTPL' import sys, os, re tpl_path = sys.argv[1] endpoint = sys.argv[2] shared_dir = sys.argv[3] with open(tpl_path) as f: tpl = f.read() block = """ # ── OpenViking memory provider (added by huawei-cloud-openviking-agent-integration skill) ── # Re-injects memory.provider after model config is written on each start. if ! grep -q "provider: openviking" "$HOME/.hermes/config.yaml" 2>/dev/null; then cat >> "$HOME/.hermes/config.yaml" << 'OVYAML' memory: provider: openviking openviking: endpoint: __OV_ENDPOINT__ OVYAML fi if ! grep -q "OPENVIKING_ENDPOINT" "$HOME/.hermes/.env" 2>/dev/null; then echo "OPENVIKING_ENDPOINT='__OV_ENDPOINT__'" >> "$HOME/.hermes/.env" fi """ block = block.replace("__OV_ENDPOINT__", endpoint) ``` WorkSwarm similarly interpolates the endpoint into an exported shell variable: ```bash "$OV_PY" - "$tpl" "$OV_ENDPOINT" "$OV_MCP_URL" "$_agents_tmp" "$OV_SHARED_DIR" "$OV_TEMPLATE_DIR" "$OV_RUNTIME_DIR" <<'PYTPL' import sys, os path, endpoint, mcp_url, agents_md_path, shared_dir, template_dir, runtime_dir = sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], sys.argv[5], sys.argv[6], sys.argv[7] with open(path) as f: lines ...[truncated 4291 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Parse the endpoint with a strict URL parser before any network request or file modification. 2. Permit only `http` and `https` schemes. 3. Permit plaintext HTTP only for loopback addresses unless the user explicitly approves the risk. 4. Reject control characters, newlines, shell metacharacters, quotes, backticks, and command-substitution syntax. 5. Do not construct executable code through `str.replace()` or Python `%` formatting. 6. For shell output, generate assignments with a proven shell-escaping routine such as Bash `printf '%q'`. 7. Prefer passing endpoint values through environment variables or positional arguments rather than embedding them into generated scripts. 8. Use `json.dump()` or `json.dumps()` when generating JSON or Python-compatible string values. 9. Use a YAML serializer when writing YAML configuration. 10. Validate generated files with `bash -n`, JSON parsing, or YAML parsing before replacing persistent templates. 11. Write changes to a temporary file, validate them, and atomically rename them into place. 12. Add tests covering quotes, backticks, `$()`, semicolons, newlines, Unicode control characters, and malformed URLs. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/agents/openclaw.sh:18
Finding
Mutable Remote Plugins Are Retrieved and Executed Without an Audited Version Pin<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/agents/openclaw.sh:18-50` - `scripts/agents/openclaw.sh:173-184` - `scripts/lib/plugins.sh:55-71` - `scripts/lib/plugins.sh:238-306` - `scripts/agents/prime_agent.sh:22` - `scripts/agents/deepseek_harness.sh:132` **Vulnerability Type**: Mutable remote payload retrieval and supply-chain execution **Risk Level**: High ### Vulnerable Code OpenClaw explicitly installs the mutable `latest` release: ```bash local ov_runtime_src="$OV_RUNTIME_DIR/openclaw/openviking-plugin-source" # Install plugin source — npm first, fall back to GitHub download local _ov_npm_ok=0 if [[ "${DRY_RUN:-false}" != "true" ]]; then local _npm_reg; _npm_reg=$(ov_first_npm_registry) log_info "Trying npm install @openviking/openclaw-plugin (online, $_npm_reg)..." mkdir -p /tmp/openviking local _npm_stage; _npm_stage=$(mktemp -d /tmp/openviking/ov-npm.XXXXXX) || { log_warn "mktemp failed, falling back to GitHub"; _npm_stage=""; } cat > "$_npm_stage/package.json" << 'OVPKGEOF' { "dependencies": { "@openviking/openclaw-plugin": "latest" } } OVPKGEOF if [[ -n "$_npm_stage" ]] && \ (cd "$_npm_stage" && "$OV_NPM" install \ --registry="$_npm_reg" --no-audit --no-fund 2>&1 | tail -5) && \ [[ -d "$_npm_stage/node_modules/@openviking/openclaw-plugin" ]]; then rm -rf "$ov_runtime_src" cp -a "$_npm_stage/node_modules/@openviking/openclaw-plugin" "$ov_runtime_src" ``` Persistent startup code also installs unversioned packages from ClawHub or npm: ```bash if [[ "$OV_PLUGIN_INSTALLED" = "0" ]]; then echo "[openclaw] Cache miss — trying online (ClawHub → npm mirrors)..." if "$NODE" "$CLI" plugins install --accept-capabilities clawhub:@openviking/openclaw-plugin 2>&1; then OV_PLUGIN_INSTALLED=1 echo "[openclaw] Installed from ClawHub" else echo "[openclaw] WARNING: ClawHub failed — trying npm mirror" export NPM_CONFIG_REGISTRY=__OV_NPM_REGISTRY__ if "$NODE" "$CLI" plugins ...[truncated 3631 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `latest` and unversioned package references with exact reviewed versions. 2. Pin GitHub-only plugins to immutable commit SHAs stored in the Skill package. 3. Maintain an in-repository SHA-256 manifest for every executable plugin file or archive. 4. Verify downloaded artifacts against that local manifest rather than trusting live upstream metadata. 5. Commit and enforce npm lockfiles with integrity fields. 6. Use `npm ci --ignore-scripts` where lifecycle scripts are unnecessary. 7. If lifecycle scripts are required, document and audit each script before permitting execution. 8. Remove online installation from persistent agent startup scripts. Provision reviewed artifacts during an explicit administrative installation phase. 9. Fail closed when a pinned artifact is unavailable instead of silently selecting a newer remote payload. 10. Sign release manifests and verify signatures against a public key bundled with the Skill. 11. Record the exact package version, commit, and digest in status output and installation logs without exposing secrets. 12. Periodically review transitive dependencies and mirror provenance. ]]>

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/agents/openclaw.sh:18
Finding
Plugin Downloads and Persistent Filesystem Changes Occur Before User Authorization<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/agents/openclaw.sh:18-76,120` - `scripts/agents/prime_agent.sh:22-33` **Vulnerability Type**: Pre-consent network access and host modification **Risk Level**: Medium ### Vulnerable Code OpenClaw installs and persists a plugin before calling the confirmation function: ```bash local ov_runtime_src="$OV_RUNTIME_DIR/openclaw/openviking-plugin-source" # Install plugin source — npm first, fall back to GitHub download local _ov_npm_ok=0 if [[ "${DRY_RUN:-false}" != "true" ]]; then local _npm_reg; _npm_reg=$(ov_first_npm_registry) log_info "Trying npm install @openviking/openclaw-plugin (online, $_npm_reg)..." mkdir -p /tmp/openviking local _npm_stage; _npm_stage=$(mktemp -d /tmp/openviking/ov-npm.XXXXXX) || { log_warn "mktemp failed, falling back to GitHub"; _npm_stage=""; } cat > "$_npm_stage/package.json" << 'OVPKGEOF' { "dependencies": { "@openviking/openclaw-plugin": "latest" } } OVPKGEOF if [[ -n "$_npm_stage" ]] && \ (cd "$_npm_stage" && "$OV_NPM" install \ --registry="$_npm_reg" --no-audit --no-fund 2>&1 | tail -5) && \ [[ -d "$_npm_stage/node_modules/@openviking/openclaw-plugin" ]]; then rm -rf "$ov_runtime_src" cp -a "$_npm_stage/node_modules/@openviking/openclaw-plugin" "$ov_runtime_src" log_ok "openclaw-plugin installed from npm (online) -> $ov_runtime_src" touch "$ov_runtime_src" _ov_npm_ok=1 else log_warn "npm install failed — falling back to GitHub source download" fi [[ -n "$_npm_stage" ]] && rm -rf "$_npm_stage" fi if [[ "$_ov_npm_ok" -eq 0 ]]; then ov_plugin_provision "openclaw-plugin" "$ov_runtime_src" || return 1 [[ "${DRY_RUN:-false}" == "true" ]] || log_ok "openclaw-plugin source installed on demand at $ov_runtime_src" fi ``` The authorization prompt is reached only later: ```bash require_confirmation "Integrate OpenViking (Official ClawHub Plugin)" "openclaw" "Install @openviking/openclaw-plugin (ClawHub → ...[truncated 3013 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Move `require_confirmation` to the beginning of every mutating integration function. 2. Perform confirmation before: - Health checks that contact user-supplied remote endpoints. - Registry probes. - npm installation. - GitHub or mirror downloads. - Cache creation, deletion, copying, or timestamp updates. 3. Separate read-only planning from execution: - Phase one computes and displays the planned changes. - Phase two runs only after explicit confirmation. 4. Ensure `--dry-run` performs no network requests and no filesystem writes. 5. Stage downloads only after authorization and remove staged content on every failure or cancellation path. 6. Use a transaction-like rollback procedure if an operation fails after authorization. 7. Add automated tests asserting that a declined prompt leaves filesystem hashes and network-call counters unchanged. 8. Document any unavoidable pre-consent read-only checks and request separate approval before contacting non-loopback hosts. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/verify_mcp.sh:5
Finding
OpenViking API Key Can Be Sent to an Arbitrary Plaintext HTTP Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `scripts/verify_mcp.sh:5-31,54-72` **Vulnerability Type**: Plaintext credential transmission to an unvalidated destination **Risk Level**: Medium ### Vulnerable Code The script accepts both the endpoint and API key directly from the caller: ```bash OV_ENDPOINT="${OV_ENDPOINT:-http://127.0.0.1:1933}" OV_API_KEY="${OV_API_KEY:-}" while [[ $# -gt 0 ]]; do case "$1" in --endpoint) OV_ENDPOINT="$2"; shift 2 ;; --api-key) OV_API_KEY="$2"; shift 2 ;; *) echo "Unknown option: $1"; exit 1 ;; esac done MCP_URL="${OV_ENDPOINT}/mcp" AUTH_HEADERS=() [[ -n "$OV_API_KEY" ]] && AUTH_HEADERS=(-H "Authorization: Bearer $OV_API_KEY") ``` The token is then sent to the configured endpoint: ```bash INIT_RESP=$(ov_curl -s -X POST "$MCP_URL" \ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \ "${AUTH_HEADERS[@]}" \ -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"verify-mcp","version":"1.0"}}}' \ -D "$OV_TMP_HEADERS" 2>&1) ``` Subsequent MCP calls also transmit the same Bearer token: ```bash if [[ -n "$SESSION_ID" ]]; then curl -s -X POST "$MCP_URL" \ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \ -H "Mcp-Session-Id: $SESSION_ID" "${AUTH_HEADERS[@]}" \ -d '{"jsonrpc":"2.0","method":"notifications/initialized"}' 2>/dev/null || true fi ``` ```bash TOOLS_RESP=$(curl -s -X POST "$MCP_URL" \ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \ ${SESSION_ID:+-H "Mcp-Session-Id: $SESSION_ID"} "${AUTH_HEADERS[@]}" \ -d '{"jsonrpc":"2.0","id":3,"method":"tools/list","params":{}}' 2>&1) ``` ```bash HEALTH_RESP=$(curl -s -X POST "$MCP_URL" \ -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \ ${SESSION_ID:+-H "Mcp-Session-Id: $SESSION_ID"} "${AUTH_HEADERS[@]}" \ ...[truncated 2180 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require HTTPS whenever the endpoint is not a loopback address. 2. Permit HTTP only for `127.0.0.0/8`, `::1`, or an explicitly approved local Unix-socket transport. 3. Parse and normalize the endpoint before use; reject embedded credentials, fragments, control characters, and unsupported schemes. 4. Display the normalized destination and require explicit confirmation before sending a key to a non-default origin. 5. Avoid accepting sensitive keys directly on the command line. Prefer: - A protected environment variable. - A file readable only by the current user. - Standard input. - A dedicated secret manager. 6. Use one bounded curl wrapper consistently so all requests receive the same TLS, timeout, and destination restrictions. 7. Require certificate verification and do not enable insecure TLS options. 8. Ensure diagnostic output never includes authorization headers or complete command lines. 9. Consider using a short-lived, verification-only token instead of the root API key. 10. Add tests confirming that a key is never sent to plaintext non-loopback endpoints. ]]>
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (88)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
A generic dispatch/registry framework without the promised OpenViking-specific safety controls creates a dangerous trust gap: users may believe authorization, unbinding, and verification exist when they do not. Because the skill is positioned to alter live and template-level agent startup/configuration, that mismatch can result in persistent unauthorized integrations, incomplete removal, or unsafe operational decisions based on false status assumptions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
A generic dispatch/registry framework without the promised OpenViking-specific safety controls creates a dangerous trust gap: users may believe authorization, unbinding, and verification exist when they do not. Because the skill is positioned to alter live and template-level agent startup/configuration, that mismatch can result in persistent unauthorized integrations, incomplete removal, or unsafe operational decisions based on false status assumptions.

Credential Access

High
Category
Privilege Escalation
Content
fi
    if [[ "$plugin_source" == "none" ]]; then
      local NPM_REGISTRY; NPM_REGISTRY=$(ov_first_npm_registry 2>/dev/null || echo "$OV_NPM_REGISTRY_DEFAULT")
      echo "registry=${NPM_REGISTRY}" > "${ov_npm_dir}/.npmrc"
      cat > "${ov_npm_dir}/package.json" <<PKGEOF
{"dependencies":{"@opencode-ai/plugin":"$OV_PLUGIN_SDK_VER","@openviking/opencode-plugin":"$OV_OPENCODE_PLUGIN_VER"}}
PKGEOF
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
fi
    if [[ "$plugin_source" == "none" ]]; then
      local NPM_REGISTRY; NPM_REGISTRY=$(ov_first_npm_registry 2>/dev/null || echo "$OV_NPM_REGISTRY_DEFAULT")
      echo "registry=${NPM_REGISTRY}" > "${ov_npm_dir}/.npmrc"
      cat > "${ov_npm_dir}/package.json" <<PKGEOF
{"dependencies":{"@opencode-ai/plugin":"$OV_PLUGIN_SDK_VER","@openviking/opencode-plugin":"$OV_OPENCODE_PLUGIN_VER"}}
PKGEOF
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
fi
    if [[ "$plugin_source" == "none" ]]; then
      local NPM_REGISTRY; NPM_REGISTRY=$(ov_first_npm_registry 2>/dev/null || echo "$OV_NPM_REGISTRY_DEFAULT")
      echo "registry=${NPM_REGISTRY}" > "${ov_npm_dir}/.npmrc"
      cat > "${ov_npm_dir}/package.json" <<PKGEOF
{"dependencies":{"@opencode-ai/plugin":"$OV_PLUGIN_SDK_VER","@openviking/opencode-plugin":"$OV_OPENCODE_PLUGIN_VER"}}
PKGEOF
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
fi
    if [[ "$plugin_source" == "none" ]]; then
      local NPM_REGISTRY; NPM_REGISTRY=$(ov_first_npm_registry 2>/dev/null || echo "$OV_NPM_REGISTRY_DEFAULT")
      echo "registry=${NPM_REGISTRY}" > "${ov_npm_dir}/.npmrc"
      cat > "${ov_npm_dir}/package.json" <<PKGEOF
{"dependencies":{"@opencode-ai/plugin":"$OV_PLUGIN_SDK_VER","@openviking/opencode-plugin":"$OV_OPENCODE_PLUGIN_VER"}}
PKGEOF
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
fi
    if [[ "$plugin_source" == "none" ]]; then
      local NPM_REGISTRY; NPM_REGISTRY=$(ov_first_npm_registry 2>/dev/null || echo "$OV_NPM_REGISTRY_DEFAULT")
      echo "registry=${NPM_REGISTRY}" > "${ov_npm_dir}/.npmrc"
      cat > "${ov_npm_dir}/package.json" <<PKGEOF
{"dependencies":{"@opencode-ai/plugin":"$OV_PLUGIN_SDK_VER","@openviking/opencode-plugin":"$OV_OPENCODE_PLUGIN_VER"}}
PKGEOF
Confidence
70% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
cp -a "$OV_PLUGIN_DST" "$OV_PLUGIN_SHARED"
      touch "$OV_PLUGIN_SHARED"
      if [[ -d "$OV_NPM_DIR/node_modules/@opencode-ai" ]]; then
        rm -rf "$OV_PLUGIN_SHARED/../@opencode-ai"
        cp -a "$OV_NPM_DIR/node_modules/@opencode-ai" "$OV_PLUGIN_SHARED/../@opencode-ai"
      fi
    else
Confidence
95% confidence
Finding
The script performs a recursive delete on a path derived from variables and path traversal ("$OV_PLUGIN_SHARED/../@opencode-ai") without first canonicalizing and validating the target. If OV_PLUGIN_SHARED or its parent is misconfigured, attacker-influenced, or symlinked, the cleanup step could delete unintended directories outside the intended cache area.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
print("No OpenViking integration block found in template")
PYUNBIND
    log_ok "OpenViking integration block removed from template"
    rm -f "$OV_SHARED_DIR/ov-codearts-init.sh" && log_ok "Removed ov-codearts-init.sh"
  fi
  if [[ -n "$sandbox" ]]; then
    if [[ -n "$cf" && -f "$cf" ]]; then
Confidence
95% confidence
Finding
This removes a shared init script based on OV_SHARED_DIR without validating that the resolved file is inside an expected application-owned directory. In a hostile or corrupted environment variable scenario, the command could delete an unintended file path and affect other integrations or shared tooling.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
log_ok "OpenViking plugin removed from live sandbox"
    fi
    local ov_npm_dir="${sandbox}/.codeartsdoer"
    rm -rf "${ov_npm_dir}/node_modules" 2>/dev/null && log_ok "node_modules removed"
    rm -f "${ov_npm_dir}/package.json" 2>/dev/null
    rm -f "${ov_npm_dir}/package-lock.json" 2>/dev/null
    rm -f "${ov_npm_dir}/.npmrc" 2>/dev/null
Confidence
95% confidence
Finding
The unbind flow recursively deletes ${ov_npm_dir}/node_modules, where ov_npm_dir is built from a discovered sandbox path. If sandbox discovery returns an unexpected, attacker-controlled, or symlink-manipulated path, this can cause destructive deletion of arbitrary directories under that location.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
fi
    local ov_npm_dir="${sandbox}/.codeartsdoer"
    rm -rf "${ov_npm_dir}/node_modules" 2>/dev/null && log_ok "node_modules removed"
    rm -f "${ov_npm_dir}/package.json" 2>/dev/null
    rm -f "${ov_npm_dir}/package-lock.json" 2>/dev/null
    rm -f "${ov_npm_dir}/.npmrc" 2>/dev/null
    rm -f "${ov_npm_dir}/openviking-config.json" 2>/dev/null
Confidence
95% confidence
Finding
This deletes package.json in a path derived from the sandbox location without confirming the path is trusted. While less destructive than rm -rf on a directory, a manipulated sandbox path could still cause loss of unrelated files and break other tooling.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
local ov_npm_dir="${sandbox}/.codeartsdoer"
    rm -rf "${ov_npm_dir}/node_modules" 2>/dev/null && log_ok "node_modules removed"
    rm -f "${ov_npm_dir}/package.json" 2>/dev/null
    rm -f "${ov_npm_dir}/package-lock.json" 2>/dev/null
    rm -f "${ov_npm_dir}/.npmrc" 2>/dev/null
    rm -f "${ov_npm_dir}/openviking-config.json" 2>/dev/null
    rm -rf "${ov_npm_dir}/openviking" 2>/dev/null
Confidence
95% confidence
Finding
This removes package-lock.json from a variable-derived path with no path safety guardrails. If the sandbox path is wrong or attacker-controlled, the command can delete an unintended lockfile outside the target integration directory.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
rm -rf "${ov_npm_dir}/node_modules" 2>/dev/null && log_ok "node_modules removed"
    rm -f "${ov_npm_dir}/package.json" 2>/dev/null
    rm -f "${ov_npm_dir}/package-lock.json" 2>/dev/null
    rm -f "${ov_npm_dir}/.npmrc" 2>/dev/null
    rm -f "${ov_npm_dir}/openviking-config.json" 2>/dev/null
    rm -rf "${ov_npm_dir}/openviking" 2>/dev/null
    log_ok "npm packages and config cleaned up"
Confidence
95% confidence
Finding
Although deleting .npmrc is expected during cleanup, the path is still derived from ov_npm_dir and is not validated. In the presence of path manipulation, this could remove an unrelated npm configuration file and disrupt package operations or remove credentials unintentionally.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
rm -f "${ov_npm_dir}/package.json" 2>/dev/null
    rm -f "${ov_npm_dir}/package-lock.json" 2>/dev/null
    rm -f "${ov_npm_dir}/.npmrc" 2>/dev/null
    rm -f "${ov_npm_dir}/openviking-config.json" 2>/dev/null
    rm -rf "${ov_npm_dir}/openviking" 2>/dev/null
    log_ok "npm packages and config cleaned up"
  fi
Confidence
95% confidence
Finding
This deletes openviking-config.json from a variable-derived location without canonical path validation. If the sandbox path is not trustworthy, the script could remove a different configuration file than intended.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
rm -f "${ov_npm_dir}/package-lock.json" 2>/dev/null
    rm -f "${ov_npm_dir}/.npmrc" 2>/dev/null
    rm -f "${ov_npm_dir}/openviking-config.json" 2>/dev/null
    rm -rf "${ov_npm_dir}/openviking" 2>/dev/null
    log_ok "npm packages and config cleaned up"
  fi
  if [[ -n "$sandbox" && -f "${sandbox}/AGENTS.md" ]] && grep -q "OpenViking" "${sandbox}/AGENTS.md" 2>/dev/null; then
Confidence
95% confidence
Finding
Recursive deletion of ${ov_npm_dir}/openviking is potentially dangerous because the base path comes from sandbox discovery and is not validated before use. If a crafted or symlinked sandbox path is supplied, this cleanup can delete arbitrary directory content outside the intended integration area.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
log_ok "npm packages and config cleaned up"
  fi
  if [[ -n "$sandbox" && -f "${sandbox}/AGENTS.md" ]] && grep -q "OpenViking" "${sandbox}/AGENTS.md" 2>/dev/null; then
    rm -f "${sandbox}/AGENTS.md"
    log_ok "AGENTS.md removed (old approach cleanup)"
  fi
  ov_log_info "重启 CodeArts 以使更改完全生效" "Restart CodeArts for changes to take full effect"
Confidence
95% confidence
Finding
Removing ${sandbox}/AGENTS.md after only checking file existence and content is risky if sandbox is attacker-influenced or misresolved. That could delete an unintended AGENTS.md outside the intended environment and interfere with other agent configurations.

Tool Parameter Abuse

High
Category
Tool Misuse
Content
[[ -d "\$_pd" ]] || continue
      _pn=\$(basename "\$_pd")
      [[ "\$_pn" == "dsh-llm" || "\$_pn" == "dsh-tools" ]] && continue
      rm -rf "\$_plugin_da/\$_pn"
      cp -r "\$_pd" "\$_plugin_da/\$_pn"
    done
    touch "\$_peers_marker"
Confidence
95% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
f.write(content)
DSHUNBINJ
    log_ok "OpenViking integration block removed from template start.sh"
    rm -f "$OV_SHARED_DIR/ov-deepseek-harness-init.sh" && log_ok "Removed standalone ov-deepseek-harness-init.sh"
  fi
  # Live sandbox profiles
  if [[ "$live_has_ov" == "true" ]]; then
Confidence
95% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
local cf="${dsh_home}/profiles/$p/package.json"
      [[ -f "$cf" ]] || continue
      backup_file "$cf" 2>/dev/null || true
      rm -rf "${dsh_home}/profiles/$p/node_modules/@openviking"
      "$OV_PY" - "$cf" << 'DSHPJSON'
import json
import sys
Confidence
95% 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).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
local rt_cf="$_rt_profiles/$p/package.json"
      [[ -f "$rt_cf" ]] || continue
      if [[ -d "$_rt_profiles/$p/node_modules/@openviking" ]]; then
        rm -rf "$_rt_profiles/$p/node_modules/@openviking"
        rt_cleaned=true
      fi
      if grep -q '"@openviking/dsh-memory-plugin"' "$rt_cf" 2>/dev/null; then
Confidence
95% 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).

Credential Access

High
Category
Privilege Escalation
Content
endpoint: __OV_ENDPOINT__
OVYAML
fi
if ! grep -q "OPENVIKING_ENDPOINT" "$HOME/.hermes/.env" 2>/dev/null; then
  echo "OPENVIKING_ENDPOINT='__OV_ENDPOINT__'" >> "$HOME/.hermes/.env"
fi
"""
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
endpoint: __OV_ENDPOINT__
OVYAML
fi
if ! grep -q "OPENVIKING_ENDPOINT" "$HOME/.hermes/.env" 2>/dev/null; then
  echo "OPENVIKING_ENDPOINT='__OV_ENDPOINT__'" >> "$HOME/.hermes/.env"
fi
"""
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
endpoint: __OV_ENDPOINT__
OVYAML
fi
if ! grep -q "OPENVIKING_ENDPOINT" "$HOME/.hermes/.env" 2>/dev/null; then
  echo "OPENVIKING_ENDPOINT='__OV_ENDPOINT__'" >> "$HOME/.hermes/.env"
fi
"""
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
endpoint: __OV_ENDPOINT__
OVYAML
fi
if ! grep -q "OPENVIKING_ENDPOINT" "$HOME/.hermes/.env" 2>/dev/null; then
  echo "OPENVIKING_ENDPOINT='__OV_ENDPOINT__'" >> "$HOME/.hermes/.env"
fi
"""
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
endpoint: __OV_ENDPOINT__
OVYAML
fi
if ! grep -q "OPENVIKING_ENDPOINT" "$HOME/.hermes/.env" 2>/dev/null; then
  echo "OPENVIKING_ENDPOINT='__OV_ENDPOINT__'" >> "$HOME/.hermes/.env"
fi
"""
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Static analysis

No suspicious patterns detected.