Back to skill

Security audit

施工平面布置图

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report a high-confidence risk that its drawing exporter can overwrite the source file, alongside concerns about its declared purpose; this is a review verdict, not a finding of malicious intent.

Consider the verdict's suspicious classification before installing. The most concrete reported concern is possible source-drawing overwrite; scanners also identify mismatches in advertised capabilities and weaknesses in safety-related reporting. Coverage was partial: one component was only partly inspected, some references could not be resolved, a static analysis limit was reached, and binary icons were out of scope. The scan therefore does not establish that all behavior 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
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (39)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The code is related to the tower-crane trigger, but its implemented scope materially differs from the declared planning and verification workflow. It evaluates a supplied crane fleet using a fixed nearest-in-zone assignment rather than generating or comparing layouts, and contains no fire-road analysis. Its explicit preliminary status and final_check=false agree with the non-approval disclaimer. No file, network, or other external-resource access is shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

代码与消防道路校核、塔吊相关安全检查及“不替代审批”的定位一致,但实际功能是对输入的既有布置进行分阶段建模和规则校核,未体现声明中的多方案比选这一主要能力,因此存在功能范围上的实质差异。未发现网络外传、命令执行或与施工布置无关的资源访问;本地 JSON 读取属于支持性实现细节。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The visible implementation performs drawing conversion and viewer-compatibility processing; it contains no tower-crane placement, layout-option evaluation, or fire-road checking logic. CAD export could support the declared workflow, and its local file operations are not inherently suspicious, but this chunk implements a distinct conversion utility rather than the advertised engineering analysis. This assessment is limited to the supplied code; the behavior of the imported runtime bootstrap is not shown.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

The tower-crane trigger makes the code related to the declared domain, and its estimated, non-final positioning is consistent with not replacing approval. However, its primary function is a specialized crane coverage and lifting-capacity check, materially different from the advertised multi-scheme site-layout and fire-road review. No unrelated network access or other suspicious capability is visible. The imported checking implementation is not supplied, so this assessment is limited to the visible entry point and its calls.

Content

No source excerpt is available for this finding.

os.system() or os exec-family call

High
Category
Dangerous Code Execution
Confidence
85% confidence
Finding

os.system() and os exec-family calls run shell commands with the process's full privileges, enabling arbitrary command execution.

Content

Scanner excerpt · site_layout/bootstrap.py (reported line 79)May include surrounding context.

python
runtime = _runtime_python()
        if runtime is not None and Path(sys.executable).resolve() != runtime.resolve():
            argv = [str(runtime), str(Path(entry_file).resolve())] + sys.argv[1:]
            os.execv(str(runtime), argv)
        raise RuntimeError(
            "缺少依赖:{}。可设置 SITE_LAYOUT_VENDOR 指向含 ezdxf 的 vendor 目录,"
            "或安装 ezdxf>=1.4 与 Pillow>=10;本机可运行 "

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.

The R12 exporter can overwrite the primary DXF despite explicitly promising to leave it unchanged.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The exporter accepts a caller-selected output path and saves without checking whether it aliases the source DXF. Passing the source as the output can replace the primary drawing with a lossy R12 conversion that drops entities and associated dimension semantics, undermining drawing integrity despite the documented preservation promise.

Content

No source excerpt is available for this finding.

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 · site_layout/bootstrap.py (reported line 58)May include surrounding context.

python
def _probe(module: str) -> bool:
    try:
        __import__(module)
    except Exception:
        return False
    return True

The report promises to reject non-manufacturer performance tables, but the calculation can produce positive conclusions from them.

Medium
Category
Excessive Agency
Confidence
96% confidence
Finding

The report promises unknown_no_table for missing manufacturer tables, but the calculation checks has_table rather than explicitly requiring manufacturer provenance; the manufacturer check only changes the confidence grade. If a valid non-manufacturer table is accepted by the model, it can yield ok or review results, creating misleading lifting-capacity assurance in a physical-safety workflow despite the estimated and final_check=false disclaimers.

Content

No source excerpt is available for this finding.

Roads with insufficient annotation data can be silently omitted despite the explicit promise to record every geometry deficiency.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Road annotation completeness is tracked per category rather than per road: once one candidate is annotated, processing stops, and other roads with missing widths or unusable geometry receive no skipped record. In a construction/fire-access planning tool, this can hide incomplete evidence from downstream review, although this module alone does not establish that compliance checks are bypassed.

Content

No source excerpt is available for this finding.

site_layout/draw.py accepts reader center coordinates with no unit-basis declaration despite documenting mandatory rejection.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The condition rejects a non-explicit unit basis only when the basis string is nonempty, so omitting units or units.basis bypasses the documented safeguard. Reader center_xy_m values are then accepted and multiplied by 1000 even though their upstream conversion may have assumed the wrong drawing units, potentially misplacing cranes in safety-relevant planning drawings.

Content

No source excerpt is available for this finding.

site_layout/draw.py allows differing contract IDs without a DRAFT label, contradicting the hard boundary at L0006.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Different contract IDs can legitimately identify different payloads, but this drawing path checks only that IDs exist and does not verify their shared provenance or compatibility. Unrelated site, layout, and check inputs can therefore produce an unmarked drawing when final_check is truthy; recording the differing IDs in metadata does not prevent misleading construction-planning output.

Content

No source excerpt is available for this finding.

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 · site_layout/generator.py (reported line 698)May include surrounding context.

python
if schema != REQ_SCHEMA:
        raise GeneratorError(f"需求文件 schema={schema!r};只接受 {REQ_SCHEMA}")
    data["_path"] = str(file.resolve())
    data["_sha256"] = __import__("hashlib").sha256(file.read_bytes()).hexdigest()
    return data

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 · site_layout/generator.py (reported line 2326)May include surrounding context.

python
recommended["reason"] = ";".join(reasons)
    return {
        "schema": "site-scheme-comparison/v1",
        "generated_at": __import__("datetime").datetime.now().astimezone().isoformat(timespec="seconds"),
        "rows": rows,
        "recommended": recommended,
        "usable": len(usable),

Manual unit decisions do not enforce the documented requirement to identify a confirming person.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

Manual override branches accept the default empty confirmed_by value while labeling the decision manual_confirmed, contrary to the documented confirmation requirement. This permits an unconfirmed unit selection to appear confirmed; incorrect unit choices can materially distort construction geometry, although any separate caller-side enforcement is not shown.

Content

No source excerpt is available for this finding.

Review-required inputs can become a passing role verdict, contradicting the claim that the panel only reorganizes existing conclusions.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

Input statuses are not validated: a status such as review is counted under its own key but excluded from findings and the fail/manual verdict calculation, allowing the role to pass. Missing mapped checks are also ignored, so incomplete or unexpected inputs can produce reassuring review gates; the internal-review-only disclaimer limits but does not eliminate this reporting-integrity risk.

Content

No source excerpt is available for this finding.

The width check can report pass despite missing road-width evidence, contradicting the documented manual-review policy.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

R1 silently skips roads without width evidence and reports pass whenever at least one other road was tested and none were narrow. Consequently, a known-width road can mask an unverified fire-access road, falsely presenting a safety-relevant check as complete; draft status does not correct that misleading result.

Content

No source excerpt is available for this finding.

Road-width checks can pass without width evidence, contradicting the documented missing-evidence policy.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Temporary roads without width evidence are assigned a default width, while other roads without widths are skipped; consequently, the aggregate check can report pass despite unverified roads. In a construction and fire-access planning skill, this can obscure inadequate emergency access, although the draft-only output and final_check=false limit its authority.

Content

No source excerpt is available for this finding.

Detected geometric conflicts are downgraded to manual despite the documented requirement to fail.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

The geometry check classifies detected intersections as manual rather than fail, contradicting the module's explicit hard rule for geometric conflicts. This can leave hazardous overlaps outside the fail count and weaken any downstream workflow that blocks only failures; manual warnings and the draft-only designation mitigate, but do not eliminate, that risk.

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

python
def run_cli(handoff: str, fleet: str, baseline: str, out_dir: Path) -> subprocess.CompletedProcess:
    return subprocess.run(
        [
            sys.executable,
            str(CLI),

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_draw.py (reported line 54)May include surrounding context.

python
def run_check(out_dir: Path) -> Path:
    proc = subprocess.run(
        [
            sys.executable,
            str(CHECK_CLI),

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_draw.py (reported line 101)May include surrounding context.

python
command.extend(["--layout", str(layout if layout is not None else FIXTURES / "site_sample.layout.json")])
    if draft:
        command.append("--draft")
    return subprocess.run(command, cwd=str(ROOT), capture_output=True, text=True)


class DrawLayoutTest(unittest.TestCase):

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_draw.py (reported line 229)May include surrounding context.

python
out = self.base / "out_direct_cad"
        direct_cad = self.base / "direct.dxf"
        direct_cad.write_text("0\nSECTION\n2\nHEADER\n0\nENDSEC\n0\nEOF\n", encoding="ascii")
        proc = subprocess.run(
            [
                sys.executable,
                str(DRAW_CLI),

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_dxf_view_export.py (reported line 66)May include surrounding context.

python
def test_01_r12_view_export(self) -> None:
        out = self.base / "source-r12.dxf"
        proc = subprocess.run(
            [sys.executable, str(EXPORT_CLI), str(self.src), "-o", str(out)],
            cwd=str(ROOT), 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_dxf_view_export.py (reported line 105)May include surrounding context.

python
def test_02_dimension_block_kept(self) -> None:
        out = self.base / "dim-r12.dxf"
        proc = subprocess.run(
            [sys.executable, str(EXPORT_CLI), str(self.src), "-o", str(out)],
            cwd=str(ROOT), capture_output=True, text=True,
        )