Back to skill

Security audit

Unihiker K10 Arduino

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent K10 Arduino helper, but its setup and flashing scripts use unsafe installation and device-targeting shortcuts that deserve review before use.

Review the setup scripts before running them. Prefer installing arduino-cli from a pinned release or trusted package manager, avoid running setup with elevated privileges, specify the serial port and OTA IP yourself, use only offline bundles from a trusted source, and treat the audio, camera, and face-recognition examples as privacy-sensitive.

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

T03 · Remote Payload Retrieval and Execution

Error
Location
scripts/setup.sh:56
Finding

Execution of an Unpinned Remote Installation Script

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 downloads the Arduino CLI installer from the mutable `master` branch and pipes it directly into a shell. Although the URL belongs to Arduino's official GitHub organization, its contents are not pinned to a reviewed commit or release. The script is executed without prior inspection, checksum verification, or signature validation. This creates a time-of-check/time-of-use supply-chain boundary: the effective code executed during installation can differ from the code reviewed in this project. The resulting executable may also be moved into `/usr/local/bin` with `sudo`, increasing the consequences of a compromised payload. Installing Arduino CLI is necessary for the declared functionality, but executing mutable network content directly is not the minimum-risk method required to accomplish that task. ### Attack Path 1. An attacker compromises the upstream repository, a maintainer account, the release workflow, or another part of the delivery chain. 2. The attacker modifies `master/install.sh ...[truncated 902 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Error
Location
scripts/setup.sh:136
Finding

Unpinned and Over-Broad Third-Party Dependency Installation

Content
View full analysis
/dev/null || true done log_success "Libraries installed" } # Install MicroPython tools install_micropython_tools() { log_info "Installing MicroPython tools..." # Install mpremote (official tool) if ! command -v mpremote >/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" ``` ### Technical Analysis The setup process installs Arduino libraries and Python packages without version constraints, lock files, hash validation, or a controlled package index. Consequently, each setup run can resolve different package contents from those originally reviewed. The Skill is declared primarily as an Arduino/C++ toolkit. Automatically installing both `mpremote` and `adafruit-ampy` broadens the dependency and execution surface beyond what is necessary for Arduino compilation and upload. Python package installation can execute package-controlled build hooks or installation logic under the invoking user's account. Errors are also suppressed for Arduino library installation, which can conceal partial or inconsistent dependency state. ### Attack Path 1. An attacker compromises a package release, maintainer account, registry account, or dependency of one of the requested packages. 2. The compromised package is published as the latest matching version. 3. A user runs `script ...[truncated 731 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/install-offline-bundle.sh:29
Finding

Unvalidated Archive Extraction into the Arduino Data Directory

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/compile-ota.sh:109
Finding

Firmware Uploaded over Plaintext, Unauthenticated HTTP OTA

Content
View full analysis
&1) || { ``` Equivalent PowerShell path: ```powershell try { $response = Invoke-WebRequest ` -Uri "http://$Ip/ota" ` -Method POST ` -InFile $binFile ` -ContentType "application/octet-stream" ` -TimeoutSec 60 ``` ### Technical Analysis Both OTA implementations transmit compiled firmware over plaintext HTTP. No server authentication, client authentication, authorization token, cryptographic firmware signature, or transport integrity protection is visible. Uploading firmware is necessary for the advertised OTA function, but plaintext unauthenticated delivery does not adequately protect firmware integrity or establish that the destination is the intended K10 device. Accepting a user-supplied destination also permits accidental transmission to an unintended HTTP service. ### Attack Path 1. The user and K10 board communicate over an untrusted or compromised local network. 2. An attacker obtains a network interception or redirection position through a rogue access point, ARP spoofing, DNS manipulation where applicable, or address reassignment. 3. The user runs the OTA compile script with the expected device address. 4. The attacker observes, redirects, or modifies the plaintext HTTP request. 5. Firmware contents are disclosed or altered, or the upload is delivered to an attacker-controlled endpoint. 6. If the device does not independently verify a cryptographic firmware signature, modified firmware may be installed. ### Impact Assessment An attacker may obtain p ...[truncated 366 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload_k10.py:81
Finding

Automatic Fallback Can Flash an Unverified Serial Device

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
Findings (26)

Chaining Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

Using a pipeline to send curl output directly to sh is a classic dangerous chaining pattern because it removes any inspection barrier between network input and code execution. In the context of a setup skill, this materially increases the chance of silent arbitrary command execution from a compromised source.

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

This is the same unsafe network-to-shell chaining pattern in the macOS fallback path. It is dangerous because any compromise of the fetched script or delivery path immediately becomes arbitrary code execution on the host.

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
94% confidence
Finding

The skill instructs use of shell commands, environment-variable changes, and local file/script access, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization gap where an agent may execute impactful local operations without a clear least-privilege boundary, increasing the chance of unsafe command execution or file modification.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
80% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

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

C:\K10A\upload-sketch.bat "C:\path\to\SketchFolder" COM3

text

If the short-path installer is present, do not ask the user to download BSP/toolchains again unless required files are missing.

### Windows 快速安装 (推荐)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file contains substantial operational instructions in Chinese, including installation and usage guidance, while other parts are in English. Because the skill does not state a required locale or offer a user language choice, it effectively imposes a language requirement on some users.

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

Or download the binary and add to PATH

wget https://github.com/arduino/arduino-cli/releases/download/0.35.0/arduino-cli_0.35.0_Linux_64bit.tar.gz tar -xzf arduino-cli_0.35.0_Linux_64bit.tar.gz sudo mv arduino-cli /usr/local/bin/

text

**Windows:**

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Lines L160-L166 describe recordSaveToTFCard as recording and saving audio, but the document provides no warning that this operation captures user audio and stores it on removable media. For markdown files, privacy-impacting behavior should be disclosed so users understand data capture implications before using the skill.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Lines L334-L364 document enrollment, recognition, deletion, and retrieval of face recognition IDs, which implies processing biometric data. The markdown lacks any user-facing warning about privacy, consent, or retention considerations for face recognition features.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The audio example records voice to TF card storage without warning about consent, retention, or sensitivity of voice data. Even though this is a simple demo, it can be copied into real projects that capture speech without adequate notice, creating privacy and compliance risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The camera-based AI examples activate background camera capture and perform face, cat, motion, and QR analysis without any user-facing privacy notice or consent guidance. In an educational hardware skill this is likely not malicious, but it normalizes silent image capture/analysis and could lead downstream users to deploy privacy-invasive applications without informing subjects.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script downloads and executes/install software from the network with no default disclosure or confirmation, including piping a fetched shell script directly to sh. In a skill setup context, silent remote installation increases supply-chain and user-consent risk because users may trigger significant system changes without understanding them.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
88% confidence
Finding

The script conditionally invokes sudo to move a downloaded binary into a privileged system path. Using elevated privileges on artifacts obtained during the same setup flow increases the blast radius if the download or install path is compromised.

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
90% confidence
Finding

This path uses sudo to place arduino-cli into /usr/local/bin after obtaining it via a remote installer script. Combining network-fetched installation with privileged filesystem writes creates avoidable supply-chain exposure.

Content

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

sh
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

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The script silently writes configuration, installs board packages, and installs Python packages without default user-facing warning. This is risky in an agent skill because it modifies the user's environment and trusts external package sources without clear consent or visibility.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The manifest describes the skill as being for programming the Unihiker K10 with Arduino/C++, uploading code, flashing firmware, and using K10 Arduino APIs. This setup script also installs MicroPython-specific tools (mpremote and ampy) and advertises uploading MicroPython code, which expands beyond the Arduino/C++-scoped description.

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

md
log_info "Tips:"
    log_info "  - Make sure K10 is in bootloader mode (hold BOOT, press RST)"
    log_info "  - Check that the port is correct: $PORT"
    log_info "  - Try running with sudo on Linux"
    exit 1
fi

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/upload-arduino.sh (reported line 69)May include surrounding context.

sh
log_info "Tips:"
    log_info "  - Make sure K10 is in bootloader mode (hold BOOT, press RST)"
    log_info "  - Check that the port is correct: $PORT"
    log_info "  - Try running with sudo on Linux"
    exit 1
fi

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/upload_k10.py (reported line 82)May include surrounding context.

python
if not port:
        print("[INFO] Detecting K10 port...")
        try:
            result = subprocess.run([arduino_cli, "board", "list", "--format", "json"], 
                                    capture_output=True, text=True)
            boards = json.loads(result.stdout)

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/upload_k10.py (reported line 107)May include surrounding context.

python
# Compile
    print("[INFO] Compiling...")
    result = subprocess.run([arduino_cli, "compile", "--fqbn", fqbn,
                            "--build-path", build_dir, "--jobs", "0", sketch_path])
    if result.returncode != 0:
        print("[ERROR] Compilation failed")

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/upload_k10.py (reported line 116)May include surrounding context.

python
# Upload
    print(f"[INFO] Uploading to {port}...")
    result = subprocess.run([arduino_cli, "upload", "-p", port, "--fqbn", fqbn,
                            "--input-dir", build_dir, sketch_path])
    if result.returncode != 0:
        print("[ERROR] Upload failed")

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
72% confidence
Finding

The file header documents the environment setup as including 'MicroPython tools', while the skill manifest frames the skill around Arduino/C++ development and K10 Arduino APIs. This documentation widens the apparent intent of the skill in a way that conflicts with the declared Arduino/C++ scope.

Content

No source excerpt is available for this finding.

External Script Fetching

Low
Category
Supply Chain
Confidence
97% confidence
Finding

Piping a remotely fetched shell script directly into sh executes unreviewed network content immediately. If the upstream source, transport, or account is compromised, arbitrary code runs on the user's machine during setup.

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/
            ;;

Static analysis

No suspicious patterns detected.