Back to skill

Security audit

LEGO MOC

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence because its error guidance reportedly encourages bypassing network restrictions; the scan was partial, so the evidence is incomplete.

Consider whether the reported network-bypass guidance is acceptable in your environment before installing. ClawScan's verdict is suspicious, not malicious; the AIG scan returned no findings, but Skillspector marked its analysis partial because multiple local path references were unresolved, so the evidence is incomplete.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (7)

Error recovery instructions reframe network-policy denials as connectivity problems and direct the agent to circumvent enforcement.

High
Category
Prompt Injection
Confidence
98% confidence
Finding

The error message explicitly suggests running outside the sandbox or bypassing a proxy after receiving a possible policy denial, and incorrectly assumes that a non-JSON 403, 407, or 451 must originate from an intermediary. Because this CLI supplies instructions to an agent, the message can encourage crossing an enforced network boundary and uploading photos or model data through an unauthorized route, although the code itself does not perform the bypass.

Content

No source excerpt is available for this finding.

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

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.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
prefix, no wrapper script. Then the user can approve "always allow" once for `python3 <path>/lego.py` and is not
  asked again. Tell the user this the first time an approval appears.
- The script needs three things, all of which the user can allow once: run `lego.py`, reach the server host shown by
  `lego.py whoami`, and read/write `~/.lego-parts/`.
- Don't run the same step twice, don't poll in a loop of short commands (use `--wait`), and don't call the server
  with curl or code of your own.
- When you design a model, write `model.ldr` (and any helper you need) with your file-writing tool in as few steps

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/lego.py (reported line 523)May include surrounding context.

python
user = load_user(ctx)  # another agent may have created it meanwhile
        if user is None:
            say("No user ID on this computer yet; requesting one from", ctx["server"])
            resp = api(ctx, "POST", "/users", body=b"", retry="refused", auth=False)
            if not valid_id(resp.get("user_id")):
                raise Fatal("the server did not return a valid user ID")
            user = {"user_id": resp["user_id"], "server": ctx["server"],

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/lego.py (reported line 1246)May include surrounding context.

python
raise UsageError("parts file not found: " + args.parts_file)
    setup(ctx)
    folder = moc_dir(ctx)
    _, guide = not_ready_retry(ctx, lambda: api_raw(ctx, "GET", "/moc/guide", auth=False,
                                                    accept="text/markdown, text/plain, */*"))
    if not guide.strip():
        raise ApiError(200, "bad_response", "the server sent an empty design guide")

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · scripts/lego.py (reported line 1271)May include surrounding context.

python
body = json.dumps({"parts": batch}).encode("utf-8")
        try:
            _, raw = not_ready_retry(ctx, lambda b=body: api_raw(
                ctx, "POST", "/moc/connectors", b, "application/json", auth=False, accept="text/plain, */*"))
        except ApiError as e:
            raise Fatal("could not fetch connector sheets (request {}/{}): {}. connectors.txt was not "
                        "updated.".format(n, len(batches), describe(e)))

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

Scanner excerpt · LICENSE (reported line 12)May include surrounding context.

text
permit persons to whom the Software is furnished to do so.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE