Back to skill

Security audit

内审不符合项判定技能

Security checks for vulnerabilities and agentic risk

Overview

The skill is a local audit-record tool, but it ships detailed plaintext audit records inside the package, so users should review data exposure before installing.

Install only if you are comfortable with the bundled audit records being visible to anyone who can access the skill package. Prefer a version that ships an empty or clearly synthetic datastore, stores live records outside the install directory, and documents retention, permissions, and deletion practices.

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

Warning
Location
assets/nc_data.json:4
Finding

Operational audit records distributed in a plaintext asset

Content
View full analysis

Vulnerability Details

File Location: assets/nc_data.json, lines 4–1349
Vulnerability Type: Plaintext sensitive-data exposure
Risk Level: Medium

Evidence

The packaged JSON datastore contains 50 populated operational audit records. The following security-safe excerpt preserves representative identifiers while omitting the non-English descriptive content:

json
{
  "non_conformances": [
    {
      "id": "NC-20260629-001",
      "clause": "7.5.3",
      "category": "minor",
      "verification": {
        "status": "open",
        "verifier": "",
        "verified_at": "",
        "result": ""
      },
      "audit_info": {
        "audit_date": "2026-06-26"
      },
      "created_at": "2026-06-29T18:56:29.505142"
    }
  ]
}

The complete affected range additionally contains plaintext titles, detailed findings, evidence descriptions, department names, internal audit identifiers, equipment and project identifiers, internal system names, safety observations, and audit conclusions.

Technical Analysis

The Skill stores its working data inside a distributable project asset rather than in an external, access-controlled runtime data location. The asset is populated with operational records instead of an empty schema or clearly synthetic test fixtures.

No code execution is required to expose the information. Any party able to obtain the Skill package can directly parse or read the JSON file. Because the data documents internal process weaknesses and safety or quality findings, package distribution unintentionally expands access beyond the intended audit users.

The reviewed scripts do not transmit this information over a network, and no credentials or authentication secrets were found. The vulnerability is therefore a local disclosure caused by insecure packaging and data-storage practices, not active exfiltration.

Attack Path

  1. An attacker or unauthorized recipient obtains a copy of the Skill package.
  2. The recipient opens ...[truncated 1025 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove all operational audit records from the distributable Skill package.
  2. Ship assets/nc_data.json as an empty schema, for example:
json
{
  "non_conformances": [],
  "audit_ids": []
}
  1. Store live audit data outside the Skill installation directory in a dedicated runtime data location.
  2. Restrict datastore permissions to the specific user or service account that operates the Skill.
  3. Separate production data from documentation, source code, demonstrations, and release artifacts.
  4. If examples are required, use explicitly synthetic records that do not reference real departments, systems, equipment, dates, projects, or findings.
  5. Add the live datastore path to source-control and package exclusion rules.
  6. Add a release-time sensitive-data scan that rejects populated audit datasets and other confidential operational records.
  7. Define retention, deletion, backup, and access-control requirements for audit records.
  8. Consider encryption at rest where the runtime threat model includes unauthorized filesystem access.
  9. Review previously distributed copies of the Skill and revoke access or remove exposed artifacts where feasible.
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

声明描述的是一个较完整的“内审不符合项判定与验证工具”,覆盖录入、判定、跟踪验证、报告生成等多个场景。而代码实际只包含判定逻辑:读取本地 nc_data.json,按关键词/正则和条款权重对不符合项进行建议分类,并输出结果。虽然“基于ISO条款辅助判定性质”这一部分与声明一致,但其余核心能力(录入、状态跟踪、报告生成)均未体现。因此描述对功能范围有明显夸大,属于描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

声明描述的是一个较完整的内审不符合项判定与验证管理工具,涵盖录入、条款辅助判定、状态跟踪和报告生成等能力。但提供的代码片段只是一个查询脚本:读取 assets/nc_data.json,本地筛选 non_conformances,并以简要或详细格式输出结果。它没有任何写入、判定、报告生成或工作流更新逻辑。虽然“跟踪验证状态”可被宽泛理解为查看状态,该代码也仅限于筛选展示,无法支撑声明中的主要能力,因此描述与实际行为存在明显不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill documentation describes local scripts that read and write audit records to assets/nc_data.json, but the frontmatter declares no explicit tool scope such as permissions or allowed-tools. This creates a governance gap: an agent or reviewer cannot easily determine that the skill performs persistent file I/O, increasing the chance of unintended data writes or over-broad execution in environments with sensitive local files.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger conditions are broad (审核现场记录不符合项/审核结束后汇总分析/不符合项整改验证) and do not define clear invocation boundaries or exclusions. In agentic environments, vague triggers can cause the skill to be selected in unrelated contexts, leading to unnecessary access to audit data or unintended file-writing operations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The documentation says the script will automatically create and use assets/nc_data.json to store non-conformance records, but it does not prominently warn users that business audit data will be persisted locally. This can lead to unintentional storage of sensitive compliance evidence, verification notes, or personal names on disk without informed consent or retention controls.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This manifest-style JSON stores all human-readable titles and descriptions exclusively in Chinese, with no indication that the skill is China-specific or that users can choose another language/locale. Under the policy, forcing a specific language without opt-in is a natural-language policy concern even in config/data files.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s docstrings and all user-facing report text are written exclusively in Chinese, and the command-line interface does not provide any option to select another language. This is a natural-language policy concern because it imposes a specific language on all users without opt-in or documented regional justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

L055-L056将该函数描述为“生成系统性改进建议”,且L059-L061注释说明会“基于严重不符合”给出建议,但代码实际检查的是stats.get('major', 0)。然而前面的统计结果并未生成major键,严重不符合数量实际存放在stats['by_category']中,因此该分支不会按注释和函数意图工作。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code file contains natural-language strings that force a specific language/locale for the script's description and interaction. Under the policy, language constraints should either be optional for the user or clearly justified as region-specific; neither is present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The argparse help text and printed status/output messages are all fixed in Chinese, which creates a language policy issue when no user choice or documented locale restriction is provided. This is a natural-language policy concern rather than a functional bug.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The title and all content are written exclusively in Chinese, with no indication that the user can choose another language or that the file is intentionally limited to a Chinese-speaking or region-specific context. Under the policy, language constraints should be optional or explicitly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains user-facing natural language in the module docstring, argparse description, help text, and success message entirely in Chinese. Under the policy, forcing a specific language without user opt-in can be a natural-language policy violation when no alternative language option or justification is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code file contains user-facing natural-language descriptions exclusively in Chinese in the module docstring and CLI help text. Under the policy rule, forcing a specific language without offering a choice or documenting a justified locale constraint is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module docstring and user-facing descriptions are written only in Chinese, and the CLI help/messages throughout the script also assume Chinese as the required interaction language. Under the policy, forcing a specific language without user opt-in is a natural-language policy issue unless the locale constraint is explicitly justified.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.