Back to skill

Security audit

Academic Figures — Publication-Ready Research Figures from a Single Command

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious because it reports shell execution risks in tests, unpinned installation sources, and capabilities beyond the stated charting scope; some files were only partially analyzed.

The scanner recommendation is not to install. Before considering it, review the shell execution findings and obtain a fresh, complete scan after those risks and the partial analysis are addressed. Also verify the Git revision and dependency versions, and check whether its network based setup or raw input reproducibility bundles fit your security and privacy needs.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (355)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The charting behavior largely matches the declared purpose, and the local audit/reproducibility files are supporting implementation details. However, gen_diagram and gen_flow accept labeled blocks or nodes and arrows or edges, automatically lay them out, and render them without requiring scientific measurements or other quantitative data. Both are exposed in the generator registry. This directly conflicts with the explicit instruction to skip diagrams with no data behind them. No network transmission is visible in this chunk, but the full skill's locality guarantee cannot be verified from this excerpt alone.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The code's primary function is converting textual flow diagrams, which falls within the description's explicit exclusion of diagrams with no data behind them. Although this parser could support a larger figure-generation package, general Mermaid flowchart interoperability is an undeclared capability that conflicts with that stated scope. Its local-only behavior is consistent with the description.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description explicitly says to skip diagrams with no data behind them. However, the code imports gen_diagram and gen_flow, recommends diagrams for blocks-and-arrows structures, and validates diagram/flow inputs based on blocks or nodes rather than scientific measurements. It also exposes --from-mermaid and flow-specific routing and geometry options. This is a substantive additional capability beyond the declared scope, not merely a supporting rendering detail. Most other visible behavior aligns with the description. Imported modules and the truncated main function prevent full verification of every advertised feature or the absolute local-only guarantee.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Most of the tests support the declared scientific-figure purpose and are not mismatches merely because they read files or launch rendering subprocesses. However, TestV80000 through TestV80900 exercise a substantial additional diagramming capability: node-and-edge flowcharts, process templates, swimlanes, and end-to-end --from-mermaid rendering. These examples use labels and workflow relationships rather than plotted data, directly conflicting with the stated instruction to skip diagrams with no data behind them. The chunk provides test-level evidence of this capability, not the full renderer implementation.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 276)May include surrounding context.

md
background + verifier pipeline: `references/pitfalls.md`. Regression: `python3 tests/run_tests.py`.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 403)May include surrounding context.

md
(incl. `realworld/`), `tests/run_tests.py` (full suite). Remaining references:

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 383)May include surrounding context.

md
| Copy-paste scenario cards (13 complete workflows) | `references/scenario-cards.md` |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 398)May include surrounding context.

md
| Version history | `references/changelog.md` (version index + last-3 details; full archive in `references/changelog-full.md`) |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 408)May include surrounding context.

md
gual history: `references/changelog.md` (index + recent details; full archive: `references/changelog-full.md`). Recent: **v8.0.4** role palette + snake layout +

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 404)May include surrounding context.

md
`clinical-lab-trends.md`, `reverse-engineering-colors.md`, `v1.5-upgrade-analysis.md` (archive).

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

python
return None
    if gen >= allowed:
        return None
    env = dict(os.environ)
    env["AF_RETRY_N"] = str(gen + 1)
    env["AF_WD_BUDGET_SCALE"] = f"{1.5 ** (gen + 1):.6f}"
    print(f"WARNING: 瞬时失败(exit {code})——自动重试第 {gen + 1}/{allowed} 次"

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

python
self.assertIn("-t", r.stdout)

    def test_wizard_interactive_pipe_generates_command(self):
        env = dict(os.environ, AF_WIZARD_FORCE="1")
        r = subprocess.run([sys.executable, GEN, "--wizard"],
                           capture_output=True, text=True, timeout=60,
                           input="1\n1\n1\n\n", env=env)

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

python
self.assertIn("-o figure.png", r.stdout)

    def test_wizard_eof_falls_back_to_defaults(self):
        env = dict(os.environ, AF_WIZARD_FORCE="1")
        r = subprocess.run([sys.executable, GEN, "--wizard"],
                           capture_output=True, text=True, timeout=60,
                           input="", env=env)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

Example JSON _command metadata crosses directly into shell execution. A malicious example edit can inject commands before the retained -o argument and execute with developer or CI permissions; this is the same underlying issue as the AST4 finding at this location.

Content

Scanner excerpt · tests/run_tests.py (reported line 4054)May include surrounding context.

python
e in ("realworld_rct_response.json", "realworld_omics_volcano.json",
                     "realworld_survival_km.json", "realworld_oncology_waterfall.json"):
            fp = os.path.join(base, "examples", "realworld", name)
            d = json.load(io.open(fp, encoding="utf-8"))
            cmd = d["_command"]
            # 相对路径以仓库根为工作目录执行;-o 落到临时目录
            with tempfile.TemporaryDirectory() as td:
                cmd = cmd.rsplit("-o ", 1)[0] + "-o " + os.path.join(td, "out.png")
                r = subprocess.run(cmd, shell=True, cwd=base,
                                   capture_output=True, text=True, timeout=240)
                self.assertEqual(r.returncode, 0, f"{name}: {r.stderr[-250:]}")
                self.assertTrue(os.path.exists(os.path.join(td, "out.png")), name)


    def test_v470_scenario_docs_and_realworld(self):
        """场景化指导文档(color-guide/combo-guide)与真实科研场景示例在包内。"""
        base = os.path.join(SCRIPT_DIR, "..")
        for rel in ("references/color-guide.md", "references/combo

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The swimmer tests execute template/example _command fields with shell=True. An attacker-controlled fixture can introduce arbitrary shell operations despite the output-path rewrite; this duplicates the AST4 finding at the same sink.

Content

Scanner excerpt · tests/run_tests.py (reported line 4509)May include surrounding context.

python
n (os.path.join("templates", "swimmer.json"),
                     os.path.join("examples", "realworld",
                                  "realworld_csle_swimmer.json")):
            with io.open(os.path.join(base, name), encoding="utf-8") as fh:
                cmd = json.load(fh)["_command"]
            # -o 重定向到临时目录:逐字执行但产物不落 trunk(v5.6 哨兵泄漏教训机制化)
            with tempfile.TemporaryDirectory() as td:
                cmd = cmd.rsplit("-o ", 1)[0] + "-o " + os.path.join(td, "out.png")
                r = subprocess.run(cmd, shell=True, cwd=base,
                                   capture_output=True, text=True, timeout=240)
                self.assertEqual(r.returncode, 0, f"{name}: {r.stderr[-250:]}")
                self.assertNotIn("未知字段", r.stderr, name)

    def test_swimmer_realworld_self_consistency(self):
        """realworld 数据程序化自洽断言(v4.8 RECIST 断言器同纪律)。"""
        base = os.path.normpath(os.path.join(SCRIPT_DIR, ".."))
        with io.open(os.path.join(base, "examples", "realworld",

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The ridgeline template's _command field is interpreted as shell code. A modified JSON template can execute arbitrary operations with the test runner's permissions; this is the same sink reported by AST4.

Content

Scanner excerpt · tests/run_tests.py (reported line 4638)May include surrounding context.

python
2], "B": [3, 4]}})
        self.assertTrue(any(t == "ridgeline" for _, t, _ in recs), recs)

    def test_ridgeline_template_command(self):
        base = os.path.normpath(os.path.join(SCRIPT_DIR, ".."))
        with io.open(os.path.join(base, "templates", "ridgeline.json"), encoding="utf-8") as fh:
            cmd = json.load(fh)["_command"]
        with tempfile.TemporaryDirectory() as td:  # 产物不落 trunk(哨兵纪律)
            cmd = cmd.rsplit("-o ", 1)[0] + "-o " + os.path.join(td, "out.png")
            r = subprocess.run(cmd, shell=True, cwd=base, capture_output=True, text=True, timeout=240)
        self.assertEqual(r.returncode, 0, r.stderr[-250:])

    def test_audit_sidecar_deterministic(self):
        with tempfile.TemporaryDirectory() as td:
            f = os.path.join(td, "a.json")
            io.open(f, "w", encoding="utf-8").write(json.dumps(
                {"labels": ["A", "B", "C"], "series": {"组1": [10, 20, 30], "组2": [5, 15, 25]}}))
            outs = []
            for i in range(2):

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
98% confidence
Finding

The dumbbell test promotes JSON command metadata into shell execution. Output redirection and timeouts do not prevent injected operations from accessing the runner's files or credentials; this duplicates the AST4 finding at this location.

Content

Scanner excerpt · tests/run_tests.py (reported line 4748)May include surrounding context.

python
[1, 2], "to": [3, 4]})
        self.assertTrue(any(t == "dumbbell" for _, t, _ in recs), recs)

    def test_dumbbell_template_command(self):
        base = os.path.normpath(os.path.join(SCRIPT_DIR, ".."))
        with io.open(os.path.join(base, "templates", "dumbbell.json"), encoding="utf-8") as fh:
            cmd = json.load(fh)["_command"]
        with tempfile.TemporaryDirectory() as td:  # 产物不落 trunk(哨兵纪律)
            cmd = cmd.rsplit("-o ", 1)[0] + "-o " + os.path.join(td, "out.png")
            r = subprocess.run(cmd, shell=True, cwd=base, capture_output=True, text=True, timeout=240)
        self.assertEqual(r.returncode, 0, r.stderr[-250:])
        self.assertNotIn("未知字段", r.stderr)

    def test_repro_bundle(self):
        """--repro 复跑交付包:五件齐+数据副本逐字节一致+命令逐字+幂等。"""
        with tempfile.TemporaryDirectory() as td:
            f = os.path.join(td, "r.json")
            io.open(f, "w", encoding="utf-8").write(json.dumps(
                {"labels": ["A", "B", "C"], "series": {"组1": [10, 20, 30], "组2":

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

python
(AF_TEST_RENDER_DELAY=0.6:代 0-2 预算 0.2/0.3/0.45 均 <0.6 必超时,代 3 预算 0.675>0.6 成功——
        任何机器确定性;此前的绝对秒数预算在快机(GitHub runner)上不触发=CI flaky 根因。)"""
        import os as _os
        _env = {**_os.environ, "AF_TEST_RENDER_DELAY": "0.6"}
        p = os.path.join(self.tmp, "retry_ok.png")
        r = subprocess.run([sys.executable, GEN, "-t", "bar", "-d", self.data,
                            "-o", p, "--timeout", "0.2", "--retries", "5"],

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

python
def test_retries_zero_disables(self):
        """--retries 0:超时单代失败 exit 5,无重试。"""
        import os as _os
        _env = {**_os.environ, "AF_TEST_RENDER_DELAY": "0.6"}
        p = os.path.join(self.tmp, "r0.png")
        r = subprocess.run([sys.executable, GEN, "-t", "bar", "-d", self.data,
                            "-o", p, "--timeout", "0.1", "--retries", "0"],

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

python
def test_retries_exhausted_exact_count(self):
        """重试用尽:仍 exit 5,重试次数恰为 --retries 值。"""
        import os as _os
        _env = {**_os.environ, "AF_TEST_RENDER_DELAY": "0.6"}
        p = os.path.join(self.tmp, "r1.png")
        r = subprocess.run([sys.executable, GEN, "-t", "bar", "-d", self.data,
                            "-o", p, "--timeout", "0.1", "--retries", "1"],

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.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_read, file_write, network, 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.

MCP server referenced without pinned version: 'uvx git'.

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The recommended uvx commands and persistent MCP configuration install and execute code from a Git repository without an immutable revision. A compromised repository or malicious upstream change could therefore execute with the local user's permissions, including access to research data; local rendering does not mitigate installation-time supply-chain exposure.

Content

No source excerpt is available for this finding.

Unbounded Resource Access

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.

Content

Scanner excerpt · mcp/server.py (reported line 120)May include surrounding context.

python
return cmd


def _run_engine(cmd, timeout=None):
    try:
        p = subprocess.run(cmd, capture_output=True, text=True,
                           timeout=timeout or RENDER_TIMEOUT, encoding="utf-8",