Back to skill

Security audit

financial-statement-check

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent financial-OCR purpose, but it can transmit sensitive documents or arbitrary readable local files to Tencent Cloud without tight scoping or explicit per-file consent.

Install only if you are comfortable sending selected financial documents to Tencent Cloud OCR using your Tencent credentials. Use it in a sandbox or controlled workspace, confirm each file path before OCR, avoid broad auto-invocation on sensitive records, and pin/review dependencies before production use.

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

Error
Location
scripts/table_ocr.py:57
Finding

Arbitrary Local Files Can Be Encoded and Uploaded to an External OCR Service

Content
View full analysis
MAX_IMAGE_SIZE_BYTES: print( f"错误: 文件大小超过 {MAX_IMAGE_SIZE_BYTES // (1024 * 1024)}MB 限制", file=sys.stderr, ) sys.exit(1) return base64.b64encode(raw).decode("utf-8") ``` The resulting data is subsequently assigned to the Tencent Cloud OCR request: ```python if image_url: req.ImageUrl = image_url elif image_base64: req.ImageBase64 = image_base64 else: raise ValueError("必须提供 image_base64 或 image_url 之一") ``` ### Technical Analysis The `--image-base64` option accepts either a Base64 value or a local path. When the argument resolves to an existing file, the script reads the entire file and either treats it as pre-encoded Base64 or encodes its raw contents. No validation establishes that the selected file is actually a supported image. In particular, the code does not validate: - The file's canonical path or whether it belongs to the user-provided workspace. - PNG or JPEG magic bytes. - MIME type or decoded image structure. - File extension. - Whether a symbolic link resolves outside the expected input directory. - Whether the user explicitly approved transmission of that specific file. The 10 MB size restriction limits payload size but does not prevent disclosure of credentials, private keys, configuration files, or other sensitive lo ...[truncated 1974 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:49
Finding

Runtime Dependencies Are Installed Without Version or Integrity Pinning

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (10)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The skill promises automated financial reconciliation, unit normalization, currency conversion, consistency checks, and audit-style reporting, but the described implementation does not actually enforce those controls and appears limited to OCR/text extraction plus instructions for an LLM to infer the rest. In a credit, due-diligence, or financial review workflow, this mismatch can cause users to rely on incomplete or fabricated analysis, leading to materially wrong decisions.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill states that uploaded financial PDFs/images are processed through Tencent Cloud OCR, but it does not present a clear user-facing warning that sensitive financial documents will be transmitted to a third-party cloud service. Financial statements and tax filings are highly sensitive business records, so silent external sharing creates significant confidentiality, compliance, and trust risks.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
86% confidence
Finding

The skill explicitly relies on environment-stored cloud credentials (TENCENTCLOUD_SECRET_ID / TENCENTCLOUD_SECRET_KEY) and executable scripting, but it declares no permissions or allowed-tools scope. That creates an authorization gap where an agent may access secrets or run capabilities more broadly than users expect, increasing the blast radius if the skill is invoked in the wrong context.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The skill description and prompts are entirely framed for Chinese-language use and explicitly instruct processing under Chinese accounting standards and tax rules, with outputs in Chinese conventions such as CNY and 万元. There is no indication that users may choose another language or that the locale restriction is explicitly surfaced as an opt-in constraint in the skill behavior.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The auto-trigger rules are broad enough to activate on generic terms like '财务报表', '年报', '财报', and related banking or tax phrases, which can cause unintended invocation on sensitive documents or ambiguous requests. Because this skill may then process files and send content to an external OCR provider, overly broad triggering increases the chance of unauthorized data handling and unnecessary exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file title and all operational instructions are written exclusively in Chinese, establishing the skill's behavior and outputs in a single language. Under the policy rule, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified, which this document does not do.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file includes mandatory natural-language and formatting rules such as using Chinese labels like "万元", "金额(万元,CNY)", and Chinese anomaly text "⚠️ 异常(未识别/未匹配)" as a required output format. Because the guidance is framed as mandatory and does not offer a user opt-in or language choice, it creates a locale/language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The header and usage describe OCR of financial statement PDFs/images via Tencent Cloud, but there is no explicit warning to the end user that their document contents will leave the local environment and be sent over the network to an external provider. Because the skill is designed for bank credit review, due diligence, and tax/financial statement analysis, silent transfer of this data materially increases confidentiality, privacy, and regulatory exposure.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script sends uploaded financial statement images/PDF-derived page images to Tencent Cloud OCR, which is a third-party processor. In this skill context, the documents can contain highly sensitive financial, tax, and corporate information, but the provided skill metadata does not disclose this external transfer or obtain explicit consent, creating a real data exposure and compliance risk.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
97% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. The script's user-facing error and status strings are written in Chinese throughout, but there is no opt-in, language selection, or documentation that this tool is intentionally limited to Chinese-speaking users or a region-specific context.

Content

No source excerpt is available for this finding.