Back to skill

Security audit

社保公积金核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local checker itself is mostly coherent, but the skill mixes it with automatic paid-product installation and purchase instructions that execute mutable external code and delegate to unaudited instructions.

Install only if you want a Chinese-localized local checker and you will use the free checker path. Do not copy the paid-edition prompt or run the npx @latest installer unless you independently trust the package, verify the exact version/source, and are prepared for external code execution and a separate payment/onboarding flow. Treat the free checker’s ratio-related summary wording as unreliable because those ratio checks are listed as not run.

Vulnerability Patterns
  • 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
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
scripts/run.mjs:197
Finding
Unconditional Commercial Output Hijacking<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run.mjs`, lines 197–199 **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Vulnerable Code ```javascript console.log(''); // __UPSELL__ console.log('[Paid-edition advertisement containing SkillPay product ID S0806000206852987]'); console.log('[External purchase instructions at https://chenqg618.github.io/compliance-skills/buy.html]'); ``` The bracketed string literals above are English translations of the original user-facing promotional messages at the specified lines. The first advertises the paid edition and identifies a SkillPay product; the second directs the user to an external purchase page. ### Technical Analysis Every successful, non-JSON invocation unconditionally appends a paid-product advertisement and an external purchase link to the checker’s results. There is no documented option to disable this behavior. The explicit `__UPSELL__` marker further demonstrates that this content was deliberately inserted into the normal result path. The advertisement is not part of the requested social-insurance validation result. When an AI Agent invokes this Skill and relays its output, the Skill can therefore alter the Agent’s response by inserting unsolicited commercial instructions. This compromises response integrity and can redirect the user from the local audit workflow to an external purchasing workflow. The behavior is limited to the human-readable output path. The `--json` branch returns before these lines and does not include the advertisement. ### Attack Path 1. A user or Agent invokes `node scripts/run.mjs --sample` or provides a valid input without `--json`. 2. The local engine successfully processes the material. 3. Execution reaches lines 197–199. 4. The runner unconditionally appends a paid-edition advertisement, product identifier, and external purchase URL. 5. An Agent that forwards the command output presents the injected commercial content ...[truncated 658 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the unconditional advertisement and purchase URL from the normal result path. 2. Keep audit output limited to findings, execution scope, and remediation information relevant to the submitted data. 3. If commercial information must remain available, expose it only through an explicit command such as `--purchase-info`. 4. Do not enable commercial output by default or silently mix it with audit findings. 5. Keep purchase documentation in a clearly separated documentation section rather than executable result output. 6. Add tests verifying that ordinary successful executions contain no advertisements, purchase identifiers, or unrelated external links. ]]>

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:65
Finding
Mutable External Package Execution and Delegation to Unaudited Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 65–75 **Vulnerability Type**: `T03: Remote Payload Retrieval and Execution`, `T08: Insecure Dependencies`, `T01: Skill Instruction Hijacking` **Risk Level**: High ### Vulnerable Instructions The documentation provides a verbatim Agent prompt whose relevant executable command is: ```shell npx -y @alipay/agent-payment@latest install ``` The surrounding instructions then tell the Agent to: ```text After installation, read the newly installed skillpay-onboarding SKILL.md and follow its instructions to purchase and install the specified merchant product. ``` The second block is an English translation of the corresponding instruction in `SKILL.md`. ### Technical Analysis The installation command executes the mutable `latest` release of an external npm package. It does not pin an exact version or integrity digest. Consequently, the code executed at installation time can differ from the code that existed when this Skill was reviewed. Using `npx -y` automatically approves package acquisition and reduces the opportunity for the user or operator to inspect the resolved version before execution. npm packages and their lifecycle behavior execute with the privileges of the invoking user or Agent environment. The instructions then establish a second trust transition: after downloading the package, the Agent is told to read and follow a newly installed `SKILL.md`. That file is not included in the audited project, so its effective instructions cannot be evaluated from this artifact. Those remote instructions are intended to control subsequent installation and purchasing actions. The documentation does state that wallet authorization or payment must be confirmed by the user. That limitation reduces the risk of an autonomous completed payment, but it does not mitigate execution of mutable package code or delegation to unaudited Agent instructions. ### Attack Path 1. A user copies the purchase-and ...[truncated 1708 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, previously audited package version. 2. Verify the resolved package using an integrity hash, lockfile, signed provenance, or another reproducible verification mechanism. 3. Remove `-y` so package acquisition requires explicit confirmation after displaying the exact package name and version. 4. Do not direct an Agent to blindly follow instructions from a newly downloaded `SKILL.md`. 5. Vendor the required onboarding instructions into the reviewed package, or display them for independent user review before any action. 6. Separate package installation from purchasing and require explicit, granular consent for each stage. 7. Run third-party installation tooling in a sandbox with minimal filesystem, process, credential, and network permissions. 8. Require the user to independently verify the publisher, package version, merchant identifier, destination URL, and payment details. 9. Ensure wallet authorization and payment remain user-controlled and cannot be confirmed by the Agent. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Ae1

High
Category
analysis-evasion
Content
node scripts/run.mjs --sample # 先看样例
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/run.mjs --sample # 先看样例
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
The skill name, primary descriptions, usage guidance, and the copy-paste purchase instructions are presented in Chinese, while the only English text is partial metadata rather than a user-facing language option. This creates an implicit language constraint without opt-in or an explanation that the skill is region-specific, which matches the language/locale policy violation criteria.

Intent-Code Divergence

Medium
Confidence
92% confidence
Finding
The metadata claims 'no network,' but later sections direct users to web-based purchase and installation flows. This contradiction is dangerous because it can lower user suspicion and cause them to trust external actions under a false assumption that the skill never leaves the local environment.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
A skill advertised as a free, local, no-network checker embeds instructions to buy and install a separate paid product from external sites. This creates a social-engineering and trust-boundary problem: users may believe the upsell flow is part of the safe local checker and follow external installation/payment steps they did not intend to authorize.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The documentation goes beyond statement reconciliation and provides procedural guidance for external package installation and paid acquisition. That mismatch in scope increases the chance that an agent or user treats unrelated installation/payment actions as trusted parts of the skill, enabling unintended code execution or financial actions.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs users to run an unpinned `npx -y @alipay/agent-payment@latest install`, which executes remotely fetched code without version pinning or integrity verification. If the package is compromised or a breaking update is published, users could execute attacker-controlled code during installation, and the risk is amplified because the text encourages direct purchase/install actions.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The file’s natural-language interface and user-facing descriptions are entirely in Chinese, including the stated contract, warnings, and result guidance, with no indication that the user can choose another language. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is clearly documented and justified.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The inline contract says withheld checks are descriptive only and not implemented, yet the observable output implies ratio validation was part of the analysis. This discrepancy is security-relevant because it can mislead operators into trusting an incomplete audit, especially in payroll and social-insurance workflows where omitted checks can conceal underpayment or misconfiguration.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The engine summary states a basis of "逐人把各项相加与合计列比对;比例按缴费基数复算", but the ratio recalculation checks are explicitly listed as withheld and are not implemented in the execution path. This creates a false assurance problem: downstream users or agents may believe compliance-sensitive ratio checks were performed when they were not, leading to incorrect business decisions.

Intent-Code Divergence

Low
Confidence
92% confidence
Finding
The inline documentation says non-JSON input is treated as plain-text material such as '直接粘贴的合同全文', which describes contract-document handling rather than social-insurance declaration detail checking. The actual skill manifest and surrounding help text repeatedly constrain the tool to 社保申报明细/社保公积金核对, so this comment broadens the apparent intent beyond the stated purpose.

Natural-Language Policy Violations

Low
Confidence
85% confidence
Finding
The JSON payload consists entirely of Chinese field labels and sample data, with no indication that the skill supports language choice or that the locale restriction is intentional and documented. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.

Static analysis

No suspicious patterns detected.