Back to skill

Security audit

Apollo Chengtou Trade Risk

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent Chinese trade-risk assistant, but it tells the agent to retain feedback and update knowledge after every task without clear consent or controls.

Review before installing. Use it only with clear user consent for any retained feedback or case material, and do not allow automatic knowledge-base or memory updates from submitted contracts, company details, or customer feedback without review and redaction.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • 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
Findings (1)

T02 · Agent Memory Poisoning

Warning
Location
SKILL.md:221
Finding

Uncontrolled Retention of Customer Feedback and Persistent Knowledge Mutation

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 221–225
Vulnerability Type: Persistent memory poisoning and unspecified customer-data retention
Risk Level: Medium

Complete instruction excerpt, translated into English from the source:

markdown
After each risk-control task:
1. Record customer feedback (whether the risk assessment was accurate)
2. Update the risk-feature library (new default patterns)
3. Update the knowledge base (new regulatory policies)
4. Mark ambiguous cases (for subsequent training)

Technical Analysis

The Skill instructs the Agent to record customer feedback and modify persistent risk and knowledge repositories after every completed task. The instructions do not define:

  • Whether explicit user consent is required
  • Which submitted data may be retained
  • How confidential contract or counterparty information must be sanitized
  • How feedback and regulatory claims must be validated
  • Whether updates are isolated from production knowledge
  • Access-control, retention, review, rollback, or deletion procedures

Contract reviews and counterparty investigations can contain confidential commercial terms, personal information, financial records, and internal approval data. Automatically retaining such material creates a data-governance risk. Moreover, treating customer feedback or submitted cases as knowledge-update material creates a memory-poisoning channel: attacker-controlled or inaccurate claims could be incorporated into persistent state and affect later users.

The supplied Python scripts do not implement a persistent memory store, so exploitation depends on whether the hosting Agent provides memory or knowledge-base mutation capabilities. No operating-system persistence, remote communication, credential access, or arbitrary code execution was identified.

Attack Path

  1. An attacker submits a crafted contract, fabricated regulatory stat ...[truncated 1309 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove the unconditional instruction to record information after every task.
  2. Require explicit, informed user consent before retaining feedback or case material.
  3. Default to session-only processing and prohibit persistence of raw contracts, personal information, financial records, and counterparty documents.
  4. Permit knowledge updates only through a separately authorized administrative workflow.
  5. Validate proposed regulatory and risk-feature updates against authoritative sources before publication.
  6. Store proposed updates in a quarantined review queue rather than directly modifying production knowledge.
  7. Apply data minimization and redaction so that only sanitized, structured risk indicators can be retained.
  8. Define access controls, tenant isolation, retention periods, deletion procedures, audit logging, versioning, and rollback controls.
  9. Add an explicit instruction that user feedback and uploaded documents are untrusted data and must never become persistent rules automatically.
  10. Replace the affected block with wording such as:
markdown
Do not retain customer content or update persistent memory automatically.
Feedback may be summarized only with explicit user consent and after removing
confidential or personal information. Knowledge-base changes require review
against authoritative sources and approval by an authorized administrator.
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 (17)

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description says the skill helps check both contract risk and counterparty background. However, the supplied code only implements contract-text scanning using hardcoded regex patterns for financing-trade and empty-trade indicators, then generates a textual report. There is no logic to accept and process a company name meaningfully, no external lookup, no database query, no background/credit/registration analysis, and no branch on '--type company'. Thus the implemented behavior is materially narrower than the declared purpose. There are no suspicious extra capabilities beyond the declared domain; the mismatch is due to missing declared functionality rather than undeclared behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says the skill is a trade risk-control assistant for checking contract risk and counterparty background. However, the supplied code is solely a testing utility: it loads evaluation cases, prints testing metadata, marks cases as pending validation, generates a report, and saves that report to disk. There is no logic for contract review, risk assessment, counterparty lookup, or background analysis. This is a materially different primary purpose, so the description does not accurately represent the code.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger rules are broad, generic terms such as '合规', '违规', '合同审查', and '对手方', which can match many unrelated conversations and cause unintended skill activation. In a risk-analysis skill, accidental activation can inject domain-specific guidance into the wrong workflow, potentially exposing sensitive context or causing users to rely on irrelevant compliance advice.

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.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger phrases are broad enough to activate on generic requests like 'check this agreement' or 'is this company reliable,' which can cause the skill to engage outside the intended regulated trade-risk context. Over-broad activation can lead to inappropriate handling of sensitive documents or personal/business data and increase the chance of misleading risk assessments in unrelated domains.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill states that it will record customer feedback, update case libraries, and mark ambiguous cases for later training without any notice about retention, consent, minimization, or handling of sensitive commercial data. In a risk-control context, users may submit contracts, counterparties, and internal compliance details, so silent retention creates real privacy, confidentiality, and data-governance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This Python file contains natural-language docstrings and usage text entirely in Chinese, and the generated report and console output are also hardcoded in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not stated here.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The script presents itself as executing checks and generating a test report, but it does not actually run the AI under test and still emits an official-looking report with pass/fail statistics. In a risk-analysis skill, this can mislead operators into believing safety or quality validation occurred when it did not, causing untested behavior to be deployed or trusted.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This code file contains natural-language strings in the module docstring that define the skill and usage exclusively in Chinese. The policy scope for SQP-3 applies to all file types, and there is no indication that users can select another language or that the locale restriction is justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The generated report headings and status text are written in Chinese, and the script prints Chinese-only runtime messages later as well. This constitutes a language/locale constraint in natural-language output without an explicit user choice or documented regional justification.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

该纯文本测试报告包含示例提示词“帮我看看这份合同有没有问题”,这是较常见的自然语言请求,缺少更明确的触发边界或限定上下文。作为文本文件,适用 SQP-1;此类表述若被用作技能触发描述,容易与普通对话重叠。

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

“你能帮我查一下这家公司靠不靠谱吗”属于宽泛的咨询式表达,未体现明确的技能调用边界、输入要求或排除条件。对于 .txt 文件,需检查是否存在含糊触发描述;该表述可能覆盖大量日常咨询语句。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
78% confidence
Finding

All user-facing documentation, examples, and output descriptions are presented only in Chinese, with no indication that users may choose another language or that the locale restriction is intentional. This can be a language-policy issue when a skill effectively forces a specific language without user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This manifest-like JSON file contains the skill description, prompts, expected outputs, and test instructions exclusively in Chinese. Under the policy rule for language/locale, forcing a specific language without user opt-in or explicit justification can be 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

SQP-3 applies to all file types and covers language or locale policy violations in natural-language content. This file presents all instructions, examples, and outputs only in Chinese, with no indication that the skill is region-specific or that users can opt into this language.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

该函数注释称其“模拟 CLI 测试”,暗示会执行某种测试流程,但实现仅在 L055-L059 构造并返回 mock_response,既不运行 CLI,也不返回签名标注的 Tuple[str, bool]。这与文档/类型意图存在明显偏差,可能误导维护者对测试覆盖和行为的理解。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
74% confidence
Finding

整份测试报告及示例交互均固定为中文,未见提供语言或地区选项,也未说明该语言限制的业务必要性。根据 SQP-3,若技能或其自然语言配置体现单一语言约束而无用户选择,可能构成语言/locale 策略问题。

Content

No source excerpt is available for this finding.