Back to skill

Security audit

shizheng-suanliang

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence, mainly because it reports weaknesses that could allow unverified contract data or guessed coordinate units to affect quantity estimates.

Consider avoiding installation until the contract-integrity and coordinate-unit issues are reviewed, since they could make quantity results unreliable. The scan reports that all 35 components were inspected, but Skillspector also recorded a nonzero exit status with serialization warnings, so the evidence has some reporting uncertainty. The verdict remains suspicious; it does not establish malicious intent.

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
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (14)

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

python
def clean_env(extra=None):
    env = os.environ.copy()
    for key in ("CAD_FILE_READER_HOME", "CAD_SKILL_DIR", "SKILLBUS_HOME",
                "CAD_DEV_DXF", "CAD_ALLOW_DIRECT"):
        env.pop(key, None)

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.

Standalone topic keywords can activate the skill without a quantity-takeoff request.

Medium
Category
Trigger Abuse
Confidence
88% confidence
Finding

The explicit trigger list includes 管道 (pipes/pipelines) and 检查井 (inspection wells), which identify topics rather than an intent to estimate quantities. Although the description concerns municipal takeoff, it does not require that intent when matching these keywords or exclude general maintenance, design, or explanatory questions.

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 hash-consistency condition for formal admission is not enforced by default.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

With the default strict_hash=False, a contract lacking an embedded hash is admitted with only a warning, and self-declared reader/bus provenance plus a nonempty contract_id can still yield formal_ledger_eligible=true. An attacker able to supply or modify a contract can omit its hash and have fabricated geometry treated as formally sourced; the skill's estimate-only boundaries limit intended use but do not repair this integrity failure.

Content

No source excerpt is available for this finding.

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

Scanner excerpt · scripts/contract_support.py (reported line 62)May include surrounding context.

python
os.environ.get("CAD_SKILL_DIR"),
        Path.home() / ".codex" / "skills" / "cad-file-reader",
        Path.home() / ".claude" / "skills" / "cad-file-reader",
        *sorted(Path.home().glob(".workbuddy/skills/*/cad-file-reader")),
    ])

File System Enumeration

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Code scans file system directories looking for sensitive files. This could be reconnaissance for credential theft.

Content

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

python
out.append(Path(raw).expanduser())
    out.extend(root / slug for root in _default_roots())
    if slug == "cad-file-reader":
        out.extend(sorted(Path.home().glob(".workbuddy/skills/*/cad-file-reader")))
    return out

Missing coordinate units are guessed despite the documented prohibition on filling evidence gaps with defaults.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

When authoritative coordinate units are absent, the code infers metres or millimetres from absolute coordinate magnitude, which does not reliably establish drawing units. Malformed or manipulated geometry can therefore produce lengths wrong by a factor of 1,000 and areas wrong by a factor of 1,000,000, compromising municipal quantity estimates. Warnings and final_quantity=false reduce downstream risk but do not prevent unsupported numeric results.

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

python
cmd = [sys.executable, str(client), "pull", "--project", project,
           "--entry-id", contract_id]
    try:
        proc = subprocess.run(cmd, capture_output=True, text=True, timeout=60)
    except (OSError, subprocess.TimeoutExpired) as exc:
        return None, "bus pull 执行失败:%s" % exc
    if proc.returncode != 0:

Dynamic import via __import__()

Medium
Category
Dangerous Code Execution
Confidence
75% confidence
Finding

Dynamic import() can load arbitrary modules at runtime, bypassing static analysis and potentially importing malicious code.

Content

Scanner excerpt · scripts/pyboot.py (reported line 85)May include surrounding context.

python
manifest = root / "manifest.json"
    if manifest.is_file():
        try:
            data = __import__("json").loads(manifest.read_text(encoding="utf-8"))
            version = data.get("version")
            if isinstance(version, str) and version.strip():
                return version.strip()

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

python
"""文件入口缺 --allow-manual 必须 exit 3,不静默降级。"""
        with tempfile.TemporaryDirectory() as tmp:
            path = _write(Path(tmp), _payload())
            proc = subprocess.run(
                [sys.executable, str(SCRIPTS / "municipal_qty.py"),
                 "--municipal", str(path), "--out-prefix", str(Path(tmp) / "x")],
                capture_output=True, text=True)

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

python
self.assertEqual(proc.returncode, 3, proc.stderr)

    def test_drawing_input_exits_23(self):
        proc = subprocess.run(
            [sys.executable, str(SCRIPTS / "municipal_qty.py"),
             "--municipal", "道路图.dwg", "--allow-manual", "--out-prefix", "x"],
            capture_output=True, text=True)

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

python
def run_qty(args, env):
    return subprocess.run(
        [sys.executable, str(ENTRY)] + [str(a) for a in args],
        capture_output=True, text=True, env=env, cwd=str(SKILL_ROOT))

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

python
os.environ.setdefault("PYTHONIOENCODING", "utf-8")
    os.environ.setdefault("PYTHONUTF8", "1")
    for _name in ("stdout", "stderr"):
        _stream = getattr(sys, _name, None)
        _reconf = getattr(_stream, "reconfigure", None)
        if callable(_reconf):
            try: