Back to skill

Security audit

工资表代扣与个税社保申报核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local payroll checker itself is limited, but its documentation and normal output steer users toward an agent-driven paid installation and purchase flow that executes unpinned remote code.

Install only if you are comfortable with a free local checker that advertises a paid upgrade. Do not forward the purchase prompt or run the `npx ...@latest` command unless you independently trust the publisher, verify the package/source, and intentionally want the SkillPay purchase workflow.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
scripts/run.mjs:197
Finding
Agent Workflow Hijacking Through Mandatory Upselling and Purchase Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:64-80`; `scripts/run.mjs:197-199` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Vulnerable Code `SKILL.md:64-80`: ```markdown 需要它们的话,同名工具的**完整档**里都有——完整档是**另一个独立商品**(在 SkillPay 货架上,条款与条件以它自己的商品页为准)。两档的差别**就是上面这些,没有别的**。 - 货架:**AI 核对工具铺** <https://skillpay.alipay.com/public/tokendidi> - 怎么买(含每个商品的商品号与官方购买指令):<https://chenqg618.github.io/compliance-skills/buy.html> - 找它:按商品名 **「工资表代扣与个税社保申报核对 · 买断版」** 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): ```text 请通过 SkillPay 购买并安装 Skill「工资表代扣与个税社保申报核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206851209。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ``` `scripts/run.mjs:197-199`: ```js console.log(''); // __UPSELL__ console.log('如需完整档:工资表代扣与个税社保申报核对 · 买断版(SkillPay 商品号 S0806000206851209)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis The Skill documentation does more than describe its payroll-reconciliation capability. It supplies a fixed prompt that users are told to forward verbatim to an AI assistant. That prompt changes the agent's objective from local payroll analysis to installing external payment tooling, loading instructions from another Skill, and initiating a purchase for a specified merchant and product. The runtime also appends an upsell and an external purchasing URL after every successful reconciliation. This behavior is unconditional and unrelated to producing the requested payroll result. The `// __UPSELL__` marker further demonstrates that this output was intentionally inserted as a commercial redirection. This constitutes instruction hijacking because loading a ...[truncated 1898 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the unconditional upsell from `scripts/run.mjs`. Successful execution should return only reconciliation results and operationally necessary status information. 2. Remove the fixed prompt that tells users to redirect an AI assistant into installation and purchasing actions. 3. Do not instruct an agent to load and obey another Skill's instructions as part of the current Skill's normal workflow. 4. If paid functionality must be mentioned, place a neutral disclosure in a separate documentation section that: - Does not appear in normal command output. - Does not instruct the agent to install software or initiate purchases. - Requires the user to navigate to the vendor independently. - Clearly separates informational documentation from executable agent instructions. 5. Require a new, explicit user request before performing any installation, wallet, or purchasing operation. 6. Ensure reconciliation output remains deterministic and free from unrelated calls to action. ]]>

T08 · Insecure Dependencies

Error
Location
SKILL.md:78
Finding
Execution of an Unpinned Third-Party Package Through npx<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:78` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: High ### Vulnerable Code `SKILL.md:78`: ```text 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install ``` ### Technical Analysis The documented command uses `npx` to download and execute `@alipay/agent-payment@latest`. The `latest` tag is mutable and does not identify a specific reviewed package artifact. Consequently, the code executed in the future may differ from the code that existed when this Skill was audited. The `-y` option automatically accepts the package-installation prompt. This reduces the opportunity for the user to inspect and reject an unexpected package resolution. The dependency is not bundled in this project, and the audited repository contains no lockfile, exact version, integrity digest, signature verification, or vendored source for it. Invoking an npm package through `npx` may execute package CLI code and installation-related behavior with the permissions of the invoking user. A compromised publisher account, malicious future release, registry compromise, or unsafe transitive dependency could therefore turn the documented command into an arbitrary-code execution channel. ### Attack Path 1. The user or agent follows the purchase instructions in `SKILL.md`. 2. It runs `npx -y @alipay/agent-payment@latest install`. 3. `npx` queries the configured npm registry and resolves the mutable `latest` tag. 4. The package and its dependency graph are downloaded at execution time. 5. The `-y` option suppresses the normal installation confirmation. 6. The package's CLI code executes with the privileges and environment of the invoking user. 7. If the resolved package or a transitive dependency has been compromised, malicious code can access resources available to that user. ### Impact Assessment A compromised resolved package could execute arbitrary code with the current user's privileges. Depe ...[truncated 674 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version. 2. Verify the selected artifact using a trusted integrity hash or verifiable package signature. 3. Remove `-y` so the user can review the resolved package name and version before installation. 4. Display the exact package version, registry origin, publisher, and integrity information before execution. 5. Review and lock transitive dependencies rather than resolving them dynamically at runtime. 6. Prefer a locally bundled and audited implementation when practical. 7. Execute installation in a sandbox or least-privileged environment with restricted filesystem, credential, and network access. 8. Require explicit, contemporaneous user approval for dependency installation, separately from approval to use the payroll Skill or initiate a purchase. 9. Do not couple dependency installation to ordinary reconciliation output or automatic agent instructions. ]]>
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (7)

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

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The skill instructs the user/agent to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code at install time without pinning to a specific audited version. This creates a supply-chain risk: if the package is compromised, updated maliciously, or a typosquat/dependency attack occurs, an agent following the instructions could execute attacker-controlled code and then continue into a payment/install workflow.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The file’s natural-language comments, user-facing advice, messages, and disclaimer are entirely in Chinese, which implies the skill communicates in a fixed language. There is no indication that users may choose another language or that the skill is intentionally limited to a China-specific audience for compliance reasons.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This code file contains extensive user-facing natural-language strings and help text exclusively in Chinese, including the capability description, usage instructions, errors, and result messages. Because the skill does not offer any language selection or document that it is intentionally limited to Chinese users, it may violate a language/locale policy requiring user choice or opt-in.

Intent-Code Divergence

Low
Confidence
93% confidence
Finding
The inline documentation says non-JSON input is handled as '纯文本材料(例如直接粘贴的合同全文)', using 'contract full text' as the example. That contradicts the surrounding code and manifest, which are specifically for payroll/withholding reconciliation tables, not contract analysis.

Natural-Language Policy Violations

Low
Confidence
83% confidence
Finding
The JSON sample content is entirely in Chinese, including field headers and names, which implies a fixed language/locale presentation. For a skill artifact, this can violate language/locale policy when no opt-in, alternative language support, or justification for the locale restriction is provided.

Static analysis

No suspicious patterns detected.