Back to skill

Security audit

embedded-driver-templates

Security checks for vulnerabilities and agentic risk

Overview

The scanners report multiple concerns in this skill’s embedded-driver templates and test tooling, so ClawScan classifies it as suspicious; the Skillspector review is partial because two referenced paths were missing.

Consider avoiding installation until the maintainer explains or addresses the reported test-runner, tool-scope, and driver-documentation issues. The scan reports no persistence or privilege-escalation finding, but its review is incomplete: although all 62 listed components were inspected, two references in SKILL.md could not be resolved, so the evidence does not establish that the package is safe.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • 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 (18)

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
60% confidence
Finding

Code enumerates, copies, or searches environment variables for secrets. Bulk environment access can collect credentials unrelated to the skill's stated purpose.

Content

Scanner excerpt · tests/run_c_tests.py (reported line 63)May include surrounding context.

python
if gcc is None:
        return None, None
    bindir = os.path.dirname(os.path.abspath(gcc))
    env = dict(os.environ)
    # 关键一步:cc1.exe 靠 PATH 找同目录 DLL
    env["PATH"] = bindir + os.pathsep + env.get("PATH", "")
    return gcc, env

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, 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.

L46–L47 promise interrupt protection that dht11_read does not implement.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The API documentation explicitly says interrupts are briefly disabled during acquisition. The supplied dht11_read implementation performs timing-sensitive GPIO sampling without disabling or restoring interrupts, so callers may incorrectly rely on nonexistent timing protection.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

L40 tells users to preserve interrupt protection that the supplied driver does not contain.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The troubleshooting guide asserts that dht11_read already contains interrupt-disabling protection and suggests checking that it has not been removed. The supplied implementation contains no such protection, so this advice misrepresents the template's timing guarantees and can misdirect debugging.

Content

No source excerpt is available for this finding.

L49 advertises a split-phase conversion workflow, but the recommended read starts and waits for another conversion.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The comment presents starting conversion, waiting externally, and then calling ds18b20_read as nonblocking usage. However, ds18b20_read unconditionally issues another ConvertT command and blocks for 750 ms, rather than retrieving the previously completed conversion; the advertised workflow therefore does not avoid the blocking conversion wait.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Instruction to disable interrupts omits a warning about system-wide timing and responsiveness impacts.

Medium
Category
Output Handling
Confidence
86% confidence
Finding

The guide recommends disabling interrupts during reads without specifying a bounded critical section or preserving the previous interrupt state. In an embedded system, interpreting this as masking interrupts throughout a blocking sensor operation can delay safety handlers, communications, and scheduler activity.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

The documented endpoint-calibration procedure does not constrain the generated servo pulses.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The recommended endpoint calibration cannot work as described because the pulse span remains hardcoded to 2000 microseconds regardless of calibrated limits. Raising the minimum or reducing the intended maximum can therefore still command travel beyond a servo's safe range, causing mechanical binding, stalls, overheating, or damage.

Content

No source excerpt is available for this finding.

The phase-output implementation sets PB4 instead of clearing PB0-PB3 as documented.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

With GPIO_PIN_0 as the base, shifting it by four sets PB4 in the BSRR set field rather than resetting PB0–PB3. Previously energized motor phases consequently remain set, potentially causing incorrect motion, sustained coil energization and heating, while also unexpectedly driving another GPIO.

Content

No source excerpt is available for this finding.

Peripheral requirements derived from metadata are presented as quotations from adapter-layer comments.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

At L215-L219, _init_requirements combines adapter text with clauses from meta.usage. This contradicts the exclusive adapter-source claim at L226-L227 and the output label at L288, which presents every requirement as an original adapter-comment quotation. Source fidelity is central to this skill's stated purpose, and metadata-based porting advice is not necessarily an adapter-documented initialization prerequisite.

Content

No source excerpt is available for this finding.

The documented full initialization-requirements query silently returns at most three requirements.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

L242 truncates initialization requirements to three entries before storing the record. peripheral_api_get, documented at L275 as returning the full initialization requirements for a pre-porting check, consumes these truncated records without retrieving the remaining entries or disclosing the limit. Drivers with more than three requirements can therefore have mandatory prerequisites omitted from an apparently complete checklist.

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 · tests/run_c_tests.py (reported line 70)May include surrounding context.

python
def run(cmd, env, cwd=TESTS):
    return subprocess.run(cmd, capture_output=True, text=True, env=env, cwd=cwd)


def check_warnings(gcc, env):

The test runner claims support for flattened driver assets but still resolves nested asset paths.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The module documentation at L5-L6 explicitly says driver paths were adapted to assets/__. Instead, L79 and L87 resolve assets/drivers//, and L110 repeats the nested layout for linking. Under the documented packaged layout, the runner marks all nine sources missing and exits without performing the promised C validation.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

Running the compiled test binary is appropriate for this skill, but its executable resides in a predictable temporary directory created with exist_ok=True and without ownership validation. On systems with shared temporary storage, another local user can pre-create an attacker-controlled build directory and replace the executable between successful linking and execution, causing code to run with the test runner's privileges.

Content

Scanner excerpt · tests/run_c_tests.py (reported line 120)May include surrounding context.

python
if r.stderr.strip():
        print("链接警告:")
        print(r.stderr[:500])
    rr = subprocess.run([exe], capture_output=True, text=True, env=env, cwd=TESTS)
    out = rr.stdout + rr.stderr
    print(out[-3000:] if len(out) > 3000 else out)
    return rr.returncode

The UART read adapter is documented as nonblocking but performs a blocking receive.

Low
Category
Excessive Agency
Confidence
99% confidence
Finding

In assets/hc05__hc05_port.h, L20 promises a nonblocking read that returns 0 when data is unavailable. However, L23 calls HAL_UART_Receive with a 10 ms timeout, which can block while waiting for data. This contradicts the adapter's stated timing behavior and can delay other work in a cooperative embedded application.

Content

No source excerpt is available for this finding.