Back to skill

Security audit

SkillGapDiagnosis(业绩缺口分析)

Security checks for vulnerabilities and agentic risk

Overview

The skill matches a business gap diagnosis purpose and shows no malware behavior, but it conflicts with its own diagnosis-only promise by producing recommendation-oriented text and retrieval hints.

Install only if the skill is allowed to access the listed business performance, campaign, honor, renewal, customer-growth, skill, assessment, and allowance data. Before production use, tighten the contract: either remove recommendation-oriented examples and knowledgeRetrievalHints, or clearly disclose that the skill can provide strategy/advice prompts and route them through the intended advice-governed workflow.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

這段代碼的核心方向與描述大致相關,都是做業務缺口/診斷彙總,但存在明顯的功能落差與一項未宣告輸出。首先,_extract_performance_gaps 只計算並回寫件均保費,返回空列表,因此『業績缺口』本身並未被生成。其次,renewal_data、customer_growth_data、skill_data 只被放入 diagnosis 摘要中,沒有像描述所說那樣轉成缺口金額、需成交件數並按優先級排序。再次,描述強調統一換算到保障保費口徑,但代碼僅對 campaign/honor 直接使用 gapVal/gapAmt,未見跨維度口徑轉換規則實作。最後,返回值中的 knowledgeRetrievalHints 明顯是為後續知識檢索/達標攻略提供提示,雖不直接生成建議文本,但已超出『不輸出行動建議』的嚴格表述。因此判定為描述與實際行為存在實質不匹配。

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest description and the skill instructions are entirely written in Traditional Chinese and define the skill behavior in that locale, but there is no indication that the user can choose another language or that the locale restriction is justified as region-specific. 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.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

SKILL.md 在多處明確限定本 Skill 只輸出診斷結論、不輸出行動建議(L003、L025),但異常與降級表中又寫明「全部 API 不可用」時返回「以下為通用建議」。這不是單純缺漏,而是文檔內對技能輸出意圖的直接衝突,會導致實作者或調度器對該技能是否可產生建議產生相反理解。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest sets a fixed language value of "zh-Hant", which indicates the skill is constrained to a specific language/locale. In this file, there is no accompanying note that the user can choose another language or that the locale restriction is justified by a region-specific requirement.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The task description requires '相關知識庫檢索建議', which goes beyond the manifest's stated purpose of producing a multi-dimensional diagnosis without action advice. Expanding the output into retrieval suggestions can trigger unapproved guidance behavior and potentially cause the skill to steer users toward additional systems or content not covered by its declared scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This markdown instruction explicitly mandates a single language for all user-facing output: Traditional Chinese. Under the policy, language constraints must either offer user opt-in/choice or be clearly documented as justified for a region-specific use case; this file does neither.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill manifest explicitly says the diagnosis output must not include action recommendations, but the prompt examples instruct the model to give advice such as prioritizing work, following up signing progress, considering product mix changes, and arranging training. This creates a policy/behavior mismatch that can cause the agent to exceed its authorized scope and deliver prescriptive guidance when only diagnostic output was intended.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This JSON schema contains natural-language descriptions such as "時間區間枚舉" and other field guidance exclusively in Chinese. Because the file provides no opt-in, alternate locale, or justification that the skill is region-specific, it can violate the requirement to avoid forcing a specific language without user choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This JSON schema embeds field descriptions and enum values entirely in Chinese, including user-visible categorical values such as urgency tags. Because the file provides no indication that the skill is region-specific or that users can opt into this locale, it appears to impose a specific language by default, which matches the language/locale policy concern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code emits knowledgeRetrievalHints such as competition hints and '達標攻略', which crosses from diagnosis into recommendation-oriented guidance despite the skill contract explicitly saying not to output action suggestions. In an agent system, this can cause policy drift: downstream components may surface these hints as advice, violating the declared behavior and potentially bypassing routing or compliance controls tied to 'diagnosis-only' skills.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

The file presents the skill name, description, comments, and usage context entirely in Chinese, which can indicate a fixed language/locale expectation. There is no note that the skill is region-specific or that users may opt into another language, so this appears to be a natural-language locale constraint without explicit justification.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The prompt says the report '需包含' four numbered sections in L17-L20, establishing a numbered structure for the generated content. Immediately afterward, L24 says '禁止機械編號(不用「1. 2. 3.」列表)', which contradicts the earlier formatting instruction and creates conflicting developer intent within the documentation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains user-facing natural-language content in the module docstring and later CLI help text that assumes a single language. Under the policy for natural-language violations, forcing a specific language without user opt-in can exclude users unless the locale restriction is explicitly justified.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest says the skill integrates multiple dimensions including assessment/new allowance, agent profile, and business rules into unified gap diagnosis. However, assessment_data, new_allowance_data, agent_profile, and business_rules are accepted by compute_gaps but never used, so the actual behavior falls short of the claimed integrated analysis scope.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The argparse description and help messages are user-visible natural-language strings and are all provided only in Chinese. Because the file does not offer an alternative language or explain a required locale, this is a language policy violation under the stated rule.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This Python test file includes multiple natural-language strings and comments entirely in Traditional Chinese, such as the module docstring and asserted labels like "緊急", "重要", and "常規". Under the language/locale policy rule, forcing a specific language without offering user choice or documenting a justified locale constraint is a policy concern.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.