Back to skill

Security audit

天津安信华瑞

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent IoT development template, but it needs Review because deploying it unchanged can send identifiable device telemetry to preset services and accept remote OTA updates without visible safeguards.

Review before installing or deploying. Replace live default endpoints with your own approved HTTPS services, disable telemetry and OTA until explicitly provisioned, avoid sending raw IMSI/ICCID/IMEI unless required, require signed and allowlisted OTA updates, and back up device files before copying anything into /usr.

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 (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
template/src/data_reporter.py:45
Finding

Server Responses Can Trigger Unverified Remote Firmware Installation

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
template/config/config.py:24
Finding

Deployable Defaults Automatically Expose Device and Sensor Telemetry to Hardcoded External Services

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
template/src/main.py:294
Finding

Configured Reporting Interval Is Ignored, Causing More Frequent Telemetry Transmission

Content
View full analysis
>> Starting data collection cycle [{}:{}:{}] <<<".format( now_time[3], now_time[4], now_time[5])) sensor_stat, sensor_dens, sys_stat = modbus_task( modbus, sensor_mgr, sys_mgr, led_modbus ) sys_mgr.feed_dog() success = report_task( net_mgr, reporter, sys_mgr, sensor_stat, sensor_dens, sys_stat ) if success: g_last_report_minute = now_minute ``` ### Technical Analysis `REPORT_INTERVAL_SEC` is imported and printed but is not used in the scheduling condition. A report is initiated whenever the minute field differs from `g_last_report_minute`. Consequently, the effective reporting interval is approximately one minute regardless of a longer configured value. This conflicts with the documented ability to configure reporting frequency. Because each report contains persistent identifiers, cellular metadata, sensor readings, and system state, the scheduling defect increases the volume and frequency of sensitive data disclosure. The unused `now_ts` variable indicates that elapsed-time sched ...[truncated 1160 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
template/docs/快速部署.md:54
Finding

Deployment Helper Interpolates Unescaped Source Text into Executable Device Commands

Content
View full analysis
Remediation
View remediation
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (39)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The sensor-reporting payload includes persistent device and subscriber identifiers such as IMEI and IMSI and transmits them to a remote endpoint with no visible consent, minimization, or privacy controls. These identifiers can enable device tracking, subscriber correlation, and inventory targeting, and the risk is amplified here because the module also performs OTA-related network operations and appears intended for unattended embedded deployment.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The boot/OTA check sends IMEI and IMSI during startup, exposing unique hardware and subscriber identifiers whenever the device comes online. In this context, the danger is higher because the same module can trigger OTA updates based on server responses, so identifier leakage can support device fingerprinting, targeting, and profiling of a fleet of remotely updateable devices.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README states that the skill will automatically copy a template into the workspace and later send sensor, device, and system data to configurable remote endpoints, including OTA servers, without any explicit consent, warning, or confirmation step. In an agent-driven workflow, this can cause unintended file modifications and outbound data transmission, which is risky because users may invoke the skill without realizing it performs side effects beyond code generation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly advertises cloud data reporting and OTA remote firmware upgrade, both of which can expose device telemetry and enable high-impact system changes, yet it provides no warning about privacy, integrity, or operational risks. In an IoT deployment context, users may deploy this template directly without understanding that misconfigured endpoints or insecure OTA practices could leak data or allow unauthorized firmware replacement.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

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

python
# config/config.py
URL_REPORT = "https://api.mycompany.com/iot/data"
URL_OTA = "https://ota.mycompany.com/firmware"

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The testing instructions include code that performs a real network POST to a configured remote URL, but the document does not warn that running the example will transmit live data from the device over the network. In an embedded/IoT environment, such examples can unintentionally exfiltrate identifiers or trigger production-side behavior if users test against real endpoints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file states that the device performs cloud data reporting, 4G transmission, and OTA remote upgrades, which can affect privacy and system integrity. The documentation does not include any caution, disclosure, or user warning about transmitted device data, network usage, or the risks of remote firmware changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The sample reported data structure includes persistent device-identifying fields such as unit_code and IMEI. Because this README documents outbound reporting of identifiable device data without any privacy notice or handling warning, it omits user-facing disclosure relevant to privacy-sensitive behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The document instructs users to copy and overwrite multiple files into the device's /usr directory as a normal deployment path, but it does not warn that existing code may be replaced or that rollback/backup should happen first. On embedded devices, overwriting runtime modules can easily break startup behavior, erase working configurations, or leave the device in a nonfunctional state if the new files are incomplete or incompatible.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The batch upload script programmatically writes directly to /usr/{filename} on the device with no confirmation, backup, integrity check, or dry-run mode. This makes accidental destructive overwrites more likely and, because the script streams source lines directly into device-side file writes, a malformed file or interrupted transfer could leave core modules partially replaced and the device unstable.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The debugging guide encourages printing sensitive device and network identifiers such as IMEI, ICCID, cell ID, and full report data without warning about redaction or access controls. These values can enable device tracking, inventory correlation, or leakage of operational telemetry when logs are shared, collected centrally, or exposed to unauthorized personnel.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The HTTP debugging example sends test data to a real external endpoint and does not warn that debugging activity will transmit data off-device. Even when the sample body is synthetic, developers may adapt the example with real identifiers or telemetry, causing unintended disclosure to third-party services during testing.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The remote debugging example documents a platform-issued command path that can restart the device, which is a high-impact control action affecting availability. In a debugging guide, presenting this capability without any authentication, authorization, rate limiting, or operational safeguards normalizes a dangerous remote control pattern that could be abused if the command channel is exposed or spoofed.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The remote debugging section shows a platform command causing device restart but does not warn about the availability impact or the trust assumptions of the command source. In context, this is more dangerous because the document frames it as a normal debugging technique, which may lead implementers to expose a remote control path without sufficient safeguards.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The troubleshooting section includes an example that deletes a file from /usr without warning users about the risk of removing required application or system files. In a constrained embedded device environment, users may copy this command directly and cause loss of functionality or make recovery difficult.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The deployment guide states that the device will automatically download OTA updates and reboot, but it provides no warning about operational risk, update trust requirements, rollback planning, or the possibility of service interruption. In an embedded/IoT context, undocumented auto-update behavior can lead operators to deploy unsafe update flows or accept unexpected firmware changes without validating authenticity and maintenance impact.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation instructs users to configure OTA and data reporting endpoints but does not warn about the security and privacy implications of sending sensor/device data to external servers or downloading firmware from remote infrastructure. In an IoT/industrial context, unsafe endpoint configuration can enable data exfiltration, fleet compromise through malicious OTA servers, or deployment to untrusted third-party services.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This file contains user-facing natural-language content such as the module docstring, class docstring, and parameter descriptions exclusively in Chinese. The policy allows locale-specific behavior only when the skill offers language choice or clearly documents a justified regional constraint, neither of which is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The module docstring and all runtime console messages are written in Chinese, indicating the skill is designed to operate in a fixed language. The policy allows locale constraints only when they are explicitly offered as a choice or clearly documented and justified; this file does not provide user opt-in or explain a required locale restriction.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module collects persistent device and subscriber identifiers (IMEI, IMSI, ICCID) while its stated purpose is network connectivity, signal retrieval, and time synchronization. These identifiers are highly sensitive and enable device/subscriber tracking; collecting them without clear necessity or minimization increases privacy and abuse risk if later logged, transmitted, or exposed to other components.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code gathers sensitive device and subscriber identifiers without any disclosure, consent mechanism, or visible indication to callers/users. In an agent skill context, silent collection is more dangerous because downstream components may exfiltrate or repurpose the identifiers, and users would have no reason to expect this from a network status helper.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

This code file contains natural-language documentation entirely in Chinese, including the module description and method/class docstrings, with no indication that the language is optional or that the skill is intentionally restricted to a Chinese-speaking context. Under the policy for natural-language violations, forcing a specific language without user opt-in is in scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file describes behavior that affects user data and files: the skill will automatically copy a template into the workspace. There is no accompanying warning, confirmation note, or disclosure about what files will be created or overwritten, which fits the missing user warning criteria for markdown files.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Uploading files into /usr and executing main.main() can alter device state and system behavior, yet the document does not warn users about deployment impact, backup needs, or testing on a non-production device first. For markdown guidance, this is a user-warning omission for actions that could affect system integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The guide encourages configuring arbitrary reporting and OTA URLs and shows reporting payloads that include identifiers such as IMEI and sensor data, but it provides no warning about sensitive data transmission, endpoint trust, or transport/security validation. In an IoT context, this can lead to privacy leakage, data exfiltration to untrusted servers, or insecure update paths if users supply unsafe endpoints.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.