Back to skill

Security audit

TencentCloud LicensePlate OCR

Security checks for vulnerabilities and agentic risk

Overview

This license-plate OCR skill has a coherent purpose, but its local-file input can upload arbitrary readable files to Tencent Cloud if misused.

Review before installing. Use this only in a restricted environment, pass only intended vehicle images or trusted image URLs, avoid letting an agent choose local file paths automatically, and set Tencent Cloud credentials with least privilege. The publisher should add image validation, clearer third-party data disclosure, and pinned dependencies before this is treated as low-risk.

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/main.py:57
Finding

Arbitrary Local File Disclosure Through Insufficient Image Validation

Content
View full analysis
str: if os.path.isfile(value): with open(value, "rb") as f: raw = f.read() try: raw_str = raw.decode("utf-8").strip() base64.b64decode(raw_str, validate=True) return raw_str except (UnicodeDecodeError, ValueError): pass if len(raw) > MAX_IMAGE_SIZE_BYTES: sys.exit(1) encoded = base64.b64encode(raw).decode("utf-8") return encoded ``` The resulting data is assigned to the Tencent Cloud request and transmitted externally: ```python if args.image_url: req.ImageUrl = args.image_url elif args.image_base64: req.ImageBase64 = load_image_base64(args.image_base64) else: sys.exit(1) try: resp = client.LicensePlateOCR(req) except TencentCloudSDKException as e: sys.exit(1) ``` ### Technical Analysis The `--image-base64` argument accepts either Base64 content or any path for which `os.path.isfile()` returns true. When a path is supplied, the script reads the entire file without first verifying that it is a supported PNG or JPEG image. If the file contains valid Base64 text, the decoded content is not checked for an image signature or decoded-size limit before being returned. Otherwise, any binary file of up to 10 MB is Base64-encoded and assigned to `req.ImageBase64`. The resulting content is transmitted to `ocr.tencentcloudapi.com` through the Tencent Cloud SDK. Base64 encoding is required for the declared OCR operation and is not inherently covert. The vulnerability arises because the implementation does not constrain encoding and transmission to legitimate image files. This behavior exceeds the minimum privileges required for license-plate OCR. The feature ...[truncated 1922 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:32
Finding

Unpinned Tencent Cloud SDK Dependency

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • 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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill requires access to environment variables for Tencent Cloud credentials, but it does not declare any explicit tool scope or permissions boundary. This can lead to overbroad execution context where the agent may access secrets without clear authorization controls or user visibility.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill sends uploaded image content and recognized license plate data to Tencent Cloud, but the description does not warn users that a third-party service will receive potentially sensitive personal information. License plate numbers and vehicle images can be privacy-sensitive, so omitting this disclosure undermines informed consent and can lead to unintended data exposure.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The trigger conditions include a catch-all phrase for 'any scenario involving plate OCR recognition,' which is overly broad and can cause the skill to activate in contexts the user did not clearly intend. In an agent setting, broad triggers increase the chance of unnecessary third-party data transfer of images and extracted license plate information.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.