Back to skill

Security audit

Cad Clash Check Light

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marked this skill suspicious because scanners found risks around running helper commands and reporting incomplete clash checks as complete.

Review the skill's tool requirements and how its helper scripts are run before installing. If you use it for clash checking, verify that wall and opening extraction completed and review the results rather than relying on a completed status alone.

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
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

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

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

python
workdir.mkdir(parents=True, exist_ok=True)
    stem = input_path.stem
    detail = workdir / f"{stem}.detail.json"
    r = subprocess.run(
        [sys.executable, str(cfr / "cad_scan.py"), str(input_path),
         "--detail-json", str(detail), "--with-geom", "--with-geom-layer",
         "--format", "json", "-o", str(workdir / f"{stem}_scan")],

Tainted flow: 'cfr' from os.environ.get (line 817, 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/cad_clash_check.py (reported line 530)May include surrounding context.

python
workdir.mkdir(parents=True, exist_ok=True)
    stem = input_path.stem
    detail = workdir / f"{stem}.detail.json"
    r = subprocess.run(
        [sys.executable, str(cfr / "cad_scan.py"), str(input_path),
         "--detail-json", str(detail), "--with-geom", "--with-geom-layer",
         "--format", "json", "-o", str(workdir / f"{stem}_scan")],

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

python
cmd = [sys.executable, str(script), str(detail), "--out-dir", str(geo_dir)]
    if spec == "建筑":
        cmd += ["--cfr", str(cfr)]
    r = subprocess.run(cmd, capture_output=True, text=True, timeout=1800)
    out = geo_dir / f"{detail.stem}.{cfg['suffix']}.json"
    tail = (r.stderr or "").strip()[-300:] or (r.stdout or "").strip()[-200:]
    if r.returncode != 0 or not out.exists():

Tainted flow: 'cmd' from os.environ.get (line 551, 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/cad_clash_check.py (reported line 554)May include surrounding context.

python
cmd = [sys.executable, str(script), str(detail), "--out-dir", str(geo_dir)]
    if spec == "建筑":
        cmd += ["--cfr", str(cfr)]
    r = subprocess.run(cmd, capture_output=True, text=True, timeout=1800)
    out = geo_dir / f"{detail.stem}.{cfg['suffix']}.json"
    tail = (r.stderr or "").strip()[-300:] or (r.stdout or "").strip()[-200:]
    if r.returncode != 0 or not out.exists():

The promised degraded status for missing wall/opening extraction is not implemented.

Medium
Category
Excessive Agency
Confidence
95% confidence
Finding

The main pipeline does not propagate missing wall/opening extraction warnings into its final report or completion status, and it unconditionally records status as done. Missing walls can therefore produce an apparently completed check with omitted collision candidates; the construction-review context makes this consequential, although the explicit human-review disclaimer limits reliance.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
96% confidence
Finding

When --cfr is omitted, Path(args.cfr or "").resolve() selects the current working directory, which ordinarily passes the directory check and bypasses trusted dependency discovery. Running this helper from an untrusted project containing a malicious cad_structural_geometry.py or cad_deep_geometry.py executes that file with the user's privileges; the parent workflow's explicit --cfr argument reduces exposure but does not fix standalone use.

Content

Scanner excerpt · scripts/clash_building_extract.py (reported line 24)May include surrounding context.

python
def run(cmd: list[str], what: str, timeout: int = 1800) -> None:
    r = subprocess.run(cmd, capture_output=True, text=True, timeout=timeout)
    if r.returncode != 0:
        raise RuntimeError(f"{what}失败 rc={r.returncode}: {(r.stderr or r.stdout or '')[-400:]}")