Back to skill

Security audit

ROS 2 专家助手

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent ROS 2 helper, but its install guidance tells users to run an unverified HTTP script and includes unsafe privileged troubleshooting commands.

Review carefully before installing. Do not run the one-line HTTP installer as written; prefer official HTTPS ROS 2 installation steps or a verified installer, inspect scripts before execution, and avoid deleting APT/dpkg lock files unless you have confirmed no package process is running and have a recovery plan.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (3)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:73
Finding

Unauthenticated Remote Script Is Downloaded and Executed in the Current Shell

Content
View full analysis
Remediation
View remediation
' fishros | sha256sum --check - less fishros bash fishros ``` 6. Do not source a remotely obtained script into the current shell. Run a verified installer as a separate process with the minimum required privileges. 7. Prefer the official ROS 2 package repositories and documented package-manager installation procedures. 8. Clearly identify every operation that requires elevated privileges and request confirmation immediately before that operation. 9. Where practical, perform installation inside a disposable virtual machine or container before applying it to a host system. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
references/installation-guide.md:132
Finding

Unsafe Deletion of Active APT and dpkg Lock Files

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
assets/action-client-server-template.md:58
Finding

ROS 2 Fibonacci Action Servers Accept Unbounded Work Requests

Content
View full analysis
order <= 0) { RCLCPP_WARN(this->get_logger(), "Rejecting invalid goal"); return rclcpp_action::GoalResponse::REJECT; } return rclcpp_action::GoalResponse::ACCEPT_AND_EXECUTE; ``` Each accepted C++ goal is then placed in a detached thread: ```cpp void handle_accepted( const std::shared_ptr goal_handle) { std::thread{ std::bind( &FibonacciActionServer::execute, ...[truncated 3359 chars]
Remediation
View remediation
= self.max_concurrent_goals: self.get_logger().warning('Rejecting goal: server is busy') return GoalResponse.REJECT return GoalResponse.ACCEPT ``` 2. Apply equivalent upper-bound validation to the C++ implementation. 3. Limit the number of active goals and avoid creating an unbounded detached thread per request. 4. Use a bounded worker pool or controlled executor. 5. Replace blocking `time.sleep()` in asynchronous code with an executor-compatible timer or asynchronous wait. 6. Set maximum execution time and cancel or abort goals that exceed it. 7. Avoid logging the complete sequence on every iteration; log bounded summaries at a controlled rate. 8. Limit feedback frequency and payload size. 9. Catch arithmetic, serialization, and callback exceptions and abort the affected goal cleanly. 10. Use a wider message type only if larger values are genuinely required, while retaining strict request and resource limits. 11. Configure ROS 2 security enclaves, DDS authentication and authorization, domain isolation, and host firewall rules so that only trusted participants can submit goals. 12. Add tests for boundary values, repeated concurrent goals, cancellation behavior, executor responsiveness, and malformed requests. ]]>
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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (31)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The guide tells users to fetch a script over plain HTTP and immediately source it into the current shell, which executes arbitrary remote code with the user's privileges and without any integrity verification. In an installation guide, this is especially dangerous because users are primed to trust and run the command, and sourcing can also alter the current shell environment in unexpected ways.

Content

No source excerpt is available for this finding.

YARA rule 'backdoor_persistence': Backdoor persistence with malicious payloads (shell commands, SSH key injection, hidden root users) [malware]

High
Category
YARA Match
Confidence
75% confidence
Finding

YARA rule matched a known malware signature (reverse shell, backdoor, ransomware, C2 framework, or info stealer).

Content

Scanner excerpt · references/installation-guide.md (reported line 108)May include surrounding context.

��:**

bash
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_cpp talker

终端 2(订阅者):

bash
source /opt/ros/humble/setup.bash
ros2 run demo_nodes_py listener

预期结果:

  • 终端 1 显示发布消息的日志
  • 终端 2 显示接收到的消息

5. 配置环境变量(持久化)

若每次都需手动 source,可添加到 ~/.bashrc:

bash
echo "source /opt/ros/humble/setup.bash" >> ~/.bashrc
source ~/.bashrc

常见问题排查

问题 1:NO_PUBKEY 错误

错误信息:

text
NO_PUBKEY <KEY>

解决方案:

bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY>

说明: 将 <KEY> 替换为错误信息中显示的实际公钥。


问题 2:APT 锁错误

错误信息:

text
Could not get lock /var/lib/apt/lists/lock
E: Unable to lock directory /var/lib/apt/lists/

原因: 其他包管理进程正在运行(如 apt-get, aptitude, Software Center

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The troubleshooting advice recommends manually deleting APT/dpkg lock files, which can corrupt package-manager state if any package process is still active or was interrupted mid-transaction. Users following a quick-fix guide may run these commands unsafely, causing broken package databases and wider system instability.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

The rm command targets a package-manager lock file, encouraging users to forcibly bypass coordination mechanisms designed to prevent concurrent package operations. This is destructive parameter use in a system-management context and can lead to package database corruption or failed installs.

Content

Scanner excerpt · references/installation-guide.md (reported line 146)May include surrounding context.

  1. 关闭其他包管理器
  2. 若无其他进程,手动删除锁:
bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
97% confidence
Finding

This command removes the APT archives lock file, which can undermine package operation safety and lead to inconsistent state when multiple package tasks overlap. In a setup guide, destructive troubleshooting shortcuts are especially risky because they are likely to be executed verbatim by less experienced users.

Content

Scanner excerpt · references/installation-guide.md (reported line 147)May include surrounding context.

  1. 若无其他进程,手动删除锁:
bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Removing dpkg's frontend lock file is an unsafe use of rm against a control file that protects package operations. This can result in interrupted installs, partial upgrades, or a broken package manager, making it a genuine hazardous instruction.

Content

Scanner excerpt · references/installation-guide.md (reported line 148)May include surrounding context.

bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Deleting the core dpkg lock file is a direct bypass of package-manager safeguards and can leave the system in an inconsistent administrative state. Because this is presented as a troubleshooting fix, the skill materially increases the chance of unsafe system modification.

Content

Scanner excerpt · references/installation-guide.md (reported line 149)May include surrounding context.

sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock

text

---

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

The rm command is used to delete APT source list files, and if the placeholder is misidentified or expanded incorrectly it can remove essential repository definitions. This is risky command guidance because it performs irreversible system configuration changes with little validation.

Content

Scanner excerpt · references/installation-guide.md (reported line 167)May include surrounding context.

text
找到重复的 `.list` 文件,删除多余项:
```bash
sudo rm /etc/apt/sources.list.d/<duplicate-file>.list

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill is written entirely as a Chinese assistant persona and does not indicate that users may choose another language. This creates a locale/language constraint without explicit opt-in, which fits the language-policy violation category.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The activation description says the skill should be used whenever the user mentions ROS/ROS2 development, installation, concept learning, code analysis, or project practice. This scope is very broad and does not define clear boundaries or exclusion conditions, so ordinary ROS-related discussion could unintentionally invoke the skill.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · assets/action-client-server-template.md (reported line 374)May include surrounding context.

md
RCLCPP_INFO(this->get_logger(), "发送目标");
        
        // 发送目标选项
        auto send_goal_options = rclcpp_action::Client<Fibonacci>::SendGoalOptions();
        send_goal_options.goal_response_callback =
            [this](const GoalHandleFibonacci::SharedPtr & goal_handle) {
                if (!goal_handle) {

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file presents all guidance, headings, and examples in Chinese only, with no indication that users may select another language or that the document is intended exclusively for a Chinese-language audience. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

All user-facing instructions in the file are presented only in Chinese, and the document does not offer an alternate language or state that it is intended exclusively for a Chinese-speaking audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The document recommends changing system package mirrors and clearing third-party sources without explaining that this can disable repositories, change trust boundaries, or affect future package updates. While common in regional setup docs, omitting warnings can lead users to break package management or unknowingly trust alternate mirrors.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/installation-guide.md (reported line 124)May include surrounding context.

解决方案:

bash
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <KEY>

说明:

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

This sudo command deletes an APT lock file, which with root privileges can damage package-management state if used at the wrong time. The danger is amplified by elevated privileges and by the troubleshooting context encouraging users to bypass safeguards rather than diagnose the underlying process contention.

Content

Scanner excerpt · references/installation-guide.md (reported line 146)May include surrounding context.

  1. 关闭其他包管理器
  2. 若无其他进程,手动删除锁:
bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
95% confidence
Finding

Deleting /var/cache/apt/archives/lock with sudo bypasses package-manager locking protections and can contribute to inconsistent or broken APT operations. In an instructional document, presenting this as a routine fix materially increases the chance of unsafe execution by users.

Content

Scanner excerpt · references/installation-guide.md (reported line 147)May include surrounding context.

  1. 若无其他进程,手动删除锁:
bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

Removing /var/lib/dpkg/lock-frontend with sudo can interfere with dpkg frontend locking and may leave package operations in an inconsistent state. Because the command is destructive and privileged, users can inadvertently damage package management while trying to fix a transient lock contention issue.

Content

Scanner excerpt · references/installation-guide.md (reported line 148)May include surrounding context.

bash
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock-frontend
sudo rm /var/lib/dpkg/lock

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
96% confidence
Finding

Deleting /var/lib/dpkg/lock with sudo is a privileged destructive action against package-manager state files and can cause dpkg database inconsistency if executed incorrectly. The skill context makes this more dangerous because users are likely to copy-paste commands during system setup, when package tools are actively in use.

Content

Scanner excerpt · references/installation-guide.md (reported line 149)May include surrounding context.

sudo rm /var/lib/apt/lists/lock sudo rm /var/cache/apt/archives/lock sudo rm /var/lib/dpkg/lock-frontend sudo rm /var/lib/dpkg/lock

text

---

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The guide tells users to delete .list files under /etc/apt/sources.list.d/ without emphasizing that removing the wrong file can disable repositories and affect security or update availability. In a package-management troubleshooting context, deletion is sometimes appropriate, but the lack of guardrails makes it risky.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
82% confidence
Finding

Using sudo rm to delete repository configuration files is a privileged and potentially disruptive action; removing the wrong file can break updates or remove access to required repositories. The command is not malicious, but the documentation lacks sufficient validation and rollback guidance for such a sensitive change.

Content

Scanner excerpt · references/installation-guide.md (reported line 167)May include surrounding context.

text
找到重复的 `.list` 文件,删除多余项:
```bash
sudo rm /etc/apt/sources.list.d/<duplicate-file>.list

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The document instructs users to build voice-control functionality using speech recognition libraries but does not disclose that spoken audio may be captured, processed, stored, or transmitted by those components. In a robotics workflow, voice data can contain sensitive personal information or environmental audio, so omitting a privacy warning can lead to unintentional collection and exposure of user data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The task describes sending natural-language commands to external LLM services and even requires an API key, but it does not warn that prompts, robot context, maps, or operator instructions may leave the device and be processed by third-party providers. In a ROS2 robotics setting, that context can include sensitive operational data, making silent off-device transmission a meaningful privacy and data-governance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The file title and opening description are entirely in Chinese, which imposes a specific language for the skill guidance without indicating user choice or opt-in. Under the policy, forcing a language/locale without user opt-in is a natural-language policy concern unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

该文档从标题到全文均明确以中文呈现 ROS 2 教学内容,但未说明这是面向特定中文受众的区域性材料,也未提供语言选择或用户选择退出的说明。按照语言/区域策略,强制单一语言而无用户选择或正当限定,属于自然语言层面的政策风险。

Content

No source excerpt is available for this finding.