Back to skill

Security audit

装饰算量

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious because scanners report a mismatch between its estimating purpose and a bundled portability linter, plus concerns about automatic dependency installation and validation safeguards.

The verdict is suspicious, with medium overall confidence, and the scanner’s recommendation is DO_NOT_INSTALL. Consider avoiding installation unless you have a clear need and can review the dependency installation behavior, validation limits, and code-linter capability; the scan reports concerns, not a finding that the author is malicious.

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
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (38)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · CHANGELOG.md (reported line 17)May include surrounding context.

md
## 0.9.34 · 2026-11-09 · 校验不再静默跳过 + 主入口闸门

- **`cad_measure_to_input.py`**:缺 reader/validator 时抛 `ValidationUnavailable`,默认 `--validate` exit 1 且不写输出 CSV;仅显式 `--no-validate` 跳过,输出 `validation=skipped` 并在行内标注。
- **`decor_qty.py` 主入口闸门**:无 `--contract` 且无 `--allow-manual` exit 3;`provenance=manual` 强制 `final_quantity=false`、`formal_ledger_eligible=false`。
- **新增**:`--check-deps`、`--contract`(仅溯源)、`provenance.json`、`run.json`、`site_handoff.json`(`specialty=finish`,缺坐标/重量如实标注)。
- **`ensure_base.sh`**:删除 `SKILL_NO_BASE=1` 静默降级(设置即报错 exit 1),默认版本 `0.34.1→0.41.0`,下载失败报错退出。

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The supplied code implements a software portability auditing tool, not processing of renovation schedules, quantity calculations, or decorative cost estimates. Its primary inputs are source files and native-library directories, and its outputs are lint findings and exit statuses. Although linting can support software development generally, this standalone tool has a materially different primary purpose from the declared estimating capability. The visible code reads local files and prints findings; it does not execute the suggested fix commands.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

CAD-reading support is relevant to decoration estimation, and dependency discovery alone would be a supporting implementation detail. However, this script also automatically downloads, installs, and potentially executes external software—material side effects not disclosed by the description or declared permissions. Its integrity and version checks reduce installation risk but do not resolve that disclosure mismatch. The supplied chunk does not establish what the external runtime script itself does.

Content

No source excerpt is available for this finding.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/cad_measure_to_input.py (reported line 65)May include surrounding context.

python
"""用 cad-file-reader 的 cad_validate.sh 校验交接 JSON。

    默认校验路径不再返回 None 静默跳过:底座/校验器缺失直接抛
    ValidationUnavailable,由 main 退出 1;仅显式 --no-validate 才跳过。
    """
    base = os.environ.get("CAD_SKILL_DIR")
    if not base:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/cad_measure_to_input.py (reported line 410)May include surrounding context.

python
parser.add_argument("--validate", dest="validate", action=argparse.BooleanOptionalAction,
                        default=True,
                        help="导入前用 cad-file-reader 校验交接 JSON;缺底座/校验器 exit 1。"
                             "仅显式 --no-validate 才跳过并标 validation=skipped")
    args = parser.parse_args()

    source = Path(args.measurements).expanduser().resolve() if args.measurements else None

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/tests/test_cad_measure_to_input.py (reported line 31)May include surrounding context.

python
src = root / "measure.json"
            out = root / "decor.csv"
            src.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8")
            proc = subprocess.run([sys.executable, str(SCRIPT), "--measurements", str(src), "--out", str(out), "--floor", "二层", "--no-validate"], capture_output=True, text=True)
            self.assertEqual(proc.returncode, 0, proc.stderr)
            with out.open(encoding="utf-8-sig") as handle:
                rows = list(csv.DictReader(handle))

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/tests/test_cad_measure_to_input.py (reported line 61)May include surrounding context.

python
src.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8")
            desc.write_text(json.dumps(descriptive, ensure_ascii=False), encoding="utf-8")
            proc = subprocess.run([sys.executable, str(SCRIPT), "--measurements", str(src),
                                   "--descriptive", str(desc), "--out", str(out), "--floor", "二层", "--no-validate"],
                                  capture_output=True, text=True)
            self.assertEqual(proc.returncode, 0, proc.stderr)
            with out.open(encoding="utf-8-sig") as handle:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/tests/test_cad_measure_to_input.py (reported line 91)May include surrounding context.

python
src = root / "finish.json"
            out = root / "decor.csv"
            src.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8")
            proc = subprocess.run([sys.executable, str(SCRIPT), "--interior-finish", str(src), "--out", str(out), "--floor", "三层", "--no-validate"], capture_output=True, text=True)
            self.assertEqual(proc.returncode, 0, proc.stderr)
            with out.open(encoding="utf-8-sig") as handle:
                rows = list(csv.DictReader(handle))

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/tests/test_cad_measure_to_input.py (reported line 118)May include surrounding context.

python
proc = subprocess.run([
                sys.executable, str(SCRIPT), "--measurements", str(src),
                "--notes-text", str(notes), "--out", str(out), "--floor", "四层",
                "--no-validate",
            ], capture_output=True, text=True)
            self.assertEqual(proc.returncode, 0, proc.stderr)
            with out.open(encoding="utf-8-sig") as handle:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/cad_measure_to_input.py (reported line 80)May include surrounding context.

python
raise ValidationUnavailable(
            "找不到 cad-file-reader,无法执行 --validate。"
            "安装:skillhub install cad-file-reader --namespace user_43faedd6;"
            "确有离线交付需要时显式加 --no-validate,并在输出标 validation=skipped。")
    validator = Path(base) / "scripts" / "cad_validate.sh"
    if not validator.exists():
        raise ValidationUnavailable(

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

python
if not validator.exists():
        raise ValidationUnavailable(
            f"cad-file-reader 缺少校验器:{validator}。请升级到 >=0.41.0;"
            "确有离线交付需要时显式加 --no-validate。")
    try:
        r = subprocess.run(
            ["bash", str(validator), str(input_path)],

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/cad_measure_to_input.py (reported line 441)May include surrounding context.

python
validation = "skipped"
        for row in rows:
            row["需核对"] = "是"
            row["说明"] = "未执行 CAD交接校验(--no-validate);" + row["说明"]

    target.parent.mkdir(parents=True, exist_ok=True)
    with target.open("w", encoding="utf-8-sig", newline="") as handle:

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/tests/test_cad_measure_to_input.py (reported line 155)May include surrounding context.

python
src.write_text(json.dumps(payload, ensure_ascii=False), encoding="utf-8")
            env = {"PATH": "/usr/bin:/bin", "CAD_SKILL_DIR": str(root / "not-exists")}
            proc = subprocess.run([sys.executable, str(SCRIPT), "--measurements", str(src),
                                   "--out", str(out), "--floor", "二层", "--no-validate"],
                                  capture_output=True, text=True, env=env)
            self.assertEqual(proc.returncode, 0, proc.stderr)
            summary = json.loads(proc.stdout)

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 · scripts/self_test.py (reported line 59)May include surrounding context.

python
def run(cmd: list[str], cwd: Path) -> tuple[int, str]:
    import os as _os
    env = dict(_os.environ)
    env["PYTHONIOENCODING"] = "ascii"
    env["PYTHONUTF8"] = "1"
    r = subprocess.run(cmd, cwd=str(cwd), env=env, capture_output=True, text=True)

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 standalone trigger “装修” (renovation) can activate the skill for general renovation requests unrelated to quantity takeoff.

Medium
Category
Trigger Abuse
Confidence
91% confidence
Finding

“装修” encompasses everyday requests about renovation design, styles, or advice, whereas this skill generates quantity estimates and material plans. The description’s settlement disclaimer limits the use of its outputs but does not exclude these unrelated requests from activation.

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

python
base = os.environ.get("CAD_SKILL_DIR")
    if not base:
        for d in (Path(__file__).resolve().parent.parent.parent / "cad-file-reader",
                  *sorted(Path.home().glob(".workbuddy/skills/*/cad-file-reader")),
                  Path.home() / ".claude/skills/cad-file-reader",
                  Path.home() / ".codex/skills/cad-file-reader"):
            if d.is_dir():

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

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

python
f"cad-file-reader 缺少校验器:{validator}。请升级到 >=0.41.0;"
            "确有离线交付需要时显式加 --no-validate。")
    try:
        r = subprocess.run(
            ["bash", str(validator), str(input_path)],
            capture_output=True, text=True, timeout=120,
        )

Tainted flow: 'validator' from os.environ.get (line 81, 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_measure_to_input.py (reported line 87)May include surrounding context.

python
f"cad-file-reader 缺少校验器:{validator}。请升级到 >=0.41.0;"
            "确有离线交付需要时显式加 --no-validate。")
    try:
        r = subprocess.run(
            ["bash", str(validator), str(input_path)],
            capture_output=True, text=True, timeout=120,
        )

CAD imports populate practice codes despite the module's explicit promise to leave them blank.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The module documentation at L005 says imported CAD rows keep 做法编号 empty, but L226–L231 copy practice_codes into that field; L295–L300 also populate it from reference candidates. Review flags remain enabled, but the documented boundary against pre-binding practice identifiers is not maintained.

Content

No source excerpt is available for this finding.

Default validation can be skipped without --no-validate, contrary to the documented validation guarantee.

Medium
Category
Excessive Agency
Confidence
98% confidence
Finding

Default validation checks only the measurements input; interior-finish and descriptive JSON are converted without equivalent validation. An interior-finish-only import can therefore report validation.ok=true despite running no validator, potentially misleading downstream users about checks performed on attacker-supplied candidate data, although mandatory review labels limit the impact.

Content

No source excerpt is available for this finding.

The documented integrity gate admits formal contracts without a hash to verify.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

Even with require_hash=True, a missing embedded hash produces only a warning, while self-declared reader/bus provenance and any nonempty contract ID can qualify the document for formal ledgers. An attacker can omit the hash and forge those fields to promote modified quantities; computing a fresh digest records the submitted bytes but does not authenticate their origin or integrity.

Content

No source excerpt is available for this finding.

The estimating skill automatically downloads and installs another skill outside its own directory.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

When the dependency is missing, this script automatically downloads it, installs it outside the estimating skill, and may execute its runtime bootstrap without an explicit installation opt-in. HTTPS, version checks, and a checksum reduce corruption risk, but a checksum fetched from the same release source does not protect against a compromised publisher supplying both malicious code and matching checksums.

Content

No source excerpt is available for this finding.