Back to skill

Security audit

检验气泡标注

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its advertised drawing-annotation purpose, but it executes a user-provided Python dimension file during processing, so it needs review before installation.

Install only if you are comfortable with a local Python workflow that reads drawings and writes generated reports. Treat any dims_table.py passed to the skill as executable code: use only files you created or trust, avoid third-party dimension files, run in a contained workspace, and manually review the generated annotations and inspection workbook before operational use.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (24)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description is for a full-featured integrated inspection-bubble and reporting system for mechanical drawings. The supplied code chunk is only a narrow helper script: it accepts a labels JSON file and a regex/pattern, filters label entries by text, and prints coordinates and metadata. This is at most a supporting developer utility for locating existing OCR labels, not the advertised primary functionality. There is no rendering, annotation generation, report generation, OCR execution, tolerance handling, or output file creation. Therefore the code chunk materially differs from the declared purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The declared description presents an end-to-end drawing ballooning and inspection-report generation tool with OCR, rendering, annotation placement, and multi-output generation (PDF, PNG, merged 5-sheet workbook). The supplied code chunk does not implement those primary capabilities. It assumes balloon data already exists in balloons.json, maps that data into inspection items, assigns gauge/method/priority levels, and calls an external Excel builder to generate a 3-table inspection record workbook. While this is related to the broader inspection-report workflow, it is only a downstream report-construction component, not the integrated balloon-annotation/OCR tool described. Therefore the description materially overstates what this code chunk actually does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
88% confidence
Finding

The skill describes shell execution and file-writing workflows but does not declare any explicit tool scope or allowed-tools boundary. This creates an authorization gap where an agent may invoke broader filesystem or shell capabilities than intended, increasing the blast radius if the skill is triggered on untrusted inputs or behaves unexpectedly.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation phrases are broad enough that the skill could be invoked for loosely related requests involving drawings, QC, OCR, or Excel reporting. In an agentic environment with shell and file-write capabilities, ambiguous triggering can cause unintended processing of sensitive files, unnecessary command execution, or accidental takeover from a more appropriate and safer skill.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The 'when to use' section only states broad positive triggers and lacks guardrails for when not to activate. This increases the chance of overbroad routing, especially because the skill prescribes multi-step shell workflows over user-supplied files, making unintended invocation more operationally risky in context than a normal documentation issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill name, description, author labeling, and tags are entirely in Chinese, and the manifest provides no indication that other languages are supported or that the Chinese-only scope is an intentional, documented locale constraint. Under the policy for natural-language violations, forcing a specific language without user opt-in can be a locale policy issue.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The section requires Chinese drawings to proceed without translation and foreign-language drawings to produce a Chinese-English glossary, with examples and output structure centered on Chinese terminology. This effectively enforces a specific language/locale behavior without explicit user opt-in or an offered language preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The title and operating instruction are entirely in Chinese, and L003 instructs the agent how to use the file without indicating that another language may be used on request. This can violate language/locale policy when a skill implicitly forces a specific language without user opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file's operational instructions and required reply content are entirely in Chinese, which effectively forces a specific language for use of the skill. The policy allows language constraints only when the skill offers user choice or clearly documents a justified regional/locale limitation, neither of which appears here.

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

python
cmd = [PY, os.path.join(HERE, script)] + args
    print(f"\n=== [{step}] {script} ===")
    t0 = time.perf_counter()
    r = subprocess.run(cmd, cwd=BASE, capture_output=True, text=True, encoding="utf-8")
    dt = time.perf_counter() - t0
    timings[step] = dt
    out = (r.stdout or "") + (r.stderr or "")

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s primary natural-language documentation is entirely in Chinese, including the script description and usage details, with no indication that other languages are supported. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

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

python
def run(cmd):
    print(">>", " ".join(cmd))
    r = subprocess.run(cmd, capture_output=True, text=True)
    if r.returncode != 0:
        print("!! 失败:", r.stderr[-800:])
    return r.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/batch_run.py (reported line 94)May include surrounding context.

python
c = ws.cell(r, i, v); c.border = BORD
            c.alignment = Alignment(horizontal="left" if i in (1,2,10,11,12) else "center", vertical="center", wrap_text=True)
    for i, w in enumerate([16, 30, 8, 8, 7, 9, 9, 8, 9, 40, 36, 36], 1):
        ws.column_dimensions[__import__("openpyxl.utils", fromlist=["get_column_letter"]).get_column_letter(i)].width = w
    out = os.path.join(a.out_base, "总汇总表.xlsx")
    wb.save(out)
    print("saved 总汇总表:", out, "| 图号数:", len(rows))

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The script dynamically loads and executes a Python module from the user-supplied --dims path via importlib and exec_module. Any attacker-controlled file passed as --dims will run arbitrary Python code with the privileges of the process, which is full code execution rather than simple data loading. In this skill context, the argument is supposed to be drawing dimension data, so treating it as executable code is unnecessarily dangerous.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language instructions and status output in Chinese, which imposes a specific language on users without offering any locale selection or opt-in. The policy explicitly calls out forced language or locale as a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script writes review notes and prints console messages only in Chinese, with no indication that users can choose another language or that the skill is intentionally limited to a Chinese-language context. This creates a language policy issue for general-use skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The natural-language instructions and user-facing CLI descriptions specify behavior entirely in Chinese, including output naming and sheet labels, with no indication that users can opt into another language. Per the policy, forcing a specific language without user choice is a locale-policy issue unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This markdown file is entirely written in Chinese and does not indicate that language selection is optional or user-configurable. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

The module docstring, command help text, and operational status messages are written entirely in Chinese, which imposes a specific language on users. The file does not indicate that language selection is optional or that the skill is intentionally limited to a Chinese-only regional/compliance context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The natural-language interface, usage, and help descriptions in this file are entirely Chinese, and the file does not indicate that language selection is optional or region-specific. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and all generated workbook sheet names, headers, and labels are hard-coded in Chinese, establishing a fixed locale for the skill's user-facing behavior. Under the policy rule, a forced language without user opt-in is a natural-language policy concern unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The docstring instructions and field descriptions are entirely in Chinese, which imposes a specific language on users of the skill file. Under the policy, forcing a language without user opt-in or documented justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file contains user-facing natural-language text in a single fixed language, including the module description and usage guidance. The stated policy for this category flags locale or language constraints when they are imposed without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and argument help text are written entirely in Chinese, which imposes a specific language on users of the skill. Under the policy, language constraints should either be optional/opt-in or clearly justified as region-specific; no such choice or justification appears here.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dynamic_code_execution

Dynamic code execution detected.

Critical
Code
suspicious.dynamic_code_execution
Location
scripts/build_balloons.py:31