Back to skill

Security audit

rustfs-upload

Security checks for vulnerabilities and agentic risk

Overview

This skill is an object-storage uploader that mostly does what it says, but it can publish local files, change persistent RustFS CLI configuration, and create buckets without enough user control.

Install only if you are comfortable with this skill uploading selected files to RustFS-compatible storage and producing public links. Use narrowly scoped credentials, verify RUSTFS_ENDPOINT, RUSTFS_BUCKET, and RUSTFS_PUBLIC_DOMAIN before each use, and be aware it may overwrite the rustfs-temp rc alias and create a bucket automatically.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/upload.sh:40
Finding

Persistent Alias Overwrite, Stale Configuration Use, and Credential Exposure

Content
View full analysis
/dev/null || true ``` ### Technical Analysis The script uses the fixed alias name `rustfs-temp`, but `rc alias set` modifies the user's persistent RustFS client configuration rather than creating an isolated, process-local alias. An existing alias with that name can therefore be overwritten without confirmation, and the original configuration is not restored after execution. The alias configuration command is followed by `|| true`, which suppresses all failures. If alias creation or replacement fails, subsequent commands may continue using a previously configured `rustfs-temp` alias. That stale alias can reference an unintended or attacker-controlled endpoint. The access key and secret key are also supplied as command-line arguments. On systems where process arguments are visible to other local users or monitoring services, the credentials may be exposed while `rc alias set` is running. ### Attack Path 1. A `rustfs-temp` alias already exists in the user's `rc` configuration and references an unintended or attacker-controlled endpoint. This may result from prior configuration, another application using the same fixed name, or prior access to the user's configuration. 2. The user invokes the upload Skill with a legitimate local file and RustFS environment variables. 3. The new `rc alias set` operation fails—for example, because of an invalid endpoint, rejected configuration, filesystem permission error, or incompatible client behavior. 4. The `|| true` construct suppresses that failure and allows execution to continue. 5. Later `rc ls`, `rc mb`, and `rc cp` operatio ...[truncated 1084 chars]
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 Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (7)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill description says it uploads files and returns a public URL, but it does not prominently warn users that the resulting object will be publicly accessible. In this context, the missing warning materially increases risk because users may provide personal, internal, or secret files without realizing the upload creates broad external access.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrase "用 rc 上传" is broad enough to match ordinary user requests about using the rc tool, causing the skill to activate in contexts where the user did not explicitly intend public object-storage upload. In this skill, unintended activation is more dangerous because the action uploads user files and returns a public URL, which can lead to accidental data exposure rather than just a harmless misfire.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The example trigger "用 rc 传一下这个文件" is ambiguous and can be interpreted as a generic file-transfer request rather than an intentional request to publish content to RustFS-backed public storage. Because the skill's effect is an upload that produces a public access link, accidental invocation could expose private files or sensitive screenshots.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script persistently modifies the RustFS CLI alias configuration by running 'rc alias set', which changes client state outside the immediate upload operation. In an agent setting this is risky because it can overwrite or plant aliases that affect later commands, potentially redirecting future uploads or confusing trust in the configured endpoint.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script goes beyond a narrowly scoped 'upload file and return link' action by creating a bucket when it does not exist. This expands remote-side effects and can unexpectedly provision storage resources in the user's account, which violates least privilege and can surprise users or agents that only intended to upload to an existing destination.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The script transmits a local file to a remote endpoint and returns a public URL, but it does not present any warning or confirmation about data leaving the local system or about the trustworthiness of the configured destination. In a skill context triggered by casual phrases, this increases the chance of unintended exfiltration to a misconfigured, attacker-controlled, or non-public-safe endpoint/domain.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script reads RUSTFS_ACCESS_KEY and RUSTFS_SECRET_KEY to authenticate against the storage service. While this is functionally expected, the visible usage/help lines do not disclose that credentials are sourced from environment variables, which is a form of sensitive data handling covered by the warning requirement.

Content

No source excerpt is available for this finding.