Back to skill

Security audit

ROS Noetic Navigation - Cartographer

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches a ROS robot navigation helper, but one bundled launcher runs code from a different hard-coded skill directory, which needs review before use.

Review or fix artifact/scripts/test_pose.sh before installing or running this skill. The main navigation behavior is disclosed, but robot movement is high-impact, so use only with a trusted ROS setup and verify waypoints before issuing goto or cruise commands.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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 (1)

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/test_pose.sh:7
Finding

External Script Substitution Through a Hard-Coded Skill Directory

Content
View full analysis

Vulnerability Details

File Location: scripts/test_pose.sh, lines 7–9
Vulnerability Type: Tool hijacking through external script substitution
Risk Level: Medium

Vulnerable Code:

bash
cd ~/.openclaw/workspace/skills/ros1-for-robot5/scripts

python3 get_pose_tf.py "$@"

Technical Analysis

The launcher does not execute the get_pose_tf.py file bundled with the audited skill. Instead, it changes into the hard-coded directory of a different skill, ~/.openclaw/workspace/skills/ros1-for-robot5/scripts, and executes the relative filename get_pose_tf.py found there.

This creates a trust-boundary violation: the apparent launcher belongs to this package, but the executed Python code is selected from an external, separately mutable directory. It also conflicts with the documented Cartographer project layout. Quoting "$@" correctly protects the forwarded arguments from shell splitting, but it does not mitigate substitution of the Python script itself.

Attack Path

  1. An attacker gains write access to ~/.openclaw/workspace/skills/ros1-for-robot5/scripts, or a compromised/untrusted skill installation controls that path.
  2. The attacker creates or replaces get_pose_tf.py in that directory with malicious Python code.
  3. A user invokes the audited scripts/test_pose.sh launcher, expecting it to run this package's pose utility.
  4. The launcher changes into the attacker-controlled or compromised external directory.
  5. python3 get_pose_tf.py "$@" executes the substituted script with the invoking user's privileges.

Impact Assessment

Successful exploitation permits arbitrary Python code execution with the privileges and environment of the user running test_pose.sh. The substituted script could read or modify files accessible to that user, access ROS resources exposed to the process, issue unintended robot operations, or impersonate the expected pose utility.

The scope is limited to th ...[truncated 213 chars]

Remediation
View remediation

Remediation Suggestions

Resolve the launcher directory from the location of test_pose.sh and execute the bundled Python script by absolute path:

bash
#!/usr/bin/env bash
set -euo pipefail

source /opt/ros/noetic/setup.bash
source "$HOME/robot5/devel/setup.bash"

SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
exec python3 "$SCRIPT_DIR/get_pose_tf.py" "$@"

Additional hardening measures:

  1. Remove the hard-coded reference to the unrelated ros1-for-robot5 skill.
  2. Avoid changing the working directory when an absolute script path is sufficient.
  3. Fail closed with set -euo pipefail if ROS environment initialization or path resolution fails.
  4. Restrict write permissions on the installed skill directory to trusted administrators or the owning user.
  5. Add a test that verifies the resolved Python script remains inside this package's scripts directory.
  6. If external script execution is intentionally required, make the path explicit in configuration and verify ownership, permissions, and integrity before execution.
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 (12)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/nav.py goto 客厅

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/nav.py goto 客厅

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/nav.py goto 客厅

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/nav.py goto 客厅

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/nav.py goto 客厅

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
python3 scripts/nav.py goto 客厅

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file presents the skill description and usage instructions in Chinese, but does not indicate that the language is optional or limited to a specific region or user group. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains natural-language strings exclusively in Chinese in the module docstring, CLI help text, logs, and printed output. Under the stated policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The CLI help and parsing logic require commands in the form "去 <地点>", and the code rejects other formats. This is a natural-language policy concern because it forces a specific language/locale interaction without user opt-in or an alternative input form within that mode.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language comment on L2 is written only in Chinese, which imposes a specific language without any indication of user opt-in or a documented region-specific requirement. This matches the policy category for language or locale restrictions in natural-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The comments and usage text in lines L02-L04 are written entirely in Chinese, which imposes a specific language on users reading or maintaining the skill file. There is no indication that the skill is intentionally region-specific or that alternative language support is available.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The user-facing descriptive strings in this file are entirely in Chinese, including usage guidance and notes. Under the policy, forcing a specific language without user choice or clear region-specific justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.