Back to skill

Security audit

检验抽样技能

Security checks for vulnerabilities and agentic risk

Overview

This skill performs local inspection-sampling data parsing, sampling, and reporting with disclosed local file reads and writes, though its documentation overstates some capabilities.

Install only if you are comfortable with a Chinese-language local sampling tool that writes JSON outputs and may retain audit records under ./sampling_records/. Do not rely on it for GB/T2828 compliance without independent validation, because the reviewed scripts implement generic sampling methods rather than the full standard.

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
  • 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 (13)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个面向检验抽样业务流程的技能,核心应包括抽样标准、方案设计、计划生成、记录管理或结果分析等业务逻辑。但提供的代码仅做输入文件解析与格式转换,支持CSV/Excel/JSON读取、字段提取、空值处理和JSON输出。这属于通用数据预处理能力,和“检验抽样全流程支持”的主要目的存在明显偏离。代码也未体现任何与GB/T2828相关的规则、抽样算法、质量检验标准或业务触发条件,因此应判定为描述与实际行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

描述宣称的是“检验抽样全流程支持”,并特别强调可设计抽样方案、处理待检数据、生成抽样计划、追踪记录、分析结果,以及覆盖 GB/T2828 等标准方法。但代码能力明显更窄:它不设计方案,而是从 ./sampling_schemes 目录加载已有 JSON 方案;不做原始待检数据解析或清洗,只读取已解析的数据文件;不做结果分析,只输出样本和简单元信息;标准方面也只实现了四种通用抽样算法(简单随机、分层、系统、整群),没有看到 GB/T2828 等检验抽样标准的接收/拒收规则、AQL、批量字码、样本量表等逻辑。虽然代码确实支持执行抽样并保存抽样记录,这与声明中的部分内容一致,但整体上声明比实际实现宽泛得多,且包含关键能力缺失,因此属于描述与行为不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill documents file reads and persistent writes under the user's working directory, but it does not declare any explicit tool scope such as permissions or allowed-tools. This creates a governance gap: an agent may execute filesystem-capable actions without clear least-privilege boundaries or user-visible authorization expectations.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger conditions include broad phrases like data sampling, quality spot checks, and related scenarios, which may cause the skill to activate in contexts the user did not intend. Unintended activation is risky here because the skill is documented to read input files and generate persistent output records, potentially causing unexpected file access or writes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The skill states that schemes and records are stored under the user's working directory, but it does not clearly warn users up front that execution creates persistent files and audit records. This can lead to silent data persistence, accidental retention of sensitive operational metadata, and user surprise in environments where local writes must be tightly controlled.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The module title and all user-facing descriptions are written only in Chinese, including the command-line argument descriptions and runtime messages elsewhere in the file. Under the stated policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly justified or the user is offered a language choice.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The manifest describes a skill for inspection sampling workflows such as designing sampling plans, handling inspection data, generating sampling plans, tracking sampling records, and analyzing results under standards like GB/T2828. This file instead implements a generic CSV/Excel/JSON parser that reads arbitrary tabular data and writes normalized JSON output, with no sampling-plan logic, standards handling, record tracking, or analysis behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code file contains user-facing natural language exclusively in Chinese, including the module description and later command-line help/error text, with no indication that the skill is region-specific or that another language is available. Per the policy, forcing a specific language without user opt-in is 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 CLI interface exposed to users is defined with Chinese-only help text, and the program also emits Chinese-language errors and status descriptions elsewhere in the file. Because the file does not state that it is a China-specific or Chinese-only tool, this imposes a locale choice on users and violates the language/locale policy.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

L144 的“纯文档/脚本技能,无外部依赖风险”与 L018 声明的第三方依赖 pandas、numpy 不一致。虽然这里的“外部依赖”可能意在表示无网络或远程服务依赖,但按文档字面含义,它与前文依赖说明形成了直接矛盾。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The title and entire specification are written in Chinese, and the format examples require Chinese field names such as '产品名称' and '检验结果'. This creates a language/locale constraint without any stated user opt-in or documented regional justification, which matches the policy-violation category for forced language or locale.

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 presents the skill description only in Chinese, and the rest of the user-facing argument descriptions and messages follow the same pattern. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern unless the locale limitation is explicitly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The module docstring states only that it is a data parser supporting CSV, Excel, and JSON files. That documented purpose is broader and more generic than the manifest's domain-specific inspection-sampling scope, indicating the implemented component is not meaningfully specialized to the claimed skill behavior.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.