Back to skill

Security audit

企业碳资信评级报告

Security checks for vulnerabilities and agentic risk

Overview

The skill coherently performs local enterprise carbon-credit scoring and report generation, with some data-handling and validation caveats users should understand.

Install only for workflows where Chinese-language enterprise carbon-credit reports are appropriate. Treat uploaded materials, rating_result.json, and generated DOCX files as confidential, verify extracted fields and weights before report generation, and do not rely on reports from untrusted JSON inputs without independent validation.

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
scripts/score_company.py:323
Finding

Unvalidated Rating Scores and Weights Permit Rating Manipulation

Content
View full analysis
Remediation
View remediation
float: score = float(value) if not math.isfinite(score) or not 0 <= score <= 100: raise ValueError(f"{name} must be a finite number between 0 and 100") return score ``` 3. **Validate weights** Require every weight to be finite and within `0–1`. Verify that each complete weight group sums to 1 within a small floating-point tolerance: ```python def validate_weights(weights: dict[str, float], name: str) -> None: if any(not math.isfinite(v) or not 0 <= v <= 1 for v in weights.values()): raise ValueError(f"{name} weights must be finite values between 0 and 1") if not math.isclose(sum(weights.values()), 1.0, rel_tol=0, abs_tol=1e-9): raise ValueError(f"{name} weights must sum to 1.0") ``` 4. **Validate raw metrics** Reject negative quantities and counts where negative values have no valid business meaning. Require denominator fields to be strictly positive before division. 5. **Validate calculated results** Before grade mapping, require the comprehensive score to be finite and within the model's expected range. Fail closed instead of producing a rating when validation fails. 6. **Record validation failures** Return a structured no-rating or input-validation result identifying the invalid fiel ...[truncated 350 chars]
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
91% confidence
Finding

代码的核心能力与声明的大部分内容一致:它确实进行缺失字段识别、行业默认权重选择、评分计算和评级输出,并包含否决项处理逻辑。但声明包含两个明显未实现的重要能力:一是从客户材料自动抽取评级字段,二是生成正式Word报告。当前代码假设输入已经是结构化JSON,只做字段归一化,不具备文档解析/抽取功能;输出也仅为rating_result.json。因此描述相比代码存在实质性能力超述,应判定为不匹配。

Content

No source excerpt is available for this finding.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/企业碳资信评分规则配置表_v0.1.xlsx!/[Content_Types].xml (reported line 1)May include surrounding context.

text
<?xml version="1.0" encoding="utf-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="/xl/styles.xml" Id="R8b5ba3be22b94c66" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="/xl/theme/theme1.xml" Id="Rde2a4684678c4ae1" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="/xl/sharedStrings.xml" Id="Rf787658076c14bce" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet1.xml" Id="R72c9131313bf4ba0" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet2.xml" Id="R1fe4f21ab2cd494a" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet3.xml" Id="R2d34e0b221e94b34" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet4.xml" Id="R07551f6d00fe41c0" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet5.xml" Id="Reb26aed2899f4524" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet6.xml" Id="Rb869d0cfd3b144b1" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet7.xml" Id="R10f62bd724f849f7" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet8.xml" Id="R15fec16acad843f9" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet9.xml" Id="R3237f39338f54
...[truncated 24 chars]

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/企业碳资信评分规则配置表_v0.1.xlsx!/_rels/.rels (reported line 1)May include surrounding context.

text
<?xml version="1.0" encoding="utf-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="/xl/styles.xml" Id="R8b5ba3be22b94c66" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="/xl/theme/theme1.xml" Id="Rde2a4684678c4ae1" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="/xl/sharedStrings.xml" Id="Rf787658076c14bce" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet1.xml" Id="R72c9131313bf4ba0" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet2.xml" Id="R1fe4f21ab2cd494a" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet3.xml" Id="R2d34e0b221e94b34" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet4.xml" Id="R07551f6d00fe41c0" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet5.xml" Id="Reb26aed2899f4524" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet6.xml" Id="Rb869d0cfd3b144b1" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet7.xml" Id="R10f62bd724f849f7" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet8.xml" Id="R15fec16acad843f9" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet9.xml" Id="R3237f39338f54
...[truncated 24 chars]

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · assets/企业碳资信评分规则配置表_v0.1.xlsx!/xl/_rels/workbook.xml.rels (reported line 1)May include surrounding context.

text
<?xml version="1.0" encoding="utf-8"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="/xl/styles.xml" Id="R8b5ba3be22b94c66" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="/xl/theme/theme1.xml" Id="Rde2a4684678c4ae1" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="/xl/sharedStrings.xml" Id="Rf787658076c14bce" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet1.xml" Id="R72c9131313bf4ba0" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet2.xml" Id="R1fe4f21ab2cd494a" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet3.xml" Id="R2d34e0b221e94b34" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet4.xml" Id="R07551f6d00fe41c0" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet5.xml" Id="Reb26aed2899f4524" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet6.xml" Id="Rb869d0cfd3b144b1" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet7.xml" Id="R10f62bd724f849f7" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet8.xml" Id="R15fec16acad843f9" /><Relationship Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="/xl/worksheets/sheet9.xml" Id="R3237f39338f54
...[truncated 24 chars]

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares file read/write capable behavior and instructs use of local scripts, but does not explicitly scope or constrain tool permissions. In a workflow that processes sensitive enterprise documents and generates output artifacts, missing tool-scope declarations increases the risk of unintended file access, overbroad writes, or unsafe handling of customer data by the agent runtime.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill directs processing of customer enterprise materials into JSON and Word outputs without warning that sensitive uploaded data may be persisted in generated files and intermediate artifacts. This can lead to unintentional retention, broader exposure, or downstream sharing of business identifiers and compliance data, especially if intermediate files are stored in shared workspaces or logs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The display name, short description, and default prompt are all written exclusively in Chinese, which indicates the skill is intended to operate in a fixed language. There is no mention of user opt-in, alternative language support, or a documented reason for restricting the skill to Chinese, so this appears to violate the language/locale policy criterion.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file contains user-facing field labels and workflow terms exclusively in Chinese, which can effectively force a specific language/locale on users. The file does not state that the skill is China-specific, nor does it provide any opt-in or alternative language handling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file contains operational rules that require use of Chinese source labels and later relies on Chinese-only industry classes, dimensions, and trigger values. Under the policy, forcing a specific language or locale without user opt-in or documented justification 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
95% confidence
Finding

This Python file hardcodes Chinese-specific fonts and throughout the report generation emits fixed Chinese titles, labels, and narrative text, making the skill output effectively Chinese-only. The file does not offer a language or locale option, nor does it clearly document a justified region-specific limitation for this behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This code hard-codes Chinese-language industry classifications and related text tokens, and similar Chinese-only strings are also used elsewhere for control flow and output. Because the file provides no user opt-in or documented locale constraint, it forces a specific language/locale in a way that can violate language choice policy.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.