Back to skill

Security audit

vispatrol-picture

Security checks for vulnerabilities and agentic risk

Overview

This VisPatrol snapshot skill has a coherent purpose, but it needs Review because the script can use a local session token to capture cameras, persist images, expose device secrets, and make authenticated service changes beyond the read-only framing.

Install only after reviewing the code and accepting that this skill can access local VisPatrol session material, query camera inventory, capture images, write them to disk, and possibly leave media-service resources or expose device credentials in logs/output. Prefer requiring a named device, adding hard approval flags, redacting secrets, pinning dependencies, and confirming cleanup/retention behavior before production use.

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)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/picture_capture.py:1331
Finding

Credential Access and All-Device Capture Are Not Enforced by Runtime Authorization Checks

Content
View full analysis
Dict[str, Any]: """执行完整的查询流程(加载配置→设备筛选→抓拍下载→整理结果)""" result = { "success": False, "message": "", "config_result": None, "device_status_result": None, "query_result": None } config_result = self._load_runtime_config_from_vpup(force_reload=True) result["config_result"] = config_result if not config_result["success"]: result["message"] = f"初始化失败: {config_result['message']}" return result device_status_result = self.query_device_status_list(force_refresh=True) result["device_status_result"] = device_status_result if not device_status_result.get("success"): result["message"] = f"获取设备状态失败: {device_status_result.get('message', '未知错误')}" return result devices = device_status_result.get("data", []) if not isinstance(devices, list): devices = [] filtered_devices = [ device for device in devices if isinstance(device, dict) and self._device_name_matches( device.get("device_name") or device.get("name"), device_name, ) ] ``` The device-name matcher treats an absent name as matching every device: ```python @staticmethod def _device_name_matches(device_name: Any, expected_name: Optional[str]) -> bool: """按设备名称过滤,支持忽略大小写的包含匹配。""" expected_text = str(expected_name or "").strip() if not expected_text: return True device_text = str(device_name or "").strip() if not device_text: return False normalized_expected = expected_text.casefold() normalized_device = device_text.casefold() return ( normalized_device ...[truncated 2334 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/picture_capture.py:1683
Finding

Purported Read-Only Workflow Performs Authenticated Persistent State Changes

Content
View full analysis
Dict[str, Any]: """添加媒体流信息。""" runtime_config_result = self._ensure_runtime_config() if not runtime_config_result.get("success"): raise ValueError(runtime_config_result.get("message", "运行配置加载失败")) stream_name = f"{device_id}_{channel}_{stream_number}" data = { "vhost": "__defaultVhost__", "app": "vis", "stream": stream_name, "url": stream_url, "rtp_type": rtp_type, "persistent": persistent, } result = self._make_json_api_request( "POST", "/api/mediasvc/v1/mediastreams", data=data, ) ``` Snapshot-task creation is also an authenticated `POST` operation: ```python def create_snapshot_task( self, device_id: str, channel: int = 0, stream_number: int = 0, code: Optional[str] = None, ) -> Dict[str, Any]: """创建联动截图任务。""" runtime_config_result = self._ensure_runt ...[truncated 2561 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/picture_capture.py:607
Finding

Raw Device Responses May Disclose Credentials and Internal Camera Metadata

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:65
Finding

Third-Party Dependencies Are Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The documented behavior claims user-approved, read-only querying, but the finding indicates the actual implementation automatically reads vpup.json, decrypts and uses a local session token via MAC-derived material, invokes POST APIs that create media streams/snapshot tasks, writes downloaded images to disk, and may expose device usernames/passwords in output. This mismatch is dangerous because operators may grant approval under a much narrower trust model than the code actually exercises, enabling unintended credential use, system state changes, sensitive data disclosure, and broader host data access.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 该 token 只允许用于 scripts/picture_capture.py 已实现的只读设备状态查询与抓拍读取;禁止将其用于登录、账号管理、设备控制、配置修改或其他无关接口。

Scope Creep

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code writes captured images to ~/.openclaw/workspace/tmp_files/ or another output directory even though the declared permission only mentions reading %TEMP%/vpup.json. This creates undeclared local data persistence of potentially sensitive surveillance images, increasing exposure through later filesystem access, backup, or exfiltration by other processes.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The manifest describes a read-only query after approved access to %TEMP%/vpup.json, but the code performs active operations: creating media streams, triggering snapshot tasks, downloading surveillance images, and storing them locally. This permission and behavior mismatch is dangerous because users and orchestrators may authorize the skill under a much narrower trust model than the code actually requires.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The formatting functions expose device usernames, passwords, and RTSP URLs in output, which exceeds the stated purpose of snapshot querying and directly reveals operational secrets. Anyone with access to the skill output could reuse those credentials or endpoints to access surveillance streams or pivot into the monitoring environment.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill declares powerful capabilities including shell, file read/write, network, and environment access, but provides no explicit tool-scoping controls such as permissions or allowed-tools. That creates an authorization gap where a user-invocable skill can perform sensitive local and network actions beyond what a reviewer or runtime policy can easily constrain.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/picture_capture.py (reported line 123)May include surrounding context.

python
for command in commands:
        try:
            completed = subprocess.run(
                command,
                capture_output=True,
                text=True,

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill retrieves the host MAC address and derives a decryption key from it, which is a form of host fingerprinting beyond the manifest's stated scope of reading a temp JSON file for snapshot queries. Even if used for token decryption, collecting persistent hardware identifiers increases privacy risk and couples operation to undisclosed system-identification behavior.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · scripts/picture_capture.py (reported line 209)May include surrounding context.

python
return None

    try:
        completed = subprocess.run(
            ["getmac", "/fo", "csv", "/nh"],
            capture_output=True,
            text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code saves surveillance snapshots to local disk automatically, without an explicit confirmation step or clear notice that sensitive images will persist after the query. In this skill context, silent persistence is risky because captured images may contain private people, locations, or events and can be recovered later from the filesystem.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The script presents sensitive RTSP endpoints and credential-bearing device details to the user without warning, redaction, or confirmation. In the context of a surveillance skill, this materially increases the chance of accidental credential disclosure via logs, transcripts, screenshots, or downstream tool output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The top-level natural-language description and user-facing CLI/help strings are written only in Chinese, effectively forcing a specific language without any opt-in or documented locale scope. Under the policy, locale or language constraints should either be optional for users or clearly justified as region-specific.

Content

No source excerpt is available for this finding.