Back to skill

Security audit

linux-riscv-contribute

Security checks for vulnerabilities and agentic risk

Overview

The skill fits its stated kernel-contribution workflow, but it preconfigures external GitHub and model destinations that could receive project details unless the user changes them.

Before installing or running this skill, edit the generated workflow configuration to use your own trusted GitHub repository, assignee, ACP agents, and model/provider. Run the bootstrap only with normal absolute repository paths you control, review workflow.yaml before any issue sync or agent session, and keep the documented human gates in place, especially before publishing issues or sending patch email.

Vulnerability Patterns
  • 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
  • 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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/bootstrap_openclaw_workflow.sh:9
Finding

Untrusted Path Arguments Are Written into YAML Without Escaping

Content
View full analysis

Vulnerability Details

File Location: scripts/bootstrap_openclaw_workflow.sh, lines 9-18
Vulnerability Type: YAML configuration injection
Risk Level: High

Vulnerable Code

bash
DOCS_REPO_ROOT="$1"
LINUX_REPO_PATH="$2"
BASE="$DOCS_REPO_ROOT/kernel/openclaw"

mkdir -p "$BASE/config" "$BASE/state/run_history" "$BASE/plans" "$BASE/patches" "$BASE/logs"

WF="$BASE/config/workflow.yaml"
if [[ ! -f "$WF" ]]; then
  cat > "$WF" <<YAML
project:
  linux_repo: $LINUX_REPO_PATH
  docs_repo: $DOCS_REPO_ROOT

Technical Analysis

The script accepts DOCS_REPO_ROOT and LINUX_REPO_PATH as command-line arguments and interpolates them directly into an unquoted YAML scalar. Shell quoting of the assignments prevents ordinary shell word splitting, but it does not make the values safe for insertion into YAML.

An argument may contain newlines, comments, scalar indicators, document separators, anchors, aliases, or additional mapping entries. These characters are retained when the here-document is expanded. Consequently, an attacker who controls either argument can alter the structure of the generated workflow.yaml, cause duplicate keys, or produce malformed YAML.

The generated configuration controls agents, project paths, policy limits, issue synchronization, and mailing behavior. The exact effect of duplicate keys or multiple YAML documents depends on the downstream YAML parser. Some parsers reject duplicates, while others accept the first or last value. At minimum, malformed input can prevent the workflow from loading. If the consumer accepts injected configuration fields, workflow behavior can also be modified.

The existing-file check limits this issue to initial creation or environments where the configuration file has been removed. It does not protect a first-time bootstrap using attacker-controlled arguments.

Attack Path

  1. An attacker influences a path passed to `bootstrap_openclaw_workflo ...[truncated 1297 chars]
Remediation
View remediation

Remediation Suggestions

  1. Generate the configuration through a YAML serialization library rather than string interpolation.
  2. Pass path values to the serializer as string values so newlines and YAML metacharacters are escaped correctly.
  3. Reject path arguments containing NUL bytes, carriage returns, line feeds, or other control characters.
  4. Resolve and validate both paths before writing the configuration:
    • Require absolute paths.
    • Normalize paths with realpath.
    • Confirm that the expected repositories exist.
    • Reject unexpected parent-directory traversal or disallowed roots.
  5. Validate the completed file against a strict schema that rejects unknown properties, duplicate keys, and multiple YAML documents.
  6. Write to a securely created temporary file, validate it, and atomically rename it into place only after validation succeeds.
  7. Retain the existing no-overwrite behavior, but require explicit approval before replacing or regenerating an existing configuration.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/bootstrap_openclaw_workflow.sh:24
Finding

Hard-Coded External Repository, Assignee, and Model Routing

Content
View full analysis

Vulnerability Details

File Locations:

  • scripts/bootstrap_openclaw_workflow.sh, lines 24-31 and 39-40
  • references/workflow-template.yaml, lines 8-22 and 31-32

Vulnerability Type: Unsafe hard-coded external destinations
Risk Level: Medium

Vulnerable Code

scripts/bootstrap_openclaw_workflow.sh:

yaml
agents:
  planner:
    runtime: acp
    agentId: claude-code
    model: hanbbq/gpt-5.3-codex
  implementer:
    runtime: acp
    agentId: codex
    model: hanbbq/gpt-5.3-codex
yaml
issue:
  repo: zcxGGmu/linux-riscv-docs
  assignee: zcxGGmu

references/workflow-template.yaml:

yaml
agents:
  scout:
    runtime: acp
    agentId: claude-code
    model: hanbbq/gpt-5.3-codex
  planner:
    runtime: acp
    agentId: claude-code
    model: hanbbq/gpt-5.3-codex
  implementer:
    runtime: acp
    agentId: codex
    model: hanbbq/gpt-5.3-codex
  verifier:
    runtime: acp
    agentId: codex
    model: hanbbq/gpt-5.3-codex
yaml
issue:
  repo: zcxGGmu/linux-riscv-docs
  assignee: zcxGGmu

Technical Analysis

The generated configuration and reference template select a specific GitHub repository, personal assignee, and model namespace without requiring the operator to provide or approve these destinations.

The documented workflow instructs the operator to create or update issues in the “configured repo.” Because bootstrap supplies that configuration automatically, an operator may proceed without noticing that issue content will be directed to zcxGGmu/linux-riscv-docs. Gap records can contain source paths, commit references, design analysis, lore references, and implementation details.

Similarly, agent tasks are pinned to hanbbq/gpt-5.3-codex. The repository does not explain whether that namespace is local, organizational, or externally hosted, nor does it require provider approval before source-tree context is ...[truncated 1804 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove personal repository, assignee, and model identifiers from production defaults.
  2. Require the operator to provide the issue repository and model/provider explicitly during bootstrap.
  3. Display a confirmation summary before enabling external actions, including:
    • GitHub owner and repository.
    • Issue assignee.
    • Agent ID.
    • Model and provider.
    • Mailing-list destinations.
  4. Require explicit approval before the first issue synchronization or transmission of source context to an ACP model.
  5. Support an organization-controlled allowlist for repositories, model providers, and account namespaces.
  6. Keep example values in clearly marked sample documentation rather than writing them into active configuration.
  7. Fail closed when required destination fields remain unset; do not silently substitute personal defaults.
  8. Add data-classification guidance describing what repository content may be shared with external models or issue trackers.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (1)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill includes its ready-to-use operator prompts exclusively in Chinese, while the rest of the document is in English and no opt-in or language alternative is provided. This can violate language/locale policy by forcing a specific language for practical use of the skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.