Back to skill

Security audit

LLM Evaluation Toolkit(LLM评测工具链)

Security checks for vulnerabilities and agentic risk

Overview

This is an offline LLM evaluation toolkit whose local file operations match its stated purpose, but its bundled security audit has copy-paste errors and should not be relied on as assurance.

Use this as a local, offline evaluation helper and run it on copies of evaluation data with explicit output paths. Do not treat the included SECURITY_AUDIT.md as authoritative until it is regenerated for this exact package, and review the Chinese-first documentation/output if that affects your environment.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (1)

T09 · Insecure Skill Coding Practices

Note
Location
verify/eval_toolkit_quality_test.py:62
Finding

Predictable Shared Temporary File Permits Symlink-Based File Creation Redirection

Content
View full analysis

Vulnerability Details

File Location: verify/eval_toolkit_quality_test.py, lines 62–63; related file-creation logic in tools/eval_toolkit.py, lines 26–31
Vulnerability Type: Predictable temporary file and time-of-check/time-of-use weakness
Risk Level: Low

Vulnerable Code

python
rc, out = run_tool([
    "dataset", "--action", "init",
    "--out", "/tmp/evalset_t.jsonl"
])

The invoked implementation uses a separate existence check followed by a symlink-following write:

python
def dataset_init(out):
    if os.path.exists(out):
        print(f"Error: {out} already exists (not overwritten).")
        return 2
    with open(out, "w", encoding="utf-8") as f:
        f.write(DATASET_TEMPLATE + "\n")

Technical Analysis

The verification script uses the globally predictable path /tmp/evalset_t.jsonl. Shared temporary directories are normally writable by other local users, so an attacker can prepare this path before the verifier runs.

The target creation logic first calls os.path.exists() and later calls open() in write mode. These are separate filesystem operations, creating a time-of-check/time-of-use window. Furthermore, open() follows symbolic links.

A pre-existing regular file or symlink to an existing file causes the test to fail because os.path.exists() returns true. More importantly, a dangling symbolic link can pass the existence check because os.path.exists() returns false when the link target does not exist. The subsequent open() follows that link and creates the fixed dataset template at the attacker-selected destination, provided the victim has permission to create that destination.

Attack Path

  1. A local attacker determines that the verifier uses /tmp/evalset_t.jsonl.
  2. The attacker creates a dangling symbolic link at that path whose target is another nonexistent path writable or creatable by the victim:
    bash
    ln -s /victim-writable-directory/attacker-selected-file /tmp/evalset_t.j
    

...[truncated 1055 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace the fixed shared path with a securely generated private temporary directory:

    python
    import tempfile
    
    with tempfile.TemporaryDirectory(prefix="eval-toolkit-test-") as temp_dir:
        output_path = os.path.join(temp_dir, "evalset.jsonl")
        rc, out = run_tool([
            "dataset", "--action", "init",
            "--out", output_path,
        ])
    
  2. Make dataset creation atomic by replacing the existence-check/write sequence with exclusive creation:

    python
    def dataset_init(out):
        try:
            with open(out, "x", encoding="utf-8") as f:
                f.write(DATASET_TEMPLATE + "\n")
        except FileExistsError:
            print(f"Error: {out} already exists (not overwritten).")
            return 2
        return 0
    
  3. Where supported, harden low-level creation against symbolic-link traversal by using os.open() with os.O_CREAT | os.O_EXCL and os.O_NOFOLLOW, then wrap the descriptor with os.fdopen().

  4. Ensure test artifacts are removed automatically, including when a test fails or times out.

  5. Avoid hardcoded names in globally writable directories in all future verification cases.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (16)

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The audit report claims to assess ai-eval-toolkit, but the documented scope and capabilities do not match the actual skill. A mismatched security audit can mislead users and reviewers into trusting a package based on analysis of different software, creating a serious integrity and supply-chain assurance failure.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The detailed findings mention AI governance commands unrelated to the stated evaluation toolkit, indicating the report may have been copied from another project or attached to the wrong artifact. This undermines the credibility of the security review and can conceal real risks by presenting irrelevant 'clean' results as evidence of safety.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared behavior in SKILL.md describes an offline LLM evaluation toolkit, but the analyzed implementation reportedly performs different functions, including security radar visualization and handling benchmark/result data outside the stated scope. This mismatch is dangerous because reviewers and users may grant trust or permissions based on the benign description while the actual code executes materially different logic, which is a classic avenue for hidden or unexpected behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Line L04 requires all external releases to use the specific branding form 「注册老炮」 and forbids other identity forms. This is a natural-language policy constraint that enforces a fixed naming/locale presentation without offering user choice or documenting a region-specific necessity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown file is entirely written in Chinese, including headings, findings, and usage guidance, with no indication that language selection is optional or that the document is intended only for a Chinese-speaking or region-specific audience. Under the policy, imposing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The recommendations and final usage conclusion describe the package as different software than the manifest, so the report's safety conclusion is not reliable for this skill. Even if unintentional, a false assurance statement can cause operators to lower scrutiny and deploy unreviewed functionality.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
79% confidence
Finding

The skill advertises runnable local tooling and includes command examples invoking a Python script, but the manifest declares no explicit tool permissions or allowed-tool scope. If the underlying implementation can read/write files, invoke shell commands, or access the network, this creates an authorization gap: users and platforms cannot accurately constrain or review what the skill may do.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The manifest uses Chinese-only natural-language metadata for the package and author fields, which indicates a fixed language/locale context. Under the policy, locale-specific language constraints should either offer user choice or be clearly documented as justified; this manifest provides neither.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and all user-facing CLI messages are written exclusively in Chinese, indicating the skill is designed to operate in a single language. There is no natural-language indication that users may choose another language or that the locale restriction is justified by a region-specific use case.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The module docstring is written entirely in Chinese and presents the skill as a general evaluation toolkit, but there is no indication that the language choice is optional or limited to a China-specific context. 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 · verify/eval_toolkit_quality_test.py (reported line 23)May include surrounding context.

python
def run_tool(args, timeout=30):
    try:
        r = subprocess.run([PY, os.path.join(TOOLS, "eval_toolkit.py")] + args,
                           capture_output=True, text=True, timeout=timeout)
        return r.returncode, r.stdout or ""
    except Exception as e:

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

The document is entirely written in Chinese and does not indicate that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint 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
94% confidence
Finding

This file contains natural-language descriptions and console output in Chinese only, including the module docstring and later output strings. Under the policy rule, forcing a specific language without user opt-in is a locale/language policy issue, and no alternative language selection or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The dimension labels, series names, chart title, footer text, and printed status messages are all hard-coded in Chinese. Because the file provides no user choice of language and no clear region-specific justification, this appears to violate the natural-language locale policy for all file types.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This SVG contains all visible labels and captions in Chinese, including axis labels, legend text, and the footer, with no indication that the language is optional or that the asset is intended only for a Chinese-specific context. The policy requires flagging natural-language locale constraints when a specific language is imposed without user opt-in or clear justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This JSON file includes user-facing natural-language content entirely in Chinese, such as the note field and many labels/check names, with no indication that language selection is optional or region-specific. Under the policy for natural-language issues, forcing a specific language without user opt-in can be a locale-policy violation.

Content

No source excerpt is available for this finding.