Back to skill

Security audit

工资审核助手

Security checks for vulnerabilities and agentic risk

Overview

This payroll-audit skill is related to its stated purpose, but it overstates automation and directs sensitive payroll reports to external Feishu delivery without enough user control or safety detail.

Review carefully before installing. Treat it as a payroll checklist/report helper, not a fully automated payroll audit system. Do not let it upload reports to Feishu unless a human confirms the exact destination and data being sent, and do not open or share generated HTML from untrusted payroll inputs until output escaping is fixed.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/generate_html_report.py:87
Finding

Stored HTML and SVG Injection in Generated Payroll Reports

Content
View full analysis
{short_name}' ) ``` It also inserts audit item names, summaries, details, priorities, and count values directly into HTML: ```python def generate_audit_cards(audit_results): """Generate audit-item status cards.""" cards = [] for r in audit_results: status = r.get("status", "unknown") status_icon = {"pass": "✅", "warning": "⚠️", "error": "❌", "unknown": "❓"}.get(status, "❓") priority = r.get("priority", "P1") priority_class = f"priority-{priority.lower().replace('(', '').replace(')', '')}" details_html = "" if r.get("details"): details_html = "
    " + "".join(f"
  • {d}
  • " for d in r["details"]) + "
" card = f'''
{status_icon} {r.get("audit_item", "Unknown")} {status.upper()}

{r.get("summary", "")}

{details_html} {f"

Statistics: {r['counts']['total_unique']} total, {r['counts']['in_both']} matched

" if "counts" in r else ""}
''' cards.append(card) return '\n'.join(cards) ``` Material names, risk descriptions, and processing-log values are similarly interpolated w ...[truncated 4592 chars]
Remediation
View remediation
` - `` - SVG closing tags - Quotes and malformed attributes - `javascript:` URLs - Markdown pipes and embedded HTML 8. Consider applying a restrictive Content Security Policy to generated reports as defense in depth, while not treating CSP as a substitute for output encoding. ]]>

other

Warning
Location
SKILL.md:211
Finding

Automatic External Transmission of Sensitive Payroll Reports Without Explicit Per-Run Consent

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

该代码确实与“工资审核”领域相关,且包含‘交叉验证’这一声明中的子能力,因此不是完全无关代码。但其实际能力明显小于声明:它本质上是一个底层交叉验证脚本,而不是所描述的完整工资审核 AI 技能。代码只支持单项校验、有限规则、CSV 输入和 Markdown/JSON 输出;缺少飞书文档、HTML 可视化、图表、10 项核心审核覆盖、月份/区域/特殊情况处理、国内海外差异逻辑以及端到端自动化编排。因此描述对整体能力存在明显夸大,构成描述与行为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个端到端工资审核技能,核心能力应包括:读取/处理工资相关数据、执行多项审核规则、做交叉验证,并生成多种形式的报告。而实际代码块的职责明显更窄,只是报告展示层组件。它接收外部 JSON 文件作为输入,依据其中已有的 audit_results 等字段拼装 HTML 页面,附带一个以内联 SVG 绘制的简单风险对比图。虽然它与声明中的“HTML 可视化报告”部分一致,且主题确实是工资审核报告,但它没有实现该技能宣称的大部分主要能力,因此描述与实际代码行为存在实质性不匹配。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill expands from payroll auditing into backup, restoration, batch execution, rollback, and upsert-style mutation workflows, which exceed the minimum privileges expected for a read-oriented audit skill. In a payroll environment, undocumented or weakly constrained mutation and restore behavior can alter compensation records or create bulk data integrity issues affecting many employees.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

Broad trigger phrases can cause the skill to activate during ordinary payroll-related conversations, leading the agent to produce audit guidance or request sensitive payroll materials when the user did not intend to invoke the skill. In an HR/payroll context, accidental activation is more dangerous because it may steer handling of highly sensitive employee compensation data and increase the chance of unnecessary data collection or disclosure.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The manifest describes a fully automated payroll audit workflow covering 10 audit elements, cross-validation, and support for domestic/overseas employee auditing. In this file, the skill is described as automatically reading rule files and generating a customized audit report/checklist, with later steps still requiring humans to request materials from HR and execute the checks manually. That is a meaningful mismatch in claimed automation and actual documented behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
80% confidence
Finding

The skill describes reading and writing local files, including generating reports under /tmp and using templates/scripts, but does not declare any explicit tool scope or permission boundaries. In a payroll context, that creates unnecessary ambiguity around what filesystem access is expected, increasing the risk of over-broad file operations against highly sensitive HR, compensation, and tax data.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The documentation promises zero-human-intervention automation while also acknowledging discrepancy states that require manual verification. In a sensitive payroll-review workflow, that contradiction can cause operators to over-trust incomplete results and approve payroll despite unresolved warnings, leading to financial or compliance errors.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Promoting fully automatic payroll-data processing without a warning about the sensitivity of HR, compensation, and tax records encourages unsafe handling of regulated personal data. In this context, users may upload or process entire payroll datasets without understanding the confidentiality and compliance implications.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill instructs sending payroll reports to Feishu and writing them to local files without clearly warning that the content includes highly sensitive salary, tax, social insurance, and personnel data. This creates a real risk of unintended disclosure through chat platforms, local temporary storage, retention, or access by unauthorized users on the host system.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

L012-L023 将当前版本描述为“工资审核辅助工具”,只能把规则转化为定制化月度审核清单,且不能自动发现数据异常或直接读取工资系统数据。与此同时,L048-L060 的调用示例明确要求 subagent“生成审核报告”并按报告模板输出,这与前述“当前版本”能力表述存在直接文档层面的矛盾。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The manifest describes one-shot generation of a complete payroll audit report with three output formats and visualization/status tracking. This file is instead a blank monthly checklist with placeholders, unchecked items, empty anomaly tables, and no evidence of generated report content, Feishu output, HTML visualization, or chart/status-comparison artifacts.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest says the skill performs the payroll audit end-to-end automatically and generates outputs with no manual intervention. However, this file is a human-operated checklist instructing users to copy the document monthly, tick completed items, record exceptions, and includes manual auditor/reviewer/approver signature sections, indicating a manual workflow rather than autonomous execution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file contains user-facing policy/instruction content entirely in Chinese, and there is no indication that users may choose another language or that the skill is intentionally restricted to a Chinese-speaking or region-specific audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Natural-language strings throughout the file, including the docstring, CLI descriptions, HTML labels, and the HTML lang attribute, are fixed to Chinese/zh-CN. The file does not provide any language selection or explain that the skill is intentionally restricted to a Chinese-speaking or region-specific context.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The report presents a 'current month vs previous month' risk comparison but fabricates prior-month values instead of reading real historical data. In a payroll-audit context, this can mislead operators into trusting a false trend signal and making compensation-release decisions based on inaccurate compliance evidence.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

该文件生成的最终 HTML 报告明确写明“本报告由 AI 辅助生成,最终审核结果需人工确认”,表示流程并非完全无需人工介入。与技能清单中“全流程自动执行,无需人工介入”的对外宣称相比,这是直接的意图性冲突,而不只是实现细节缺失。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

This code writes a generated HTML report containing payroll audit results, risk alerts, and processing logs to the path supplied by the user. Although it prints the output path afterward, there is no prior warning in code comments or user-facing messaging that sensitive audit data will be persisted to disk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This markdown template is entirely written in Chinese and provides no indication that the language is optional, user-selectable, or limited to a documented Chinese-speaking context. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The template explicitly sets the document language to "zh-CN", which enforces a specific locale in the rendered output. Under the policy, hard-coding a language/locale without user opt-in or documented region-specific justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the payroll audit workflow is '全流程自动执行,无需人工介入' (fully automatic, no human intervention). However, the footer text in the generated report says '最终审核结果需人工确认', which signals that the audit outcome is not actually fully autonomous and requires manual review.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

README 全文以中文指示安装与使用方式,并通过中文示例语句定义交互方式,但未说明是否支持其他语言,也未给用户提供语言/locale 选择。根据语言/locale 政策,若技能交互被自然语言文档隐含限定为单一语言而无用户选择,属于潜在策略违规。

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest explicitly claims three output channels: Markdown report, Feishu document, and HTML visual report with charts and audit-state tracking. The README only describes generating a structured audit report/checklist and does not document any Feishu or HTML report generation behavior, suggesting the implemented or documented functionality is more limited than the manifest states.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

The manifest-style header and usage triggers are written exclusively in Chinese, including the label and invocation examples, without indicating that another language may be used. This can constitute a language/locale policy issue when the skill implicitly constrains interaction language without user opt-in or documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This markdown file contains user-facing instructions entirely in Chinese, including the invocation examples and assistant naming, but does not state that the skill is region-specific or provide an opt-in language/locale choice. Under the natural-language policy rule, forcing a specific language without user choice can be a locale policy violation unless clearly justified.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
80% confidence
Finding

L022 表示“当前版本”不能直接读取工资系统数据,暗示现阶段无系统级数据接入;而 L141-L155 将“自动读取工资数据/对接飞书表格自动读取数据”作为后续规划,说明文档对“当前是否仅规则驱动、是否已具备任何自动数据读取能力”表达不够一致。虽然不一定反映真实代码行为,但属于文档意图边界的冲突。

Content

No source excerpt is available for this finding.