Back to skill

Security audit

Tencent COS Uploader

Security checks for vulnerabilities and agentic risk

Overview

This skill transparently uploads a user-selected file to Tencent COS and creates signed sharing links, with some ordinary cloud-sharing safety caveats.

Install only if you intend to upload chosen files to your Tencent COS bucket and share them through signed URLs. Use least-privilege or temporary COS credentials, prefer environment variables over command-line secrets, keep link expirations short, verify the destination bucket/key, and do not use the HTTP scheme for real data.

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 (4)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:14
Finding

Unpinned Third-Party COS SDK Dependency

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cos_upload_and_presign.py:67
Finding

Plaintext HTTP Transport Can Be Explicitly Enabled

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cos_upload_and_presign.py:69
Finding

Cloud Credentials Can Be Supplied Through Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/cos_upload_and_presign.py:66
Finding

Presigned URL Expiration Has No Enforced Upper Bound

Content
View full analysis
0", file=sys.stderr) return 2 ``` The unchecked value is then used for both generated URLs: ```python view_url = client.get_presigned_url( Method="GET", Bucket=bucket, Key=key, Expired=args.expires, ) ``` ```python download_url = client.get_presigned_download_url( Bucket=bucket, Key=key, Expired=args.expires, Params=download_params, ) ``` ### Technical Analysis Presigned URLs function as bearer credentials: possession of a valid URL is generally sufficient to access the referenced object until the signature expires. The implementation rejects zero and negative values but does not enforce a maximum expiration period. A user, copied command, or automation error can therefore request an excessively long validity period, subject to any limits independently enforced by Tencent COS. The URLs are printed in JSON output and may subsequently be retained in terminal scrollback, logs, chat transcripts, CI artifacts, or monitoring systems. This issue does not itself leak the generated URL. It increases the security impact and exploitation window if a URL is disclosed through another channel. ### Attack Path 1. A user or automation supplies an excessively large positive `--expires` value. 2. The script accepts the value because it only checks whether it is greater than zero. 3. The script generates and prints view and download URLs using that expiration value. 4. A URL is copied into an insecure channel or retained in logs, terminal history, build output, or monitoring data. ...[truncated 878 chars]
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 (6)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill performs operations that rely on environment credentials and outbound network access to Tencent COS, but the manifest does not declare any tool scope or allowed-tools constraints. This weakens least-privilege controls and can allow the skill to access secrets or make network calls without explicit policy visibility, increasing the risk of unintended data exposure or misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The trigger description is broad enough to match many generic storage, upload, bucket, or sharing-link requests, which can cause the skill to activate outside narrowly intended scenarios. In a skill that uploads local files and generates presigned URLs, overbroad activation raises the chance of accidental file exfiltration, unnecessary credential use, or network operations on sensitive user data.

Content

No source excerpt is available for this finding.

Cloud Storage Exfiltration

Medium
Category
Data Exfiltration
Confidence
55% confidence
Finding

Data is uploaded to cloud storage (S3 / GCS / Azure Blob). This may be a legitimate backup or exfiltration to an external bucket. Manual review is recommended.

Content

Scanner excerpt · scripts/cos_upload_and_presign.py (reported line 132)May include surrounding context.

python
)
        client = CosS3Client(config)

        upload_result = client.upload_file(
            Bucket=bucket,
            LocalFilePath=str(local_path),
            Key=key,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code performs network transmission of a user-supplied local file to cloud storage and creates presigned access links, which can expose file contents to remote systems and downstream recipients. Although the argparse description states the functional purpose, there is no explicit warning, confirmation, or user-facing disclosure about the privacy and sharing implications of uploading local data and emitting access URLs.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

The invocation guidance is written as a Chinese-language condition tied to what the user 'mentions,' which implicitly constrains activation behavior to one language. There is no indication that equivalent English or multilingual phrasing is supported, nor any user opt-in for language preference.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The default prompt is written only in Chinese and instructs the skill behavior in that language, which can impose a specific language choice without offering the user an alternative. The policy for this category flags language or locale constraints unless the skill explicitly provides user choice or clearly justifies the restriction.

Content

No source excerpt is available for this finding.