Back to skill

Security audit

智慧招采专家Smart Procurement Expert

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Chinese procurement-assistant workflow with local document and pricing utilities, with some dependency and file-handling cautions.

Install only if you want a Chinese procurement and bidding workflow. Use pinned, reviewed versions of python-docx, pypdf, and docx where possible, keep backups of source bid documents, prefer explicit output paths for repair scripts, and manually verify any pricing, legal, or final-submission output before relying on it.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:181
Finding

Unpinned Third-Party Dependencies Create Supply-Chain and Reproducibility Risks

Content
View full analysis
--output config.json` (depends on python-docx) - Content filling: `python scripts/autofill_prepare.py --parsed config.json --content content.json --out bid_config.json` - Generate: `node scripts/generate_bid_template.js --config bid_config.json --out bid-document.docx` (depends on the docx package) - Price-rule extraction: `python scripts/extract_price_rules.py --out ./out` (PDF requires pypdf; txt has no dependencies; produces a draft price_config.json and price_config.review.md) ``` The PDF extractor also recommends an unconstrained installation in `scripts/extract_price_rules.py`, lines 52–55: ```python try: import pypdf # type: ignore except ImportError: sys.exit("[Error] Reading PDF requires pypdf. Run `pip install pypdf` first; " "or save the price-scoring section as a .txt file.") ``` ### Technical Analysis The project relies on the third-party packages `python-docx`, `pypdf`, and the npm package `docx`. No dependency manifest, lockfile, exact version constraint, integrity hash, or reviewed registry configuration is included in the audited directory. Consequently, installation instructions such as `pip install pypdf` resolve whichever release is current at installation time. The same project can therefore execute materially different dependency code across environments. If a dependency release or package-distribution account is compromised, malicious package code could execute during installation or import with the permissions of the user or Agent running the Skill. This finding does not establish that any currently named package is malicious. It identifies an uncontrolled supply-chain boundary and lack of reproducible dep ...[truncated 989 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/price_score.py:191
Finding

Pricing Engine Accepts Non-Finite and Invalid Financial Parameters

Content
View full analysis
dict: if args.config: with open(args.config, "r", encoding="utf-8") as f: spec = json.load(f) return spec # CLI quick mode quotes_raw = [x.strip() for x in (args.quotes or "").split(",") if x.strip()] prices = [float(x) for x in quotes_raw] names = [x.strip() for x in (args.names or "").split(",") if x.strip()] while len(names) < len(prices): names.append(f"Bidder {len(names)+1}") quotes = [Quote(name=names[i], price=prices[i]) for i in range(len(prices))] return { "method": args.method or "low_price_first", "full_score": float(args.full_score or 30), "base": {"mode": args.base_mode or "average"}, "deduction": {"above": float(args.ded_above or 0.5), "below": float(args.ded_below or 0.3)}, "interval": {"low": float(args.interval_low or 0), "high": float(args.interval_high or 0)}, "quotes": [{"name": q.name, "price": q.price} for q in quotes], } def run(spec: dict) -> PriceResult: method = spec.get("method", "low_price_first") full = float(spec.get("full_score", 30)) quotes = [Quote(name=q.get("name", "?"), price=float(q["price"])) for q in spec.get("quotes", [])] if not quotes: raise ValueError("spec.quotes is empty") ``` Related calculations also accept unchecked configuration values in `scripts/price_score.py`, lines 95–128 and 140–183: ```python k = float(base_cfg.get("k", 1.0)) w = float(base_cfg.get("w", 0.6)) ded_above = float(ded.get("above", 0.5)) ded_below = float(ded.get("below", 0.3)) ``` ### Technical Analysis The engine converts values to floating-point numbers but does not verify that they are finite or within valid business ranges. Python accepts values suc ...[truncated 2012 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/fix_xml.py:27
Finding

DOCX Repair Utility Non-Atomically Overwrites the Original Document

Content
View full analysis
' in text: # Only remove a bare <0/> tag between XML tags. new_text, n = BARE_ZERO_TAG.subn('', text) if n > 0: fixed_parts.append((name, n)) data = new_text.encode('utf-8') parts[name] = data with zipfile.ZipFile(output_path, 'w', zipfile.ZIP_DEFLATED) as zout: for name, data in parts.items(): zout.writestr(name, data) ``` ### Technical Analysis When no output path is supplied, the utility sets the output path to the input path and directly opens the original DOCX for writing. Opening the ZIP with mode `w` truncates the existing file before the reconstructed archive has been completely written and validated. If the process is interrupted, the filesystem becomes full, a write error occurs, or validation later fails, the original document may already have been replaced by a partial or corrupt archive. Validation is performed only after the destructive rewrite. This is particularly relevant because the documented one-argument invocation uses the unsafe in-place behavior by default. ### Attack Path 1. A user runs `python scripts/fix_xml.py document.docx` without specifying a separate output file. 2. The script reads the original ar ...[truncated 759 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a comprehensive procurement/tendering compliance assistant with workflow guidance, document drafting/review, legal routing, scoring, and knowledge-base features. The supplied code does none of that. It is a narrow maintenance script for repairing malformed XML inside DOCX files by removing illegal <0/> tags and validating the resulting XML. This is a materially different primary purpose and introduces file-processing behavior not represented in the description. While DOCX handling could be a supporting detail in a document-generation system, this specific code chunk is an unrelated low-level repair utility rather than implementing the declared assistant capabilities.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

声明描述的是一个覆盖招投标全流程的合规与决策助手,包含大量分析、审查、法规判定、知识库联动和算分能力。给定代码并未实现这些能力;它只实现了其中很小的一部分,即“真实 docx 章节初稿生成 + 内容自动填充”的文档生成功能。代码没有网络访问、知识库调用、法规判断、评分计算、文本润色或一致性审查逻辑,也没有触发器或权限相关异常。虽然声明中提到的 docx 生成能力与代码相符,但整体声明的主用途和能力范围远大于实际实现,属于明显的描述与行为不一致。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

声明描述的是一个范围很广的综合型招投标合规助手,而代码实际只实现了单一子功能:解析 .docx 招标文件格式并导出配置。虽然这可被视为“招标解析”链路中的一个支持性组件,但从当前提供的代码块看,其主用途明显比声明狭窄,且完全没有实现声明中大量核心能力(合规导航、法律分轨、生成审查、算分引擎、知识库联动等)。依据“描述是否准确代表代码实际行为”的标准,应判定为不匹配:声明显著高估了该代码块的能力范围。

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **价格分规则抽取**:先用 `scripts/extract_price_rules.py` 从《评标办法》半自动抽取价格分规则(method / full_score / base / deduction / interval),产出 `price_config.json` 草稿 + 审阅报告(置信度 + 需人

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **价格分规则抽取**:先用 `scripts/extract_price_rules.py` 从《评标办法》半自动抽取价格分规则(method / full_score / base / deduction / interval),产出 `price_config.json` 草稿 + 审阅报告(置信度 + 需人

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **价格分规则抽取**:先用 `scripts/extract_price_rules.py` 从《评标办法》半自动抽取价格分规则(method / full_score / base / deduction / interval),产出 `price_config.json` 草稿 + 审阅报告(置信度 + 需人

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
`templates/autofill-map.md`)→ `scripts/autofill_prepare.py`(注入 body/chart)→ `generate_bid_template.js`(渲染章节初稿 docx)。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
`templates/autofill-map.md`)→ `scripts/autofill_prepare.py`(注入 body/chart)→ `generate_bid_template.js`(渲染章节初稿 docx)。

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill description is written as a Chinese-only experience and repeatedly emphasizes Chinese document structure and output conventions, but it does not state that language is optional or user-selectable. Under the policy, forcing a specific language or locale without user opt-in is a natural-language policy violation unless the constraint is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill advertises and instructs use of local file-processing scripts that read and write bidder documents, but it does not declare any explicit tool scope or permissions boundary. In a document-heavy workflow involving sensitive procurement files, this creates an authorization ambiguity: the runtime may expose file access more broadly than users expect, increasing the chance of unintended file access or modification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The instruction '中文输出' forces a specific language for all outputs. Under the policy rules, locale or language constraints should either be user-selectable or clearly justified as region-specific; this line does not provide user opt-in or an explicit justification for the restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The entire skill description and operational guidance are written only in Chinese, with no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-speaking or region-specific context. Under the policy, a language constraint without opt-in or justification 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
94% confidence
Finding

This JSON manifest/config is entirely structured around Chinese-language project fields and values, and the chapter titles/body content are all fixed in Chinese. Under the policy, locale/language constraints should not be forced without user opt-in or clear justification; no such opt-in or region-specific justification appears in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The user-facing display name is presented only in Chinese, which suggests a fixed language presentation without any stated language choice or opt-in. Under the policy rules, locale or language constraints should be explicitly optional or justified when imposed.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The entire skill guidance is written as a Chinese-only methodology document and does not offer any language or locale choice. Under the policy criteria, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly documented and justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire skill file is written in Chinese and presents the methodology exclusively in that language, with no indication that users may choose another language or that the skill is limited to a Chinese-only context. The policy requires avoiding language or locale constraints unless users can opt in or the restriction is clearly documented and justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instruction '未命中须标注「建议人工复核」' and the overall document are written as mandatory Chinese phrasing, with no indication that users may choose another language or locale. Under the policy, forcing a specific language without opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The file title and all operational guidance are written exclusively in Chinese, with no indication that language selection is optional or limited to a justified region-specific deployment. This can constitute a language/locale policy violation because it implicitly constrains the skill's use to a single language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The entire skill file is written as a mandatory instruction set in Chinese, including normative output requirements such as using specific labels and terminology. There is no indication that the user may choose another language or that the Chinese-only constraint is optional or explicitly justified as a locale-specific requirement.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The guidance tells users to assess bid-price distributions for '陪标/围标' suspicion signals, but it does not clearly frame this as a compliance red-flag detection and does not explicitly prohibit using the analysis to coordinate bids or infer competitor behavior for strategic manipulation. In a bidding/procurement assistant, that omission is risky because the same analytic framing can be repurposed to facilitate unlawful collusion or evasive conduct.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill file is written only in Chinese, including the title, instructions, and outputs, with no indication that language selection is optional or that the skill is limited to a Chinese-speaking or China-specific workflow. This can violate language/locale policy when a skill implicitly forces one language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

This JavaScript file contains user-facing usage instructions entirely in Chinese and presents the skill as operating in that language by default. Under the policy rule, forcing a specific language without user opt-in is 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

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire template is written in Chinese and prescribes Chinese headings and checklist content, but there is no indication that the user can opt into another language or that the template is restricted to a China-specific workflow. Under the stated 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
91% confidence
Finding

The entire template is written as a fixed Chinese report format, and there is no indication that users may choose another language or that the skill is limited to a Chinese-language/regional context. Under 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
95% confidence
Finding

The entire template, including the title and checklist labels, is written only in Chinese and does not indicate that the user may choose another language. Under the policy rule for natural-language violations, this is a locale/language constraint without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.