Back to skill

Security audit

加班费核算核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local payroll checker itself is coherent, but the skill also steers users into an under-disclosed paid install and purchase flow using unpinned external tooling.

Install only if you intend to use the free local checker and are comfortable ignoring the paid-upgrade block. Do not let an assistant run the SkillPay purchase prompt or npx @latest command automatically; verify the vendor, package version, payment terms, and wallet confirmation separately before any paid install.

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

Warning
Location
scripts/run.mjs:196
Finding
Unconditional Commercial Output and Agent Purchase-Workflow Hijacking<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run.mjs:196-198`; related agent instructions at `SKILL.md:70-84` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: Medium ### Vulnerable Code ```js console.log(''); // __UPSELL__ console.log('如需完整档:加班费核算核对 · 买断版(SkillPay 商品号 S0806000206834491)—— 本版本未执行的 4 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` The related documentation supplies a predefined instruction block intended to be sent directly to an AI assistant: ```text 请通过 SkillPay 购买并安装 Skill「加班费核算核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206834491。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ### Technical Analysis Every successful non-JSON execution unconditionally appends an advertisement and an external purchase URL to the legitimate payroll-check result. This behavior is unrelated to the requested arithmetic analysis and turns trusted operational output into a commercial redirection channel. The documentation goes further by asking the user to send a fixed instruction block to an AI assistant. That block directs the agent to install software, load instructions from a newly installed Skill, and initiate a specific product-purchase workflow. This can alter the agent's current task from checking a payroll worksheet to installing dependencies and facilitating a purchase. Although the supplied prompt states that the user must personally confirm wallet authorization or payment, it still attempts to steer the agent into installation and transaction-related activity outside the core advertised function. ### Attack Path 1. A user runs the legitimate local overtime-pay checker. 2. The checker completes the requested analysis and p ...[truncated 1072 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove unconditional advertising and purchase links from normal execution output. 2. Keep runtime output limited to the requested payroll-check findings and relevant operational diagnostics. 3. Present optional commercial information only after an explicit user request. 4. Remove predefined prompts that instruct an AI assistant to install packages, load external instructions, or initiate purchases. 5. Separate product documentation from executable Skill instructions so commercial content cannot be interpreted as part of the agent's operational workflow. 6. Require distinct, informed user consent before each installation or transaction-related step. 7. If an upgrade path must be documented, provide a passive product identifier and official documentation link without directing the agent to execute commands automatically. ]]>

T08 · Insecure Dependencies

Error
Location
SKILL.md:74
Finding
Execution of an Unpinned External Package Followed by Trust of Downloaded Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:74-83` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: High ### Vulnerable Instructions ```text 请通过 SkillPay 购买并安装 Skill「加班费核算核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206834491。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ### Technical Analysis The documented workflow runs: ```bash npx -y @alipay/agent-payment@latest install ``` The `latest` tag is mutable and does not identify a specific reviewed artifact. No exact version, package integrity hash, lockfile, signature validation procedure, or independently verified checksum is provided. The `-y` option also suppresses the normal package-installation confirmation. An npm package invoked through `npx` can execute package lifecycle or command code with the permissions of the current process. Consequently, the code that executes may differ from the version that existed when this Skill was audited. After installation, the workflow tells the agent to read and follow a newly downloaded `skillpay-onboarding/SKILL.md`. This creates a second trust transition: remote, unaudited instructions are allowed to influence the agent's behavior and lead it into further installation and purchase actions. There is no evidence in the audited files that the named external package is itself malicious. The confirmed weakness is the unsafe, unpinned dependency-execution and trust model. ### Attack Path 1. A user copies the purchase prompt from `SKILL.md` into an AI assistant. 2. The assistant runs `npx -y @alipay/agent-payment@latest install`. 3. npm resolves whichever artifact currently owns the mutable `latest` tag. 4. The downloaded package executes with the permissions of the user or agent process. 5. If the package registry account, relea ...[truncated 1045 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version. 2. Verify the resolved package using a published cryptographic integrity hash or trusted signature before execution. 3. Avoid `npx -y` for security-sensitive installation flows; require explicit confirmation and display the exact package version and source. 4. Review and pin the complete transitive dependency graph through a lockfile or equivalent reproducible mechanism. 5. Do not automatically trust or execute instructions from a newly downloaded `SKILL.md`. 6. Present downloaded instructions to the user for review and require separate, explicit consent before following them. 7. Separate package installation, Skill activation, wallet authorization, and purchase initiation into distinct steps with independent confirmation. 8. Execute installation in a restricted environment with least privilege, limited filesystem access, and no access to unrelated credentials. 9. Document package provenance, publisher identity, expected checksums, and a safe rollback procedure. ]]>
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

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

Intent-Code Divergence

Medium
Confidence
98% confidence
Finding
The English metadata claims 'No payment, no registration, no API key, no network,' yet later sections instruct users to perform a networked installation and paid purchase flow. This discrepancy is dangerous because it undermines trust boundaries and can cause users or agent frameworks to classify the skill as safe/local-only when it actually contains instructions leading to external network and financial actions.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill is presented as a free local overtime-check tool, but it embeds a sales funnel directing the user to install and buy a separate paid product. This is dangerous because it mixes benign business logic with transactional cross-promotion that can manipulate an assistant into performing actions outside the user's original intent and outside the declared scope of the skill.

Ssd 4

Medium
Confidence
96% confidence
Finding
The text uses trust-building language ('official', 'it will definitely install and buy') and a multi-step sequence that nudges an assistant to bootstrap a payment/install capability, read subsequent instructions, and acquire a hidden product not listed publicly. This pattern is dangerous because it resembles social-engineering for agents: it chains authority cues, hidden product acquisition, and follow-on instruction loading to bypass normal scrutiny.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The markdown provides a ready-made prompt telling another AI assistant to install dependencies, read newly installed skill files, and continue a purchase flow, while only lightly mentioning wallet confirmation. This is dangerous because it is effectively a delegated action chain for software installation and commerce, increasing the likelihood that an agent will take system-affecting and account-affecting actions without sufficiently granular consent.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs users to execute `npx -y @alipay/agent-payment@latest install`, which fetches and runs remote code at install time without pinning a specific version or integrity. This creates a supply-chain risk: if the package is compromised or changed unexpectedly, the user or assistant could execute attacker-controlled code during the purchase/install flow.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This code returns user-facing advice entirely in Chinese, and the broader file’s user-facing strings are consistently Chinese-only. There is no indication that the skill is explicitly region-specific with a documented locale requirement or that users may opt into another language, which can violate language/locale policy requirements.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The file-level contract says insufficient material should not trigger defaulting, yet the implementation silently substitutes 21.75 for missing 计薪天数 and continues calculations. In a payroll-checking skill, this can produce authoritative-looking results from incomplete inputs, causing users to trust incorrect overtime validations and potentially miss payroll errors or create labor disputes.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
This code embeds all natural-language instructions, usage text, status messages, and output strings in Chinese. 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, which is not present here.

Intent-Code Divergence

Low
Confidence
92% confidence
Finding
L077 的注释写明“不是 JSON 就当作纯文本材料(例如直接粘贴的合同全文)”,这与文件头、帮助文本及 manifest 中反复强调的“加班费计算表(含表头)”输入范围不一致。代码虽然只是把文本传给引擎,并不一定成功处理合同全文,但该注释主动暗示了超出技能声明范围的输入意图,构成文档与实际/声明意图的偏离。

Static analysis

No suspicious patterns detected.