Back to skill

Security audit

FreeCAD

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence, mainly because it reports an optional, unrestricted Python execution capability beyond the stated FreeCAD purpose; the scan was partial, so its evidence is incomplete.

Consider the suspicious verdict and the reported unsandboxed Python capability before installing. The scanner recommends not installing; if you need this skill, first verify that you trust and need that capability, and keep in mind that parts of the scan were incomplete, including checks affected by obfuscated instruction text and unresolved references.

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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (42)

Tainted flow: 'req' from os.environ.get (line 110, credential/environment) → urllib.request.build_opener.open (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/fcengine/library.py (reported line 113)May include surrounding context.

python
req = urllib.request.Request(url, headers={"User-Agent": f"fcskill/{__version__}", "Accept": "*/*"})
    opener = urllib.request.build_opener(_SameHostRedirect)
    try:
        with opener.open(req, timeout=60) as resp:  # noqa: S310 - allow-listed https URLs only
            data = resp.read(limit + 1)
    except urllib.error.HTTPError as e:
        hint = (

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared purpose covers CAD modeling and related verification and export, but does not disclose a general-purpose, unsandboxed code-execution capability. The operation uses compile and exec without restricting builtins or imports, so enabled scripts can perform non-CAD actions with external side effects that document verification cannot undo. The explicit environment-variable gate reduces exposure but does not remove the capability mismatch. This chunk does not demonstrate actual credential access or malicious external activity; environment sanitization is described in its docstring but is not implemented here.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Most cataloged operations align with the declared CAD workflow. However, the 'python' operation accepts Python source and explicitly states that execution is not sandboxed, can access resources outside the workspace, and rolls back only document changes. This is materially broader than ordinary parametric CAD operations. The environment-variable gate reduces exposure but does not eliminate the description mismatch. This chunk defines and advertises that interface; it does not contain the execution implementation, so actual execution and enforcement of the gate cannot be verified here.

Content

No source excerpt is available for this finding.

The operation catalog exposes unrestricted Python execution beyond the skill's CAD-modeling purpose.

High
Category
Excessive Agency
Confidence
93% confidence
Finding

The registered 'python' operation accepts source code and explicitly states that execution uses the user's permissions, is not confined to the workspace, and rolls back only document changes (L1057–L1072). Although gated by FCSKILL_ALLOW_PYTHON=1, this general-purpose execution capability exceeds the manifest's stated modeling, verification, export, stress-analysis, and optional GitHub-parts scope.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/fcengine/hostenv.py (reported line 23)May include surrounding context.

python
re.IGNORECASE,
)
# Agent sockets give access to keys without reading them.
_SECRET_EXACT = {"SSH_AUTH_SOCK", "GPG_AGENT_INFO", "GOOGLE_APPLICATION_CREDENTIALS", "KUBECONFIG"}
# Values carrying credentials, e.g. DATABASE_URL=postgres://user:pass@host or a proxy with a password.
_CREDENTIAL_URL = re.compile(r"://[^/\s:@]+:[^/\s@]+@")

Env Variable Harvesting

High
Category
Data Exfiltration
Confidence
70% 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 · scripts/fcengine/hostenv.py (reported line 43)May include surrounding context.

python
def scrub_process_env() -> None:
    """Drop secret-looking variables from this process (FreeCAD run in-process)."""
    for k in [k for k, v in os.environ.items() if is_secret(k, v)]:
        del os.environ[k]

scripts/fcengine/ops/script.py exposes unrestricted Python execution beyond the manifest's CAD-modeling scope.

High
Category
Excessive Agency
Confidence
98% confidence
Finding

L45–L58 execute request-supplied Python with ordinary built-ins and unrestricted imports, enabling unrelated filesystem, process, and network operations rather than only FreeCAD model manipulation. The environment-variable opt-in at L34 and the explicit non-sandbox warning at L07–L09 reduce accidental exposure and accurately document the behavior, but the manifest does not declare this general-purpose execution capability.

Content

No source excerpt is available for this finding.

exec() call detected

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

Direct exec() call allows arbitrary code execution. An attacker can inject code that runs with the full privileges of the process.

Content

Scanner excerpt · scripts/fcengine/ops/script.py (reported line 58)May include surrounding context.

python
try:
        code = compile(p["code"], "<python step>", "exec")
        with redirect_stdout(out):
            exec(code, ns)  # noqa: S102 - explicit, user-enabled escape hatch
    except SkillError:
        raise
    except SyntaxError as e:

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

The FCSKILL_ exemption contradicts the documented removal of secret-looking environment variables.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

The unconditional FCSKILL_ exemption bypasses both secret-name and credential-URL detection, allowing variables such as FCSKILL_API_KEY or a prefixed credential-bearing URL to survive sanitization. If such variables exist, FreeCAD, solvers, and opt-in Python code inherit credentials that this module is intended to withhold; actual leakage depends on the host environment.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/fcengine/library.py (reported line 35)May include surrounding context.

python
REPO = "FreeCAD/FreeCAD-library"
BRANCH = "master"
API_TREE = f"https://api.github.com/repos/{REPO}/git/trees/{BRANCH}?recursive=1"
RAW = f"https://raw.githubusercontent.com/{REPO}/{BRANCH}/"
WEB = f"https://github.com/{REPO}/blob/{BRANCH}/"
HISTORY = f"https://github.com/{REPO}/commits/{BRANCH}/"

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/fcengine/library.py (reported line 49)May include surrounding context.

python
ENV_LOCAL = "FCSKILL_LIBRARY"
ENV_OFFLINE = "FCSKILL_OFFLINE"
# The only URLs ever fetched: this repository's index and its raw files. Nothing is sent but the request itself.
ALLOWED_PREFIXES = (f"https://api.github.com/repos/{REPO}/", RAW)
ALLOWED_HOSTS = ("api.github.com", "raw.githubusercontent.com")

Tainted flow: 'src' from os.environ.get (line 281, credential/environment) → shutil.copyfile (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/fcengine/library.py (reported line 285)May include surrounding context.

python
if not src.is_file() or not src.is_relative_to(local.resolve()):
            raise _err(errors.LIBRARY_UNAVAILABLE, f"'{repo_path}' is not a file inside {ENV_LOCAL} ({local})")
        dest.parent.mkdir(parents=True, exist_ok=True)
        shutil.copyfile(src, dest)
    else:
        if entry.get("size", 0) > MAX_DOWNLOAD:
            raise _err(

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/fcengine/ops/fem.py (reported line 84)May include surrounding context.

python
kwargs["startupinfo"] = femutils.startProgramInfo("hide")
            except Exception:
                pass
            p = subprocess.Popen(
                [self.gmsh_bin, "-", self.temp_file_geo], stdout=subprocess.PIPE, stderr=subprocess.PIPE, **kwargs
            )
            try:

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/fcengine/ops/fem.py (reported line 149)May include surrounding context.

python
)
            folder, base = os.path.split(self.inp_file_name)
            base = os.path.splitext(base)[0]
            p = subprocess.Popen(
                [self.ccx_binary, "-i", base],
                cwd=folder or None,
                stdout=subprocess.PIPE,

Mesh convergence is reported as passed even when convergence checks produce failure warnings.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The convergence dictionary is populated even when displacement or stress changes exceed the warning thresholds, but checks.convergence is subsequently reported as passed whenever that dictionary exists. Downstream agents or automated acceptance checks can therefore treat unconverged stress results and safety factors as verified, which is particularly dangerous in an engineering-analysis skill.

Content

No source excerpt is available for this finding.

compile() call detected

Medium
Category
Dangerous Code Execution
Confidence
65% confidence
Finding

compile() creates code objects from strings. When combined with exec()/eval(), it enables obfuscated code execution.

Content

Scanner excerpt · scripts/fcengine/ops/script.py (reported line 56)May include surrounding context.

python
}
    out = io.StringIO()
    try:
        code = compile(p["code"], "<python step>", "exec")
        with redirect_stdout(out):
            exec(code, ns)  # noqa: S102 - explicit, user-enabled escape hatch
    except SkillError:

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

python
kw: Dict[str, Any] = (
        {"start_new_session": True} if posix else {"creationflags": getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0)}
    )
    proc = subprocess.Popen(
        cmd, env=env, cwd=str(cwd), stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw
    )
    try:

Tainted flow: 'cmd' from os.environ.get (line 344, credential/environment) → subprocess.Popen (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/fcskill.py (reported line 284)May include surrounding context.

python
kw: Dict[str, Any] = (
        {"start_new_session": True} if posix else {"creationflags": getattr(subprocess, "CREATE_NEW_PROCESS_GROUP", 0)}
    )
    proc = subprocess.Popen(
        cmd, env=env, cwd=str(cwd), stdin=subprocess.DEVNULL, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, **kw
    )
    try:

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

python
if posix:
                os.killpg(proc.pid, signal.SIGKILL)
            else:
                subprocess.run(
                    ["taskkill", "/F", "/T", "/PID", str(proc.pid)],
                    stdout=subprocess.DEVNULL,
                    stderr=subprocess.DEVNULL,

Tainted flow: 'proc' from os.environ.get (line 284, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/fcskill.py (reported line 294)May include surrounding context.

python
if posix:
                os.killpg(proc.pid, signal.SIGKILL)
            else:
                subprocess.run(
                    ["taskkill", "/F", "/T", "/PID", str(proc.pid)],
                    stdout=subprocess.DEVNULL,
                    stderr=subprocess.DEVNULL,

Tainted flow: 'real_doc' from os.environ.get (line 325, credential/environment) → shutil.copy2 (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/fcskill.py (reported line 330)May include surrounding context.

python
if real_doc.exists():
                target = staged_ws / workspace.relative(root, real_doc)
                target.parent.mkdir(parents=True, exist_ok=True)
                shutil.copy2(real_doc, target)
            parts = root / library.CACHE_DIR / "parts"
            if library.library_refs(request) and parts.is_dir():  # downloaded library parts the request imports
                shutil.copytree(parts, staged_ws / library.CACHE_DIR / "parts")

Tainted flow: 'dst' from os.environ.get (line 369, credential/environment) → shutil.copy2 (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/fcskill.py (reported line 371)May include surrounding context.

python
src = workspace.resolve(staged_ws, rel)  # both ends confined: nothing from or to outside
                dst = workspace.resolve(root, rel)
                dst.parent.mkdir(parents=True, exist_ok=True)
                shutil.copy2(src, dst)
        return resp
    finally:
        shutil.rmtree(io_dir, ignore_errors=True)

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/fcengine/docs.py (reported line 30)May include surrounding context.

python
if p.choices:
        constraints.append(" \\| ".join(f"`{c}`" for c in p.choices))
    for key, sym in (("gt", ">"), ("ge", "≥"), ("le", "≤")):
        v = getattr(p, key)
        if v is not None:
            constraints.append(f"{sym} {v:g}")
    if p.min_items:

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/fcengine/document.py (reported line 68)May include surrounding context.

python
def _helpers(obj: Any) -> List[str]:
    return list(getattr(obj, HELPERS_PROP, []) or [])


def consumes(consumer: Any, obj: Any) -> bool: