Back to skill

Security audit

银行流水对账虾

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a local bank-reconciliation helper, but it overstates key financial capabilities and can expose raw sensitive rows during preview.

Review before installing. Use it only with explicit local bank and order files, avoid the preview command on real data unless output logs are private, do not rely on invoice, Feishu export, historical, or multi-account claims, and pin dependencies in an isolated environment.

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

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/reconcile.py:287
Finding

Raw Financial and Personal Data Is Exposed by the Preview Command

Content
View full analysis

Vulnerability Details

File Location: scripts/reconcile.py, lines 287-292; related disconnected sanitization implementation at lines 58-74
Vulnerability Type: Sensitive-data exposure through application output
Risk Level: Medium

Vulnerable Code

python
def desensitize_dataframe(df: pd.DataFrame) -> pd.DataFrame:
    """对敏感字段脱敏(仅用于展示,不影响匹配计算)"""
    df = df.copy()
    for col in df.columns:
        col_lower = col.lower()
        if any(k in col_lower for k in ["账号", "account"]):
            df[col] = df[col].astype(str).apply(
                lambda x: x[:4] + "****" + x[-4:] if len(x) >= 8 else "****")
        elif any(k in col_lower for k in ["姓名", "name", "户名"]):
            df[col] = df[col].astype(str).apply(
                lambda x: x[0] + "**" if len(x) >= 2 else "**")
        elif any(k in col_lower for k in ["手机", "phone", "mobile"]):
            df[col] = df[col].astype(str).apply(
                lambda x: re.sub(r"(\d{3})\d{4}(\d{4})", r"\1****\2", x))
    return df
python
def cmd_preview(args):
    print(f"📂 预览文件: {args.file}")
    df = load_file(args.file)
    print(f"\n列名: {list(df.columns)}")
    print(f"行数: {len(df)}")
    print(f"\n前 5 行:")
    print(df.head().to_string())

Technical Analysis

The project implements desensitize_dataframe(), but no audited execution path invokes it. In particular, cmd_preview() loads the input into df and immediately prints the first five rows in their original form.

Bank and reconciliation files can contain account numbers, customer names, phone numbers, transaction identifiers, balances, and other financial information. Consequently, the preview output can disclose raw sensitive values to terminal history, redirected output files, centralized process logs, CI/CD logs, agent transcripts, or any user able to observe the invoking process.

This behavior also contradicts `references/desensitization- ...[truncated 1417 chars]

Remediation
View remediation

Remediation Suggestions

  1. Apply sanitization before every display path:
    python
    safe_df = desensitize_dataframe(df)
    print(safe_df.head().to_string())
    
  2. Keep raw data only for reconciliation calculations and use a separate sanitized copy for previews, reports, exports, diagnostics, and error messages.
  3. Extend sanitization to the documented identity-card and email fields and use normalized column-name matching.
  4. Default to a minimal preview containing only recognized date, amount, and sanitized identifier fields. Require explicit informed consent to display raw rows.
  5. Add automated tests proving that account numbers, names, phone numbers, identity-card numbers, and email addresses never appear in preview output.
  6. Review all logging and exception paths to ensure that raw data frames and sensitive cell values are not emitted.
  7. Update the documentation so it accurately describes when sanitization occurs and which fields it covers.

T08 · Insecure Dependencies

Note
Location
SKILL.md:92
Finding

Dependency Installation Instructions Use Unpinned Package Versions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 92
Vulnerability Type: Unpinned third-party dependencies
Risk Level: Low

Vulnerable Code

bash
pip install pandas openpyxl

Technical Analysis

The installation command does not constrain versions or verify package integrity. Each installation therefore resolves whatever versions of pandas, openpyxl, and their transitive dependencies are available from the configured package index at installation time.

This makes builds non-reproducible and allows future upstream releases or a compromised package index to change the installed code without any modification to the audited skill. Although the package names are legitimate and the audited project contains no evidence of dependency confusion or an intentionally malicious package, the absence of version and hash controls weakens supply-chain integrity.

Attack Path

  1. An operator follows the documented installation command.
  2. pip contacts the operator's configured package index and resolves the latest compatible packages and transitive dependencies.
  3. If an upstream release or configured index is compromised, malicious or unexpectedly vulnerable package code can be installed.
  4. Importing pandas or using the affected dependency during reconciliation executes that package code with the privileges of the user running the script.

This path depends on an external package or repository compromise; no such compromise is present in the audited files.

Impact Assessment

If the external supply chain were compromised, dependency code would execute with the same privileges as the invoking user and could access input financial files, generated reports, environment variables, and other resources available to that account. In the currently audited project, this is a hardening deficiency rather than evidence of active malicious behavior.

Remediation
View remediation

Remediation Suggestions

  1. Add a version-controlled dependency file with tested, exact versions, such as:
    text
    pandas==<tested-version>
    openpyxl==<tested-version>
    
  2. Generate and enforce cryptographic hashes using a lock-file workflow such as pip-tools, and install with pip install --require-hashes -r requirements.txt.
  3. Pin transitive dependencies through a lock file rather than constraining only direct dependencies.
  4. Use a trusted package index over TLS and avoid untrusted index or extra-index configuration.
  5. Run dependency vulnerability scanning and automated update review before changing locked versions.
  6. Perform installation and reconciliation in an isolated virtual environment or container with access limited to the required input and output paths.
Vulnerability Patterns
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The skill advertises capabilities that are not actually implemented, including three-way reconciliation with invoices, Feishu Bitable export, and historical or multi-account reconciliation. In a financial workflow, this can cause operators to rely on incomplete automation, miss unmatched invoice discrepancies, or assume reports were exported or validated when they were not, creating integrity and audit risks.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Using an overly broad trigger term like “对账” can cause the skill to activate in unintended contexts, potentially leading the agent to request or process sensitive financial files when the user did not intend to invoke this specific workflow. Because the skill handles bank statements, orders, and invoices, accidental invocation increases privacy and operational risk even without code execution.

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 file presents all operational guidance, labels, and examples only in Chinese. Because the file does not offer an alternate language, opt-in, or justification that the skill is intended solely for a Chinese-speaking or region-specific context, it may violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill metadata and CLI imply support for invoice-inclusive three-way reconciliation, but the implementation only reconciles bank transactions against orders and merely prints a message when invoices are supplied. In a financial reconciliation context, this can mislead users into believing invoice verification occurred, creating integrity gaps, missed discrepancies, and potentially incorrect financial sign-off.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The preview path exposes full user-provided financial records in plain output, and this skill’s context makes that especially sensitive because the inputs are likely to contain bank transaction data and personal information. In agent or hosted environments, stdout is often retained in logs or visible to operators, so a simple preview action can become a data leakage event.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The preview command prints raw dataframe rows from user-supplied bank/order files directly to stdout without masking. Because this skill handles banking, invoice, and personal records, console output can expose account numbers, names, phone numbers, transaction identifiers, and amounts to logs, terminals, chat transcripts, or shared execution environments.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

文件中的名称、描述和操作说明均固定为中文,未看到任何关于语言可选、跟随用户语言或仅适用于中文财务团队的明确说明。按规则,强制单一语言而无用户选择或合理约束说明,属于自然语言层面的语言/locale 策略风险。

Content

No source excerpt is available for this finding.

Vague Triggers

Low
Category
Not specified by scanner
Confidence
76% confidence
Finding

该示例会被读者理解为自然语言即可触发,但文档没有明确说明必须提供可解析的银行流水/订单文件,容易让调用条件显得过宽。对于基于上传表格进行处理的技能,触发条件若不绑定输入约束,可能造成误触发或错误预期。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Natural-language strings in the module docstring and CLI help are Chinese-only, and there is no indication that users may choose another language or that the tool is intentionally restricted to a Chinese-only audience for compliance reasons. This can violate language/locale policy when skills are expected to avoid forcing a language without opt-in.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.