Back to skill

Security audit

Unihiker K10 Micropython

Security checks for vulnerabilities and agentic risk

Overview

The skill fits K10 MicroPython development, but its setup script can run live downloaded installer code and install tools system-wide.

Review scripts/setup.sh before running it. The main issue is host setup: it can execute a live remote installer, install unpinned packages, alter Arduino configuration, and possibly request sudo for a system-wide binary. Use a sandbox, pin and verify dependencies, prefer user-local installation, and be careful with examples that record audio, use face recognition, send HID keystrokes, or contain sample WiFi/MQTT credentials.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/setup.sh:57
Finding

Mutable Remote Installer Is Executed Directly Through a Shell Pipeline

Content
View full analysis
/dev/null || sudo mv bin/arduino-cli /usr/local/bin/ rm -rf bin/ ;; macos) if command -v brew >/dev/null 2>&1; then brew install arduino-cli else curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh sudo mv bin/arduino-cli /usr/local/bin/ rm -rf bin/ fi ;; ``` ### Technical Analysis The setup script retrieves the Arduino CLI installer from the mutable `master` branch and pipes the response directly into `sh`. The downloaded content is neither staged for review nor validated using a pinned digest or cryptographic signature. Although the URL is under Arduino's GitHub organization and is plausibly an official source, HTTPS only protects the transport connection. It does not ensure that the content of the mutable branch remains identical to the version reviewed during this audit. Compromise of the upstream repository, maintainer account, release process, or delivery infrastructure could change the effective payload without requiring any modification to this Skill. The shell executes the response with all permissions of the user running setup. The resulting executable may subsequently be copied to `/usr/local/bin` using `sudo`, increasing the security significance of a compromised download. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, or another part of the remote delivery chain. 2. The attacker modifies `install.sh` on the referenced `master` branch. 3. A user runs `scripts/s ...[truncated 982 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
scripts/setup.sh:145
Finding

Unpinned Python Packages Are Installed into an Ambiguous Active Environment

Content
View full analysis
/dev/null 2>&1; then pip3 install mpremote || pip install mpremote log_success "mpremote installed" else log_info "mpremote already installed" fi # Install ampy (alternative) if ! command -v ampy >/dev/null 2>&1; then pip3 install adafruit-ampy || pip install adafruit-ampy log_success "ampy installed" else log_info "ampy already installed" fi } ``` ### Technical Analysis The setup installs the latest available versions of `mpremote` and `adafruit-ampy` without version constraints, hashes, signatures, or a lock file. The packages are obtained from whichever package index is configured for the selected `pip` command. The fallback from `pip3` to `pip` is also ambiguous. The two commands may refer to different Python installations or package indexes. Installation may consequently modify a global interpreter, a user environment, or an unrelated virtual environment. These package names are consistent with the declared device-upload functionality, and the audit found no evidence that they were deliberately typosquatted. The risk arises from unrestricted future dependency resolution and package-source trust rather than from a confirmed malicious package version. ### Attack Path 1. An attacker compromises a package release, a maintainer account, the configured package index, or an internal package mirror. 2. The compromised version becomes the latest version resolved by `pip`. 3. A user runs `scripts/setup.sh`. 4. The script installs the package without checking an approved version or hash. 5. Malicious package installation logic or installed cod ...[truncated 621 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
scripts/setup.sh:57
Finding

MicroPython Setup Can Perform Unnecessary System-Wide Arduino CLI Installation

Content
View full analysis
/dev/null || sudo mv bin/arduino-cli /usr/local/bin/ rm -rf bin/ ;; macos) if command -v brew >/dev/null 2>&1; then brew install arduino-cli else curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh sudo mv bin/arduino-cli /usr/local/bin/ rm -rf bin/ fi ;; ``` The same setup also configures Arduino and installs an Arduino board core and libraries: ```bash arduino-cli core update-index if arduino-cli core install "$K10_CORE"; then log_success "Installed core: $K10_CORE" fi local libs=("SD" "WiFi" "ArduinoJson") for lib in "${libs[@]}"; do arduino-cli lib install "$lib" 2>/dev/null || true done ``` ### Technical Analysis The Skill is declared as a MicroPython toolkit, and its primary documented operations are MicroPython firmware flashing, file upload, serial-port detection, and API lookup. Those operations require tools such as `esptool` and `mpremote`; they do not inherently require an Arduino compiler, Arduino board core, or Arduino libraries. Nevertheless, the default setup installs and configures the Arduino toolchain. On Linux, failure to move the binary into `${HOME}/.local/bin/` automatically falls back to `sudo`. On macOS without Homebrew, `sudo` is used unconditionally for the final move. This expands the setup from a user-local MicroPython environment to a system-wide executable installation. The behavior is not hidden, but it exceeds the minimum privileges and dependency scope necessary f ...[truncated 1257 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:61
Finding

Documentation Recommends a Persistent User-Wide PowerShell Policy Relaxation

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The face recognition example supports biometric capture, enrollment, and recognition via button presses without any warning about privacy, consent, retention, or sensitive handling of biometric data. Biometric data is especially sensitive, and example code that normalizes collection/enrollment without safeguards can facilitate invasive or noncompliant deployments.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Piping downloaded content directly into sh is a classic dangerous chaining pattern because it removes opportunities to inspect, verify, or constrain the fetched code before execution. In this skill, the command runs during setup and can modify the developer environment, install binaries, and potentially lead to persistent compromise.

Content

Scanner excerpt · scripts/setup.sh (reported line 63)May include surrounding context.

sh
case $OS in
        linux)
            # Download and install
            curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
            mv bin/arduino-cli "${HOME}/.local/bin/" 2>/dev/null || sudo mv bin/arduino-cli /usr/local/bin/
            rm -rf bin/
            ;;

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · scripts/setup.sh (reported line 64)May include surrounding context.

sh
linux)
            # Download and install
            curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
            mv bin/arduino-cli "${HOME}/.local/bin/" 2>/dev/null || sudo mv bin/arduino-cli /usr/local/bin/
            rm -rf bin/
            ;;
        macos)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/setup.sh (reported line 65)May include surrounding context.

sh
# Download and install
            curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
            mv bin/arduino-cli "${HOME}/.local/bin/" 2>/dev/null || sudo mv bin/arduino-cli /usr/local/bin/
            rm -rf bin/
            ;;
        macos)
            if command -v brew >/dev/null 2>&1; then

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/setup.sh (reported line 73)May include surrounding context.

sh
# Download and install
            curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
            mv bin/arduino-cli "${HOME}/.local/bin/" 2>/dev/null || sudo mv bin/arduino-cli /usr/local/bin/
            rm -rf bin/
            ;;
        macos)
            if command -v brew >/dev/null 2>&1; then

Chaining Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The same curl-to-sh chaining pattern appears in the macOS fallback path and presents the same arbitrary code execution and supply-chain risks. Since this is an environment bootstrap script, a successful exploit could tamper with toolchains and future firmware uploads.

Content

Scanner excerpt · scripts/setup.sh (reported line 71)May include surrounding context.

sh
if command -v brew >/dev/null 2>&1; then
                brew install arduino-cli
            else
                curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
                sudo mv bin/arduino-cli /usr/local/bin/
                rm -rf bin/
            fi

Undeclared Tool Scope

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.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file contains user-facing operational guidance in Chinese within an otherwise English skill description, which effectively imposes a locale/language requirement on some users. The skill does not state that Chinese is optional or provide equivalent English guidance for those sections.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The '开发经验教训' section and its step-by-step guidance are presented only in Chinese, while the rest of the file is largely English. Because the skill does not offer a language choice or mark the skill as Chinese-language, this is a natural-language policy issue.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The microphone examples actively record audio to local or TF storage without any user-facing notice, consent prompt, or guidance about handling captured audio. In an agent skill context, this can normalize silent audio capture and make downstream misuse easier, even if the document itself is only reference material.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The WiFi/MQTT examples include hardcoded SSID, password, broker address, and MQTT credentials, and do not warn that network operations transmit data over external networks. This encourages insecure copy-paste behavior and may lead users to expose credentials or send data to unintended systems.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The Bluetooth HID example can send keystrokes, including shortcut combinations, to a paired device but does not warn that it performs input injection. In a skill for programming hardware, this increases risk because users may deploy code that unexpectedly controls another device or triggers unintended actions.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This section requires the Chinese firmware variant and presents a Chinese wake phrase (请说‘你好,小鑫’唤醒) with fixed command phrases, without offering a user language choice. That is a locale/language policy concern because the skill behavior is tied to a specific language without opt-in beyond an implementation limitation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script downloads a remote installer from GitHub and immediately pipes it to sh without any integrity verification, pinning, or user confirmation. In a setup script for a developer toolchain, this creates a supply-chain execution path where a compromised upstream script, MITM on a trusted root store, or repository takeover could result in arbitrary code execution on the user's machine.

Content

No source excerpt is available for this finding.

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 · scripts/setup.sh (reported line 64)May include surrounding context.

sh
linux)
            # Download and install
            curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
            mv bin/arduino-cli "${HOME}/.local/bin/" 2>/dev/null || sudo mv bin/arduino-cli /usr/local/bin/
            rm -rf bin/
            ;;
        macos)

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 · scripts/setup.sh (reported line 72)May include surrounding context.

sh
linux)
            # Download and install
            curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
            mv bin/arduino-cli "${HOME}/.local/bin/" 2>/dev/null || sudo mv bin/arduino-cli /usr/local/bin/
            rm -rf bin/
            ;;
        macos)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The script performs binary installation and may move files into privileged locations via sudo, but by default suppresses most informational output unless --show is passed. Users invoking the setup may therefore trigger system modifications without prominent disclosure of what will be installed or that elevated privileges may be requested.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

A substantial instructional section about screen refresh behavior is written entirely in Chinese, which can prevent some users from understanding important usage constraints. The file does not provide a language selection mechanism or clear notice that parts of the skill are Chinese-only.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
96% confidence
Finding

Fetching an external script and piping it directly to the shell executes code that is not reviewed, pinned, or verified at runtime. In a hardware-development setup context, users may routinely trust such scripts, increasing the likelihood of successful supply-chain compromise affecting their workstation.

Content

Scanner excerpt · scripts/setup.sh (reported line 63)May include surrounding context.

sh
case $OS in
        linux)
            # Download and install
            curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
            mv bin/arduino-cli "${HOME}/.local/bin/" 2>/dev/null || sudo mv bin/arduino-cli /usr/local/bin/
            rm -rf bin/
            ;;

External Script Fetching

Low
Category
Supply Chain
Confidence
96% confidence
Finding

This macOS branch repeats the same unsafe remote-script execution pattern, creating arbitrary code execution risk during environment setup. Because this is part of a developer skill, compromise could persist by modifying PATH-resident tooling or subsequent build/upload workflows.

Content

Scanner excerpt · scripts/setup.sh (reported line 71)May include surrounding context.

sh
if command -v brew >/dev/null 2>&1; then
                brew install arduino-cli
            else
                curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sh
                sudo mv bin/arduino-cli /usr/local/bin/
                rm -rf bin/
            fi

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

The script installs Python packages with pip/pip3 automatically and only emits visible status when --show is enabled. While common in setup scripts, silent package installation can surprise users and expands the supply-chain trust boundary to PyPI without explicit disclosure.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.