Back to skill

Security audit

Minio Share

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent MinIO file-sharing helper, but it needs review because it can upload user files externally using storage credentials and includes an unsafe TLS-bypass option.

Install only if you intend agents to upload selected files to your MinIO bucket and return shareable presigned links. Use tightly scoped MinIO credentials, avoid sensitive files unless approved, confirm each remote download/upload, pin the minio dependency, and do not use --insecure except in isolated testing.

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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:22
Finding
Unpinned MinIO Runtime Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 22-26 **Vulnerability Type**: Unpinned third-party dependency **Risk Level**: Medium ### Vulnerable Code ```markdown ## Installation Install the minio Python package if not already available: ```bash pip install minio ``` ``` ### Technical Analysis The installation command retrieves whichever version of the `minio` package is current at installation time. It does not specify a reviewed version, use a lock file, or verify a package integrity hash. Consequently, the code installed by users can differ from the code considered during this audit. If the upstream package, maintainer account, or package distribution infrastructure is compromised, a malicious future release could execute code during installation or when imported by `scripts/minio_upload.py`. This finding concerns insufficient dependency reproducibility and integrity controls. The audit did not identify evidence that the current official `minio` package is malicious. ### Attack Path 1. An attacker compromises the upstream package, its maintainer account, or the package distribution channel. 2. The attacker publishes a malicious release under the expected `minio` package name. 3. A user follows the documented `pip install minio` instruction. 4. Package installation or the subsequent `from minio import Minio` import executes attacker-controlled code. 5. The malicious code runs with the privileges and environment of the user invoking the installation or upload script. ### Impact Assessment Successful exploitation could provide arbitrary code execution under the installing user's account. The malicious dependency could access files readable by that user, environment variables such as MinIO access credentials, network resources available to the process, and uploaded file contents. The scope would be limited by the operating-system privileges and isolation applied to the installation and runti ...[truncated 15 chars]
Remediation
## Remediation Suggestions 1. Pin the dependency to a specifically reviewed version, for example through a `requirements.txt` or lock file. 2. Use package hashes and install with hash verification, such as `pip install --require-hashes -r requirements.txt`. 3. Retrieve packages only from an explicitly configured and trusted package index. 4. Regularly review and update the pinned version after vulnerability and provenance checks. 5. Install and execute the dependency in an isolated virtual environment or restricted container. 6. Include the expected dependency version and integrity verification procedure in `SKILL.md`.

T09 · Insecure Skill Coding Practices

Error
Location
scripts/minio_upload.py:188
Finding
Optional Complete TLS Certificate Verification Bypass## Vulnerability Details **File Location**: `scripts/minio_upload.py`, lines 175 and 188-194; documented in `SKILL.md`, lines 119-121 **Vulnerability Type**: Disabled TLS certificate and hostname verification **Risk Level**: High ### Vulnerable Code ```python parser.add_argument('--insecure', '-k', action='store_true', help='Skip SSL certificate verification') ``` ```python # Create a custom HTTP client when SSL verification is skipped http_client = None if args.insecure and secure: http_client = urllib3.PoolManager( cert_reqs='CERT_NONE', assert_hostname=False ) ``` The unsafe mode is also explicitly documented: ```markdown - SSL errors - Use `--insecure` flag if needed (not recommended for production) ``` ### Technical Analysis When an HTTPS MinIO endpoint is configured and the user supplies `--insecure`, the script constructs an HTTP connection pool with both certificate-chain validation and hostname validation disabled. TLS encryption without server authentication does not establish that the remote peer is the intended MinIO server. Any attacker able to intercept or redirect network traffic can present an arbitrary certificate and have it accepted by the client. The attacker can then terminate the TLS connection and proxy or impersonate the MinIO endpoint. Although the access and secret keys are not sent directly as plaintext, authenticated MinIO requests contain signed authorization material. An active intermediary can observe file contents and request metadata, interfere with requests and responses, and potentially replay captured requests subject to signature scope and validity constraints. ### Attack Path 1. The user configures an HTTPS MinIO endpoint but encounters a certificate validation problem. 2. Following the documented guidance, the user invokes the script with `--insecure`. 3. An attacker obtains a network interception position or redirects endpoint traffi ...[truncated 1126 chars]
Remediation
## Remediation Suggestions 1. Remove the `--insecure` option and require authenticated TLS for HTTPS endpoints. 2. Support a user-supplied CA bundle for private certificate authorities instead of disabling verification. 3. Retain hostname validation in all HTTPS configurations. 4. If an insecure testing mode is unavoidable, require an additional explicit confirmation, emit a prominent warning to standard error, and prevent its use in production configurations. 5. Avoid documenting verification bypass as the standard response to certificate errors; provide instructions for installing the correct CA certificate instead. 6. Restrict MinIO credentials to the minimum bucket and object operations required, limiting damage if traffic is intercepted or requests are replayed.
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 (6)

Lp3

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding
The skill declares capabilities that access environment secrets and perform network operations, but it does not declare any explicit tool scope or permissions boundary. In an agent setting, this can lead to unintended invocation of a skill that uploads user files externally using configured credentials, with weak transparency and oversight.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger phrases are broad enough to match common requests like sending files, sharing files, or downloading videos, which can cause the skill to activate in contexts where the user did not intend external upload. Because the skill performs network transfer and generates shareable links, over-broad invocation increases the chance of accidental data disclosure.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The skill description does not clearly warn that files may be uploaded to an external object store and shared via presigned links. Without that disclosure, users may provide sensitive files under the assumption of local processing, leading to unintended exposure of private or regulated data.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The script exposes a user-selectable --insecure mode that disables both TLS certificate validation and hostname verification for MinIO connections. This makes uploads and presigned URL generation vulnerable to man-in-the-middle interception, allowing an attacker on the network path to capture credentials, alter uploaded content, or redirect operations to an attacker-controlled endpoint. In a file-sharing skill, this is especially risky because it handles storage credentials and user files, so transport security should not be optional without strong operational controls.

Description-Behavior Mismatch

Low
Confidence
89% confidence
Finding
The description frames the skill as an uploader/link generator, but the workflow also instructs downloading remote files first. This mismatch hides a material behavior change: the skill may fetch arbitrary remote content before uploading it, increasing SSRF, malware retrieval, bandwidth abuse, and user-surprise risk.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
The example markdown output uses Chinese labels such as "文件名" and "链接有效期" without indicating that language is selectable or tied to user preference. This may violate a language/locale policy if the skill defaults to a specific language without user opt-in.

Static analysis

No suspicious patterns detected.