Back to skill

Security audit

Intelligent Public Smoking Detection Skill | 公共场所吸烟行为智能检测技能

Security checks for vulnerabilities and agentic risk

Overview

This cloud smoking detector needs review because it can send an API secret as account-registration data and upload footage despite an option promising no analysis.

Have the publisher fix credential handling and the ignored --export-env-only option before using sensitive footage. Confirm permission to upload media and review the provider’s retention terms. Do not rely on --api-url to redirect processing.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (21)

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

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

md
---
name: "smoking-detection-analysis"
description: "Automatically detects smoking behavior in target areas based on computer vision; supports real-time detection of video streams, images, and video files; identifies violation smoking behavior and triggers violation alerts, assisting in smoking control safety management for parks/communities/units. | 公共场所吸烟行为智能检测技能,基于计算机视觉自动检测目标区域内的吸烟行为,支持视频流、图片、视频文件实时检测,识别违规吸烟行为,触发违规预警,助力园区/社区/单位控烟安全管理"
version: "1.0.23"
license:

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, shell.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

The API-backed media-analysis workflow lacks an explicit privacy warning about remote processing of local images and videos.

Medium
Category
Output Handling
Confidence
92% confidence
Finding

The workflow accepts local images and videos without explicitly explaining that their contents leave the local environment for API processing. Surveillance footage may identify people or reveal private premises, making undisclosed remote processing a meaningful privacy risk despite cloud APIs being mentioned elsewhere.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to perform analysis, but supplying it still executes media analysis.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The parser accepts --export-env-only, but execution never checks the flag before performing analysis or listing reports. A caller supplying media alongside this purported non-analysis option can unintentionally trigger remote processing of sensitive footage.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · skills/smyx_analysis/scripts/skill.py (reported line 28)May include surrounding context.

python
result_json = JsonUtil.parse(result_json_pure_text, result_json_pure_text)

        result_json_common_ai_response = result_json.get("commonAiResponse") if isinstance(result_json,
                                                                                           dict) else result_json
        if result_json_common_ai_response:
            result_json = result_json_common_ai_response

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

Scanner excerpt · skills/smyx_analysis/scripts/skill.py (reported line 33)May include surrounding context.

python
result_json = result_json_common_ai_response

        result_json_health_ai_response = result_json.get("healthAiResponse") if isinstance(result_json,
                                                                                           dict) else result_json
        if result_json_health_ai_response:
            result_json = result_json_health_ai_response

Local file contents are passed to the analysis API without disclosure that the file will be uploaded.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The code reads the complete local media file and passes its bytes to the analysis API without a visible disclosure or authorization gate. This is legitimate analysis functionality, but undisclosed upload of identifiable surveillance footage creates a privacy boundary crossing.

Content

No source excerpt is available for this finding.

The --export-env-only option promises not to run analysis, but the code ignores it and executes the normal analysis path.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The --export-env-only flag promises not to run analysis but is ignored after parsing. When supplied with a media input, the program follows the normal analysis path, potentially uploading footage that the caller expected not to process.

Content

No source excerpt is available for this finding.

The skill includes persistent user-profile and credential management unrelated to its declared smoking-detection purpose.

Medium
Category
Excessive Agency
Confidence
88% confidence
Finding

L448-L465 define a system-user table containing personal information and authentication tokens, and L470-L473 expose it through the generic CRUD implementation. DAO initialization also creates and migrates this table (L180-L215), introducing account-database management beyond the stated video/image detection and violation-alerting scope.

Content

No source excerpt is available for this finding.

ai_chat documents an agent invocation and analysis result, but performs no invocation and always returns None.

Medium
Category
Excessive Agency
Confidence
100% confidence
Finding

The docstring at L26 explicitly says this method invokes the openclaw agent through subprocess, and L33-L34 promise an analysis result or session ID. However, the command and subprocess invocation are commented out (L48-L66); the replacement empty dictionary at L68 causes result.stderr at L70 to raise AttributeError, which L81-L82 catch without returning a result. This contradicts the method's documented analysis behavior rather than merely omitting an implementation detail.

Content

No source excerpt is available for this finding.

FileUtil.open silently truncates existing files without disclosing its destructive behavior.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

Opening a path in 'w' mode immediately erases any existing contents. The generically named helper provides no docstring, comment, confirmation, or action-specific log explaining that it overwrites files; exception reporting does not disclose successful truncation.

Content

No source excerpt is available for this finding.

Ordinary HTTP requests can silently register remote user accounts, using the API secret as an account identifier.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

When authentication tokens are missing, current__user_name preferentially becomes ApiEnum.API_SECRET_KEY and is passed to automatic login/registration as both openId and mobile. This repurposes a credential as account identity data, potentially exposing it through remote account records, identity logs, or returned user information; ordinary smoking-detection requests can trigger this unrelated side effect.

Content

No source excerpt is available for this finding.

The HTTP helper automatically sends an identity to a remote login/registration endpoint without disclosure.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The HTTP helper can silently submit an identity to a remote endpoint with registration enabled, and that identity can actually be the API secret. Remote authentication is not inherently inappropriate for a hosted detection service, but undisclosed account creation combined with credential-as-identity handling creates a concrete exposure risk; this overlaps the SDI-2 finding.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The POST transmits openId and mobile values that can originate directly from ApiEnum.API_SECRET_KEY, making this the network sink for the credential-exposure issue identified above. External requests alone are expected for a remote detection service, and the supplied file does not establish a malicious destination, but transmitting a secret as registration data can subject it to inappropriate storage and logging.

Content

Scanner excerpt · skills/smyx_common/scripts/util.py (reported line 561)May include surrounding context.

python
"source": ConstantEnum.DEFAULT__SKILL_HUB_NAME
            }
            try:
                _response = requests.post(_url, json=_data)
                if _response.status_code == 200:
                    _response_json = _response.json()
                    if _response_json and _response_json.get("success"):

Generic history-report phrases automatically activate the skill without requiring smoking-detection context.

Low
Category
Trigger Abuse
Confidence
94% confidence
Finding

Generic report-history requests can activate smoking-report retrieval even when the user intended another service. Because activation mandates a cloud request and report display, this can cause unintended network activity and disclosure of smoking-analysis history in an unrelated conversation.

Content

No source excerpt is available for this finding.

Configuration loading silently creates directories and files, including during module import, without disclosing the filesystem changes.

Low
Category
Output Handling
Confidence
90% confidence
Finding

When a configuration file is absent, YamlUtil.load creates its parent directory and writes a YAML file without a prompt, log, or explanatory comment/docstring. BaseEnum.init_subclass calls this loader during class creation (L052–L058), so merely importing the module can modify the filesystem without disclosure.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 243)May include surrounding context.

python
username = getattr(model, "username", None)
            if username:
                column_names = self.__model__.__table__.columns.keys()
                update_data = {key: getattr(model, key) for key in column_names if key != "username"}
                return self.update_by_username(username, **update_data)

            return None

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 353)May include surrounding context.

python
column_names = self.__model__.__table__.columns.keys()

            for key in column_names:
                value = getattr(model, key)
                setattr(instance, key, value)

            session.commit()

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 326)May include surrounding context.

python
if filters:
                for key, value in filters.items():
                    query = query.filter(getattr(self.__model__, key) == value)

            if offset:
                query = query.offset(offset)

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/dao.py (reported line 441)May include surrounding context.

python
if filters:
                for key, value in filters.items():
                    query = query.filter(getattr(self.__model__, key) == value)

            return query.scalar()
        finally:

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · skills/smyx_common/scripts/util.py (reported line 30)May include surrounding context.

python
elif isinstance(cur, dict):
                        cur = cur.get(part, default)
                    else:
                        cur = getattr(cur, part)
                return cur
            except Exception:
                return default