Back to skill

Security audit

Camera YOLO Operator | 摄像头 YOLO 操控者

Security checks for vulnerabilities and agentic risk

Overview

This skill appears to perform camera-based YOLO/depth work as described, but its setup and runtime behavior need review because it can weaken webcam permissions, save visual data, and load unverified external models.

Install only if you are comfortable giving the skill access to your camera and saving captured or annotated images/videos locally. Avoid running the chmod 666 webcam command; prefer proper video-group or per-user ACL access. Use a virtual environment, review model sources, pin dependencies/models where possible, and delete output folders when you no longer need the captured media.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/capture_webcam.py:80
Finding

Path Traversal and Arbitrary File Overwrite Through Unsanitized Filename Prefix

Content
View full analysis

Vulnerability Details

File Location: scripts/capture_webcam.py, lines 80-114
Vulnerability Type: Path traversal and arbitrary file overwrite
Risk Level: High

Vulnerable Code

python
parser.add_argument("--prefix", default="shot",
                    help="Filename prefix (default: 'shot')")
args = parser.parse_args()

# Setup output directory
output_dir = args.output_dir or get_default_output_dir()
os.makedirs(output_dir, exist_ok=True)

# ...

filename = f"{args.prefix}{i}.jpg"
path = os.path.join(output_dir, filename)

if not cv2.imwrite(path, frame):
    print(f"ERROR: Failed to write {path}", file=sys.stderr)
    cap.release()
    sys.exit(3)

Technical Analysis

The user-controlled --prefix value is incorporated directly into the destination path without rejecting absolute paths, directory separators, or parent-directory components. os.path.join() does not guarantee that the resulting path remains beneath output_dir. An absolute prefix can discard the intended base directory, while a prefix containing ../ can traverse outside it.

cv2.imwrite() writes to the resolved path and can overwrite an existing writable file. The code also does not check for symbolic links, pre-existing files, or path collisions.

Attack Path

  1. An attacker controls or influences the arguments used to invoke the capture script.
  2. The attacker supplies a prefix containing traversal components, such as --prefix ../../target.
  3. The script constructs a path equivalent to <output-dir>/../../target1.jpg.
  4. Path resolution escapes the intended capture directory.
  5. cv2.imwrite() creates or overwrites the attacker-selected user-writable file with JPEG data.
  6. If a relevant path is a symbolic link, the write may be redirected to another writable destination.

Impact Assessment

Exploitation grants arbitrary file creation or overwrite with image data within the privileges ...[truncated 265 chars]

Remediation
View remediation

Remediation Suggestions

  • Restrict --prefix to a safe basename character set, such as letters, digits, underscores, and hyphens.
  • Reject absolute paths, . and .. components, directory separators, and platform-specific alternate separators.
  • Resolve both the output directory and candidate destination with pathlib.Path.resolve(), then verify that the destination remains beneath the resolved output directory.
  • Generate filenames internally with UUIDs or trusted timestamps rather than accepting path-like user input.
  • Refuse to overwrite existing files or use exclusive file creation.
  • Where symbolic-link attacks are relevant, open files with operating-system protections such as O_NOFOLLOW and write through the safely opened descriptor.

Example validation:

python
import re
from pathlib import Path

if not re.fullmatch(r"[A-Za-z0-9_-]+", args.prefix):
    parser.error("--prefix may contain only letters, digits, underscores, and hyphens")

base = Path(output_dir).resolve()
destination = (base / f"{args.prefix}{i}.jpg").resolve()

if base not in destination.parents:
    raise ValueError("Output path escapes the configured output directory")
if destination.exists():
    raise FileExistsError(f"Refusing to overwrite: {destination}")

T08 · Insecure Dependencies

Warning
Location
requirements.txt:5
Finding

Unpinned Python Dependencies Permit Unreviewed Future Releases

Content
View full analysis

Vulnerability Details

File Location: requirements.txt, lines 5-16
Vulnerability Type: Mutable and unverified third-party dependencies
Risk Level: Medium

Vulnerable Code

text
# Core
ultralytics>=8.0.0
torch>=2.0.0
torchvision>=0.15.0

# Depth estimation
depth-anything-3>=0.1.0

# Pedestrian tracking (supervision includes ByteTrack)
supervision>=0.20.0

opencv-python>=4.8.0
numpy>=1.24.0

The documented installation command is:

bash
pip install -r requirements.txt

Technical Analysis

Every dependency uses a lower-bound constraint without an upper bound or exact version. Consequently, identical installation commands can resolve to different package versions over time. No lockfile or package hashes are provided to establish the identity and integrity of the installed artifacts.

Python package installation may execute build backend logic, and imported packages execute code in the local process. A compromised, malicious, or unexpectedly incompatible future release could therefore affect installation or runtime behavior with the privileges of the invoking user.

This finding establishes supply-chain exposure; it does not establish that any currently listed package is malicious.

Attack Path

  1. A user follows the documented pip install -r requirements.txt instruction.
  2. The package resolver selects the newest releases satisfying the open-ended lower bounds.
  3. A selected release has been compromised, maliciously modified, or introduces unsafe behavior.
  4. Package installation hooks or later imports execute the affected package code.
  5. That code runs with the permissions of the user performing installation or running the Skill.

Impact Assessment

A compromised dependency could access camera data, model files, environment variables, user-writable files, and network resources available to the process. If installation is performed as an administrator, th ...[truncated 171 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin every direct and transitive dependency to an exact reviewed version.
  • Generate and commit a lockfile for each supported Python and platform combination.
  • Require package hashes, for example through pip-compile --generate-hashes and pip install --require-hashes.
  • Install dependencies in a dedicated virtual environment rather than the system Python environment.
  • Add automated dependency vulnerability and provenance scanning.
  • Review version updates before regenerating the lockfile.
  • Avoid privileged package installation and document that users must not run pip with administrator or root privileges.
  • Prefer trusted package indexes and explicitly configure the allowed index rather than inheriting an untrusted index configuration.

T08 · Insecure Dependencies

Warning
Location
scripts/download_models.sh:29
Finding

Dynamically Downloaded Model Artifacts Are Not Pinned or Integrity-Verified

Content
View full analysis

Vulnerability Details

File Location: scripts/download_models.sh, lines 29-65; scripts/yolo_depth_distance.py, lines 152-164
Vulnerability Type: Unverified external model supply chain
Risk Level: Medium

Vulnerable Code

bash
MODELS=(
    "yolo26s.pt"
    "yolo26s-seg.pt"
    "yolo26s-pose.pt"
    "yolo26s-obb.pt"
    "yolo26s-cls.pt"
)

echo "Starting YOLO model downloads..."
echo ""

# Download each model using Python/ultralytics
for model in "${MODELS[@]}"; do
    target="${MODELS_DIR}/${model}"

    if [ -f "${target}" ]; then
        echo "  [SKIP] ${model} already exists"
        continue
    fi

    echo "  [DOWNLOAD] ${model}..."

    python3 -c "
from ultralytics import YOLO
import sys
try:
    model = YOLO('${model}')
    print('    [OK] Downloaded: ${model}')
except Exception as e:
    print(f'    [ERROR] Failed: {e}', file=sys.stderr)
    sys.exit(1)
" || {
        echo "  [ERROR] Failed to download ${model}"
        continue
    }

The depth model is also dynamically retrieved:

python
parser.add_argument("--depth-model", default="depth-anything/DA3Metric-Large",
                    help="Depth model (default: depth-anything/DA3Metric-Large)")

# ...

depth_model = DepthAnything3.from_pretrained(args.depth_model)
device = torch.device(args.device if torch.cuda.is_available() else "cpu")
depth_model = depth_model.to(device=device)

Technical Analysis

YOLO models are resolved and downloaded by filename through Ultralytics. The depth model is retrieved from a user-selectable Hugging Face repository identifier. Neither mechanism pins an immutable artifact revision nor validates the resulting file against a project-maintained cryptographic hash.

As a result, the effective model artifact can change after the Skill has been reviewed. Model loading also occurs inside the application's Python process. Depending on the seri ...[truncated 1525 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin Hugging Face models to immutable commit revisions rather than mutable repository defaults.
  • Publish expected SHA-256 hashes for every supported YOLO and depth model artifact.
  • Verify each download before moving it into the shared model cache or loading it.
  • Reject an existing cached model when its digest does not match the approved value.
  • Restrict --depth-model to an allowlist of reviewed repositories and revisions, or require an explicit opt-in for arbitrary repositories.
  • Prefer serialization formats designed to avoid executable object deserialization, where supported.
  • Document trusted download domains and avoid recommending unverified third-party mirrors.
  • Store provenance metadata alongside each cached model, including source URL, revision, digest, and verification date.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
references/deployment.md:151
Finding

Deployment Guidance Grants All Local Users Access to the Webcam Device

Content
View full analysis

Vulnerability Details

File Location: references/deployment.md, lines 151-160
Vulnerability Type: Excessive device permissions
Risk Level: High

Vulnerable Code

bash
ls -la /dev/video*
# If permissions are insufficient:
sudo chmod 666 /dev/video0
# Or add the user to the video group:
sudo usermod -a -G video $USER

Technical Analysis

Applying mode 0666 to /dev/video0 grants read and write access to the device for the owner, group, and every other local user. This violates least privilege and bypasses the operating system's intended group-based camera access control.

The command is presented as a troubleshooting solution and uses sudo, making it likely to be executed with sufficient privileges to weaken the device permissions. Although device managers may reset permissions after reconnection or reboot, the webcam remains globally accessible while the mode is active.

Attack Path

  1. A user encounters a webcam permission error.
  2. The user follows the deployment guide and runs sudo chmod 666 /dev/video0.
  3. The webcam device becomes readable and writable by every local account and process.
  4. A malicious or compromised process running under an unrelated local account opens /dev/video0.
  5. That process captures camera frames or interferes with legitimate camera access without belonging to the authorized camera-access group.

Impact Assessment

The instruction can expose live webcam data to unauthorized local users and processes, resulting in a significant privacy breach. It may also allow denial of service or device manipulation through concurrent access. The scope is local to the affected camera device and lasts for as long as the permissive mode remains effective.

Remediation
View remediation

Remediation Suggestions

  • Remove the sudo chmod 666 /dev/video0 recommendation entirely.
  • Use the operating system's dedicated video group:
    bash
    sudo usermod -aG video "$USER"
    
  • Require the user to log out and back in after changing group membership.
  • Where group membership is too broad, configure a least-privilege ACL for the specific account:
    bash
    sudo setfacl -m u:"$USER":rw /dev/video0
    
  • Prefer persistent udev rules or desktop session device authorization when appropriate, while limiting access to a dedicated group.
  • Advise users to inspect current ownership and permissions before making any changes.
  • Explicitly warn against world-readable or world-writable camera device permissions.
Vulnerability Patterns
  • 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
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (44)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documentation broadens behavior beyond the manifest by introducing object tracking and arbitrary local video-file processing, which expands the data-access surface from live webcam use to retrospective analysis of local media. Undeclared expansion of input sources and tracking capability can materially change privacy and surveillance risk, especially when outputs are saved to disk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation broadens behavior beyond the manifest by introducing object tracking and arbitrary local video-file processing, which expands the data-access surface from live webcam use to retrospective analysis of local media. Undeclared expansion of input sources and tracking capability can materially change privacy and surveillance risk, especially when outputs are saved to disk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The documentation broadens behavior beyond the manifest by introducing object tracking and arbitrary local video-file processing, which expands the data-access surface from live webcam use to retrospective analysis of local media. Undeclared expansion of input sources and tracking capability can materially change privacy and surveillance risk, especially when outputs are saved to disk.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The specific parameter choice chmod 666 is dangerous because it over-broadens permissions on a camera device beyond what is necessary for operation. In the context of a webcam skill, this is more dangerous than a generic permission issue because it directly affects a privacy-sensitive sensor and can enable unauthorized local access.

Content

Scanner excerpt · references/deployment.md (reported line 185)May include surrounding context.

bash
ls -la /dev/video*
# 如果权限不够:
sudo chmod 666 /dev/video0
# 或将用户加入 video 组:
sudo usermod -a -G video $USER

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
75% confidence
Finding

The skill documents access to environment-controlled paths and behavior via variables such as OPENCLAW_WORKSPACE, YOLO_MODEL_PATH, and HF_ENDPOINT, but it does not declare any explicit tool scope or permissions. This weakens reviewability and can let the skill operate with broader ambient authority than users expect, especially when combined with camera access, file writes, and network-backed model downloads.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The description frames the skill as webcam YOLO/depth detection, but the body also supports analysis of arbitrary local video files and export of annotated videos. That materially changes what user data can be ingested and persisted, creating a disclosure and consent problem if users rely on the shorter description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill is designed to access a local camera and save captured or annotated images, yet the documentation lacks a prominent privacy warning and retention notice. In a camera-processing context, omission of consent and storage disclosure is significant because it can lead to silent collection of sensitive visual data and persistent local artifacts.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest description omits object tracking even though the documentation adds persistent ID assignment and trajectory visualization. Tracking is more privacy-sensitive than basic frame-by-frame detection because it enables following subjects across time and generating richer surveillance artifacts.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

bash
# YOLO26s(下载后移动到模块缓存)
mkdir -p ~/.cache/huggingface/modules/camera-yolo-operator/
python3 -c "from ultralytics import YOLO; YOLO('yolo26s.pt')"
mv yolo26s.pt ~/.cache/huggingface/modules/camera-yolo-operator/

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 · SKILL.md (reported line 355)May include surrounding context.

md
**解决方案**:
- 关闭其他占用摄像头的应用(微信、QQ、Zoom 等)
- 尝试不同的 `--camera-index`
- Linux: 检查用户权限 `sudo usermod -a -G video $USER`

### HuggingFace 模型下载失败

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The deployment guide tells users to run webcam capture and detection tests, but it does not warn that these commands access the camera and may save images or derived outputs to disk. In a camera-processing skill, omission of consent, retention, and visibility guidance creates a real privacy risk because users may unknowingly capture sensitive scenes or people.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/deployment.md (reported line 75)May include surrounding context.

Step 1: 创建工作区目录

bash
mkdir -p ~/.openclaw/workspace/yolo
mkdir -p ~/.openclaw/workspace/projects/yolo/captures
mkdir -p ~/.openclaw/workspace/projects/yolo/detection
mkdir -p ~/.openclaw/workspace/projects/yolo/depth_distance

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

chmod 666 makes the camera device world-readable and writable, effectively removing meaningful access control from a sensitive hardware interface. On multi-user systems or systems running untrusted local code, this can enable unauthorized camera access or interference with the device.

Content

Scanner excerpt · references/deployment.md (reported line 185)May include surrounding context.

bash
ls -la /dev/video*
# 如果权限不够:
sudo chmod 666 /dev/video0
# 或将用户加入 video 组:
sudo usermod -a -G video $USER

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
99% confidence
Finding

chmod 666 makes the camera device world-readable and writable, effectively removing meaningful access control from a sensitive hardware interface. On multi-user systems or systems running untrusted local code, this can enable unauthorized camera access or interference with the device.

Content

Scanner excerpt · references/deployment.md (reported line 185)May include surrounding context.

bash
ls -la /dev/video*
# 如果权限不够:
sudo chmod 666 /dev/video0
# 或将用户加入 video 组:
sudo usermod -a -G video $USER

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
81% confidence
Finding

The instruction to run sudo usermod -a -G video $USER requires elevated privileges and changes local authorization for hardware access. While this is a common administrative setup step, it still expands persistent access to camera devices and should be presented as a privileged action with security implications.

Content

Scanner excerpt · references/deployment.md (reported line 187)May include surrounding context.

如果权限不够:

sudo chmod 666 /dev/video0

或将用户加入 video 组:

sudo usermod -a -G video $USER

text

### Q: GPU 未被使用

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring states this is a 'Pure webcam capture script - no AI models, just take pictures,' and the CLI description repeats 'No AI models - pure camera capture.' That directly conflicts with the skill's declared purpose of YOLO detection and depth estimation, indicating an intent/documentation divergence within the skill package.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest describes a skill for 'Webcam YOLO and depth detection', but the code in this file only opens a webcam, captures frames, and saves JPEG images. There is no model loading, object detection, depth inference, or related post-processing anywhere in the implementation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file contains user-facing text in Chinese, beginning with the descriptive header at L04 and continuing throughout the script output, but provides no option to select language or indication that the skill is intended only for Chinese-speaking users. This is a natural-language locale policy concern because the script imposes a specific language on users without opt-in.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script captures webcam frames and periodically saves annotated images to disk automatically, which can store sensitive visual data without an explicit consent prompt at runtime. In a camera-processing skill, silent persistence increases privacy risk because users may expect live analysis but not retained snapshots.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes webcam YOLO and depth detection with models cached in modules and outputs in projects, which reads as a local inference workflow. This code explicitly documents and invokes first-run model download behavior from HuggingFace, adding external network activity not stated in the manifest description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest explicitly states both YOLO target detection and DA3Metric depth estimation. In this file, the code loads only a YOLO model, runs object detection on webcam frames, and saves annotated images; there is no depth model loading, depth inference, or depth-related output anywhere in the implementation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says this skill is for webcam YOLO and depth detection, but this file is documented and implemented as a general-purpose object tracker that accepts either a camera or any video file and supports arbitrary YOLO class filtering. It also contains no depth-estimation logic at all, so the documented behavior of this skill file diverges from the stated skill purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This code file includes natural-language strings such as the title and CLI help text in Chinese, which effectively forces a specific language for users of the skill. The policy allows locale constraints only when the user is given a choice or the restriction is clearly documented and justified, neither of which is present here.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Beyond detection, the script initializes ByteTrack, records per-track histories, counts unique tracked objects, and reports longest-lived tracked identities. Those surveillance-style tracking and analytics capabilities go beyond straightforward object detection and depth estimation as stated in the manifest.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.