Back to skill

Security audit

钢结构算量

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because it found a contract-integrity weakness that could let altered steel quantities qualify for formal downstream use, alongside a mismatch between its stated limits and reported capabilities.

Consider avoiding installation until the contract-hash weakness and the mismatch between stated limits and reported drawing and quantity-estimation capabilities are resolved. The verdict is suspicious, not malicious; some scanner coverage is incomplete, so these results do not establish that the skill 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (20)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The commands invoke cad_scan.sh with text, insert, geometry, and geometry-layer extraction options, followed by cad_steel_geometry.sh. Although recognition is delegated to cad-file-reader, it remains an explicit part of this workflow and contradicts the declared exclusion. Contract synchronization and validation support the declared tonnage-estimation purpose and are not separate mismatches.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

吨位计算、契约校验和结果导出均与声明用途一致,状态同步也属于支持性实现细节。但所示流程在没有可复用契约时,会明确调用 cad_scan.sh 和 cad_steel_geometry.sh 执行图纸识别及几何提取。虽然识别由另一个技能完成,而非吨位计算脚本自行实现,所提供的整体工作流仍包含该能力,因此“不识图”的声明未准确反映实际行为。没有证据表明其替代结算。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Tonnage estimation, contract validation, state synchronization, and output generation support the declared purpose. However, the supplied workflow explicitly invokes cad_scan.sh and cad_steel_geometry.sh to interpret a steel drawing when no reusable contract exists. Delegating that work to cad-file-reader does not remove it from the supplied workflow's behavior, so the unqualified '不识图' limitation is inaccurate. Nothing shown indicates that the workflow replaces final settlement calculations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
86% confidence
Finding

The primary tonnage calculation matches the description: the supplied script does not parse drawings itself and explicitly marks results final_quantity=false. However, connection_ledger and finish_ledger provide additional quantity-estimation outputs beyond tonnage, especially coating areas, which are not disclosed by the narrow description. Contract retrieval, dependency checks, validation, and report generation are supporting implementation details rather than mismatches. No unrelated data exfiltration or automatic dependency installation is evident in the supplied chunk; imported helper implementations were not supplied.

Content

No source excerpt is available for this finding.

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 85)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.

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.

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.

Contracts without an integrity hash can receive formal-ledger eligibility despite the documented hash-match requirement.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Even with require_hash=True, a missing contract hash produces only a warning, while self-declared reader/bus provenance and a nonempty contract ID can still yield formal-ledger eligibility. An input supplier can remove a mismatching hash to bypass this integrity check, potentially laundering altered steel quantities into trusted downstream outputs; separate bus authentication may limit end-to-end exploitability but is not established by this source.

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

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()

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.

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/steel_tonnage.py (reported line 1098)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:

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.

Context Window Stuffing

Medium
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill attempts to fill the context window with filler content, displacing legitimate instructions and safety constraints. This can degrade agent performance or bypass safety boundaries.

Content

Scanner excerpt · tests/fixtures/reader_contract.json (reported line 15)May include surrounding context.

json
},
  "source": {
    "file": "synthetic-s2.dwg",
    "sha256": "3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f3f"
  },
  "contract": {
    "schema": "cad-steel-geometry/v1",

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 94)May include surrounding context.

python
def run_skill(slug: str, entry: str, args, env):
    return subprocess.run(
        [sys.executable, str(SKILLS / slug / "scripts" / entry)] + [str(a) for a in args],
        capture_output=True, text=True, env=env, cwd=str(SKILLS / slug))

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 235)May include surrounding context.

python
script = SKILLS / "gangjiegou-suanliang" / "scripts" / "steel_tonnage.py"

    def run_steel(args):
        return subprocess.run([sys.executable, str(script)] + [str(a) for a in args],
                              capture_output=True, text=True, env=env_bus)

    p2 = tmp / "t2"

The drawing-input rejection message is fixed to Chinese without a documented language choice or locale justification.

Low
Category
Output Handling
Confidence
93% confidence
Finding

The changelog explicitly states that rejected DWG/DXF/DWT inputs produce a fixed Chinese message. This mandates a specific output language without documenting user opt-in or a justified locale restriction.

Content

No source excerpt is available for this finding.

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: