Back to skill

Security audit

Rdk X5 Ai Detect

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly fits RDK X5 AI inference, but it includes broader streaming workflows and an unsafe RTSP credential example users could copy.

Review this skill before installing. Avoid copying the RTSP credential example with real credentials; use a protected config or secret source, a read-only camera account, and encrypted or isolated transport where possible. Pin and verify Python packages before installing, and be aware the workflows may access camera, audio, or RTSP streams and expose a local web viewer on port 8000.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding
Unpinned Third-Party Python Packages Installed from the Default Package Index<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 25 **Vulnerability Type**: Supply-chain exposure through unpinned dependencies **Risk Level**: Medium ### Vulnerable Code ```bash pip3 install hobot-dnn-rdkx5 hobot-vio-rdkx5 ``` ### Technical Analysis The installation command does not specify exact package versions, cryptographic hashes, or an explicitly trusted vendor repository. As a result, installation behavior depends on the mutable state of the package index and its transitive dependencies at the time the command is executed. If a package publisher account, package release, transitive dependency, or configured package index is compromised, `pip` may retrieve and install attacker-controlled content. Python packages can execute build-related code during installation, while malicious installed modules can execute code when subsequently imported. ### Attack Path 1. An attacker compromises one of the named packages, a transitive dependency, or the package-index account used to publish it. 2. The attacker publishes a malicious release that remains compatible with the unpinned package requirement. 3. A user follows the documented `pip3 install` command. 4. `pip` resolves the malicious release from the default or locally configured package index. 5. Malicious code executes during package build or installation, or later when the package is imported by an inference script. ### Impact Assessment Successful exploitation can execute code with the privileges of the user running `pip3`. This may permit access to that user's files, credentials, ROS environment, connected devices, and network resources. If the command is run by a privileged account, the impact may extend to system-wide package modification and complete device compromise. The document does not instruct users to run the command with `sudo`, so elevated privileges are not assumed. ]]>
Remediation
<![CDATA[ ## Remediation Suggestions - Pin every direct dependency to a reviewed, known-good version. - Lock and review all transitive dependencies. - Require cryptographic hashes through a lock file or a requirements file used with `pip install --require-hashes`. - Use the hardware vendor's authenticated package repository rather than relying implicitly on the default index. - Install packages in an isolated virtual environment under an unprivileged account. - Retain reviewed package artifacts in a controlled internal repository for reproducible deployment. - Add package provenance, signature, or software-bill-of-materials verification where supported. For example, after validating the appropriate releases: ```bash python3 -m venv .venv . .venv/bin/activate pip install --require-hashes -r requirements.lock ``` ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:101
Finding
RTSP Credentials Exposed in Command-Line Arguments and Plaintext Transport<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 101-102 **Vulnerability Type**: Insecure credential handling and plaintext sensitive data **Risk Level**: Medium ### Vulnerable Code ```bash source /opt/tros/humble/setup.bash ros2 launch hobot_rtsp_client hobot_rtsp_client.launch.py \ rtsp_url:="rtsp://admin:password@192.168.1.64:554/stream1" ``` ### Technical Analysis The example embeds a username and password directly in an RTSP URL passed as a command-line argument. Although the values appear illustrative, the documented pattern encourages users to substitute real credentials into the command. Real credentials entered this way may be retained in shell history and can potentially be exposed through process inspection, terminal logs, support transcripts, or automation logs. In addition, ordinary `rtsp://` does not provide transport encryption by itself, so credentials and video traffic may be exposed to network interception depending on the authentication mode and deployment configuration. ### Attack Path **Local credential disclosure:** 1. A user replaces the example username and password with valid camera credentials. 2. The user executes the command in an interactive shell or automated environment. 3. The complete URL is retained in shell history, process metadata, logs, or captured terminal output. 4. Another user or process with access to those records obtains the credentials. 5. The attacker authenticates to the camera or RTSP service using the recovered account. **Network disclosure:** 1. The client connects to the camera using unencrypted RTSP over an observable network. 2. An attacker with a suitable network position captures or manipulates the traffic. 3. Depending on the camera's authentication and transport configuration, the attacker obtains reusable authentication material, observes the media stream, or interferes with stream delivery. ### Impact Assessment Exploitation may provide unauthorized access to the a ...[truncated 475 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Do not place real credentials directly in command-line arguments. - Store the RTSP URL or credentials in a protected configuration or secret file readable only by the service account. - Ensure secret files have restrictive permissions, such as mode `0600`. - Configure the launch process to read credentials from a protected secret source without printing them to logs. - Avoid entering secrets interactively in commands that will be retained in shell history. - Redact credentials from diagnostics, terminal captures, process monitoring, and ROS launch logs. - Use a dedicated camera account with read-only stream permissions rather than an administrative account. - Use a unique password that is not shared with other systems. - Prefer RTSPS, SRTP, a mutually authenticated VPN, or another encrypted and authenticated transport supported by the camera and client. - Replace the credential-bearing example with a placeholder that explicitly directs users to secure configuration, such as: ```bash # Load the RTSP URL from a protected configuration source. ros2 launch hobot_rtsp_client hobot_rtsp_client.launch.py \ rtsp_config_file:="/etc/hobot/rtsp-client.conf" ``` ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (4)

Description-Behavior Mismatch

Medium
Confidence
89% confidence
Finding
The manifest positions the skill as single AI inference and explicitly directs users away from integrated camera+AI+output pipeline use cases. The websocket launch plus live overlay visualization at `http://<RDK_IP>:8000` adds output serving and visualization pipeline behavior beyond merely running one inference algorithm.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The manifest frames this skill as running a single AI algorithm on RDK X5, explicitly excluding camera setup, multimedia workflows, integrated camera+AI+output pipelines, and external-service bridging. The RTSP client instructions introduce network video ingestion and an end-to-end streaming inference scenario, which is materially broader than the declared scope and resembles a pipeline/integration capability rather than a single-model invocation detail.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The RTSP example embeds plaintext credentials directly in the connection URL, normalizing unsafe secret handling and increasing the chance users will hardcode real usernames and passwords into shell history, logs, screenshots, and documentation. In an edge-device/network-camera context, this can lead to credential leakage and unauthorized access to camera feeds or adjacent systems.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
The skill description presents core operational guidance in a mixed Chinese/English form, and the document body is primarily Chinese, which can impose a language expectation on users without explicit opt-in. Under the language policy rule, locale or language constraints should be offered as a choice or clearly justified.

Static analysis

No suspicious patterns detected.