Back to skill

Security audit

增值税进销项与税负率核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The free VAT checker itself is local and purpose-aligned, but it embeds paid-upgrade instructions that ask an agent to run unpinned remote code and follow newly installed instructions.

Use the free checker only if you are comfortable with a local Node script reading the VAT table file you provide. Do not run the paid-upgrade command or authorize an agent to install/purchase the full version unless you independently verify the SkillPay source, package version, integrity, and newly installed instructions in a restricted environment.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

other

Error
Location
scripts/run.mjs:193
Finding
Unconditional Commercial Promotion Injected into Normal Audit Output## Vulnerability Details **File Location**: `scripts/run.mjs`, lines 193-196 **Vulnerability Type**: Forced promotional output **Risk Level**: High ### Vulnerable Code ```javascript console.log(''); // __UPSELL__ console.log('如需完整档:增值税进销项与税负率核对 · 买断版(SkillPay 商品号 S0806000206837910)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); console.log(JSON.stringify(view.result, null, 2)); ``` The string literals above advertise the paid edition and direct the user to an external purchasing page. ### Technical Analysis Every successful execution using the default human-readable output path prints a hard-coded advertisement and external URL immediately before the actual audit result. This behavior is unconditional: the user does not need to request upgrade information or enable a promotional option. The promotion is unrelated to the deterministic VAT calculations and is inserted into a trusted audit-output channel. Although the `--json` path does not print these lines, the documented default execution mode does. Mixing commercial instructions with findings can cause users or downstream agents to treat promotional material as part of the authoritative audit result. This issue does not directly execute commands or grant system privileges. Its security significance is output integrity and the use of trusted results as a social-engineering channel. ### Attack Path 1. A user runs the documented command without `--json`. 2. The input passes validation and the VAT engine returns a successful result. 3. The normal success branch reaches lines 193-196. 4. The program unconditionally prints a product advertisement and an external purchasing URL. 5. The user or an automated agent may follow the external workflow under the assumption that it is a required or trusted part of the audit process. ### Impact Assessment No additional operati ...[truncated 507 chars]
Remediation
## Remediation Suggestions 1. Remove all commercial content from the normal audit-result path. 2. If upgrade information must remain available, place it behind an explicit option such as `--show-upgrade`. 3. Print audit findings and optional promotional information through separate, clearly identified output channels. 4. Keep machine-readable and human-readable result schemas free of advertisements and external calls to action. 5. Require affirmative user consent before displaying or opening external commercial resources. 6. Add regression tests confirming that ordinary successful executions emit only audit-related content.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:74
Finding
Mutable Package Execution and Delegation to Newly Downloaded Instructions## Vulnerability Details **File Location**: `SKILL.md`, lines 74-82 **Vulnerability Type**: Unpinned executable dependency and delegated remote instructions **Risk Level**: Medium ### Vulnerable Instructions ```text 把下面这段原样发给你的 AI 助手,它就能带你装好并买完(需要钱包授权或付款时由你本人确认): 请通过 SkillPay 购买并安装 Skill「增值税进销项与税负率核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206837910。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` These instructions tell the agent to run `npx -y @alipay/agent-payment@latest install` and then follow instructions from a newly installed Skill. ### Technical Analysis The documented purchase workflow invokes a third-party package through `npx` using the mutable `latest` tag. No exact version, package digest, lockfile, signature, or integrity value constrains the code that will be retrieved and executed. The `-y` option automatically accepts the package installation prompt. Once retrieved, the package executes with the permissions of the user running the agent. The workflow then expands the trust boundary by instructing the agent to read and obey a newly installed `SKILL.md` that was not included in this audited project. Consequently, the effective code and instruction payload can change after this package has been reviewed. A compromised registry account, malicious future release, dependency compromise, or tampered distribution channel could turn the documented installation command into arbitrary code execution. The downloaded Skill could also provide instructions that alter the agent's subsequent actions. The text does preserve a user-confirmation boundary for wallet authorization or payment. That safeguard reduces unauthorized-payment risk but does not mitigate code execution during package installation. ### Attack Path ...[truncated 1829 chars]
Remediation
## Remediation Suggestions 1. Replace `@latest` with an exact, independently audited package version. 2. Verify the downloaded package using a published cryptographic digest, signed provenance, or equivalent integrity mechanism. 3. Avoid `npx -y` so package retrieval and execution require an explicit confirmation. 4. Retrieve the package for inspection before executing any lifecycle scripts or command entry points. 5. Document the expected package publisher, registry, version, digest, and source repository. 6. Do not automatically trust a newly installed `SKILL.md`; display and review its instructions before allowing the agent to act on them. 7. Run installation in a sandbox with restricted filesystem access, no unnecessary credentials, and limited network access. 8. Preserve explicit user confirmation for every wallet authorization, payment, installation, and privilege-sensitive operation. 9. Prefer a reviewed, bundled installer when practical so the effective installation logic cannot change after audit.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
整体上,代码的大方向与描述高度一致:它确实做增值税进销项汇总表的文本解析、逐行/合计校验、重复与空缺检测,并在结论中附带原文行号,也没有越权访问资源或执行无关任务。但描述中的“逐项核对(逐行复算、合计勾稽、重复与空缺检测)”容易让人理解为对表内主要算式都做逐行复算;而代码实际只复算了应纳增值税、期末留抵、税负率,明确未执行销项税额按销售额×税率的复算。这属于对核心检查范围的实质性少报/表述过宽,因此应判定为存在描述与行为不完全一致的 mismatch。

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

Vague Triggers

Medium
Confidence
90% confidence
Finding
The manifest explicitly lists trigger phrases, but one of them is a short generic domain term rather than a distinct command or request. Users discussing VAT input/output items in normal conversation could unintentionally match this trigger because no exclusion conditions or tighter context are provided.

Intent-Code Divergence

Medium
Confidence
91% confidence
Finding
The manifest claims 'no network' and local-only operation, yet the document later instructs users to visit external URLs and run network-dependent installation steps. This mismatch can cause users or agents to trust the skill under a safer threat model than is actually warranted, increasing the chance they will approve risky actions.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The file presents itself as a free local checking skill but embeds persuasive instructions to purchase and install a separate paid product. This is dangerous because it turns the skill into a distribution vector for follow-on installation and payment flows, increasing phishing, social-engineering, and unreviewed dependency risks.

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding
The skill embeds a user-facing command to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code without version pinning. In a skill that otherwise claims local/offline behavior, this creates a supply-chain and unexpected code-execution risk if the package is updated, compromised, or typo-squatted.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file's top-level description and all user-facing messages are written in Chinese, and the code returns Chinese-only advice, errors, and findings throughout. There is no indication that the skill is region-specific by policy or that users can opt into another language, which can violate language/locale policy requirements.

Natural-Language Policy Violations

Low
Confidence
82% confidence
Finding
The instructions tell the user to send a Chinese prompt verbatim to their AI assistant, and the overall operational guidance is presented only in Chinese for the core workflow. There is no explicit opt-in or alternative localized instruction path for users who may prefer another language.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The user-facing description, usage text, errors, and output strings are entirely in Chinese, and the file does not indicate that the language is optional or region-specific. Under the policy, forcing a specific language without user opt-in is a natural-language locale constraint that should be documented or made optional.

Intent-Code Divergence

Low
Confidence
94% confidence
Finding
The comment says non-JSON input is handled as plain-text material such as '直接粘贴的合同全文', which describes contract-document processing. The surrounding code and manifest clearly implement VAT input/output table checking only, so this inline documentation contradicts the actual intent and accepted material type.

Static analysis

No suspicious patterns detected.