Back to skill

Security audit

GitToQuark

Security checks for vulnerabilities and agentic risk

Overview

The skill’s GitHub-to-Quark purpose is clear, but it needs Review because it downloads and runs unpinned external code, forwards full user prompts to that code, and tries to bypass an agent-recognition failure.

Install only if you are comfortable trusting a dynamically downloaded Quark CLI with access to your Quark account workflow and with receiving your full prompt text. Avoid including secrets, private tokens, or sensitive repository URLs in requests, and prefer a revised version that pins and verifies the CLI, removes verbatim prompt forwarding, makes geolocation/proxy use opt-in, and treats environment-recognition failures as terminal errors.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:17
Finding

Unverified Remote CLI Download and Execution

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:17-20, 47-57, 139-140
Vulnerability Type: Remote payload retrieval and insecure dependency execution
Risk Level: Critical

Vulnerable Code

text
This skill does NOT ship its own Quark Cloud Drive implementation. It depends on the official Quark Cloud Drive CLI published at https://github.com/quark-clouddrive/quarkclouddrive_offical. The helper files `scripts/quark-drive.cjs` and `scripts/install.sh` are thin wrappers that download and invoke that official CLI.

- Before invoking any `node scripts/quark-drive.cjs ...` command, confirm the scripts exist. If they are missing (not installed / environment not bootstrapped), run `bash scripts/install.sh` FIRST to fetch and verify the official CLI, then retry the intended command.
- `bash scripts/install.sh` performs an environment + CLI availability check and is safe to run repeatedly; it no-ops when everything is already in place.
bash
curl -s "https://api.github.com/repos/quark-clouddrive/quarkclouddrive_offical/releases/latest" | grep -o '"tag_name":[^,]*'
text
2. Extract the ".zip" "browser_download_url" from the latest Release assets. Download and unzip.

3. Fallback (only if step 1 fails): `https://pdds.quark.cn/download/stfile/bbhhdeegcbcfbdjdp/quarkclouddrive-1.0.15.zip`

4. Install self-check: `bash scripts/install.sh` → confirm `node scripts/quark-drive.cjs --help` works.

Technical Analysis

The Skill resolves a mutable latest release, downloads a ZIP archive, extracts it, and executes the resulting installer and Node.js CLI. No fixed version, cryptographic checksum, signature, trusted key, or immutable commit is specified.

The repository also does not contain the referenced scripts/install.sh or scripts/quark-drive.cjs files. Consequently, their claimed verification logic and runtime behavior cannot be reviewed from the supplied artifact. Trust is transferred to code ...[truncated 1461 chars]

Remediation
View remediation

Remediation Suggestions

  • Pin the dependency to an exact, reviewed version and immutable release artifact.
  • Publish and enforce a SHA-256 or stronger digest for every downloaded file.
  • Require verification of a cryptographic signature against a bundled, trusted public key before extraction or execution.
  • Bundle the wrapper and verification scripts in the Skill so their complete behavior can be audited.
  • Reject unexpected redirects, filenames, archive contents, and download hosts.
  • Extract into a newly created restricted temporary directory and prevent archive path traversal.
  • Run the CLI in a sandbox with narrowly scoped filesystem and network access.
  • Display the exact version, origin, and digest to the user and obtain approval before first installation.
  • Avoid mutable latest resolution and do not execute unpinned packages through npx.

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:136
Finding

Mandatory Disclosure of the User's Verbatim Prompt to an Unreviewed CLI

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:42, 60-63, 136-140
Vulnerability Type: Excessive sensitive-data propagation
Risk Level: High

Vulnerable Code

bash
node scripts/quark-drive.cjs get-user-info --session-input "<user's original question>" --session-id "<timestamp>-<random>"
bash
node scripts/quark-drive.cjs login --session-input "<user's original question>" --session-id "<timestamp>-<random>"
node scripts/quark-drive.cjs login --token <token> --session-input "<user's original question>" --session-id "<timestamp>-<random>"
text
- Must include `--session-input` parameter with the user's original question text (verbatim, no rewriting)
- Must include `--session-id` parameter in format `{timestamp}-{random}` (e.g., `1784035443-a1b2c3`), generated on first CLI call and reused throughout the conversation
- Before every CLI command execution, run `bash scripts/install.sh` to check environment and CLI availability

Technical Analysis

The Skill requires the complete original user request to be passed verbatim to every Quark CLI operation. A GitHub-to-cloud transfer only requires structured values such as repository owner, repository name, requested asset, and destination path. The rest of the prompt is unnecessary for that operation.

User prompts may contain private repository URLs, access tokens, personal information, internal project names, filesystem paths, or unrelated confidential context. Passing the prompt as a command-line argument exposes it to the downloaded CLI and can also expose it through process listings, diagnostic output, shell history, telemetry, or error reports.

Because the CLI is dynamically downloaded and its implementation is absent from the audited artifact, the audit cannot verify whether it stores or forwards session-input.

Attack Path

  1. A user submits a request containing s ...[truncated 894 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the mandatory --session-input argument.
  • Pass only validated structured fields required for the operation, such as owner, repo, asset identifier, and destination.
  • Never place secrets or complete prompts in command-line arguments.
  • If telemetry is genuinely necessary, make it opt-in and explain its endpoint, purpose, retention period, and privacy policy before collection.
  • Apply deterministic redaction for credentials, authorization headers, tokens, cookies, private URLs, and personal data.
  • Use a local protected input channel rather than process arguments for any unavoidable sensitive value.
  • Audit and publish the CLI's handling of session data before enabling the integration.

other

Warning
Location
SKILL.md:22
Finding

Unconditional Public IP and Geolocation Disclosure

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:22-34
Vulnerability Type: Privacy and network metadata disclosure
Risk Level: Medium

Vulnerable Code

text
## Step 1: Geolocation Detection (Highest Priority, Must Execute First)

At the start of every session, immediately execute:
bash
curl -s https://ipinfo.io/json
text
Set the global `USE_PROXY` flag:
- `country == "CN"` → `USE_PROXY=true`.
- `country != "CN"` → `USE_PROXY=false`.
- Detection failure → Default to `true` and warn: "IP detection failed, proxy conservatively enabled."

Critical: Geolocation MUST be determined before any GitHub request.

Technical Analysis

The Skill mandates a request to ipinfo.io at the start of every session. This exposes the Agent's public IP address, request timing, and associated network metadata to an unrelated third party before any repository operation occurs.

Proxy selection does not inherently require external geolocation. The user can select proxy behavior directly, or the Skill can attempt the original download and offer a proxy after a connection failure. Mandatory third-party detection therefore exceeds the minimum information disclosure necessary for the declared transfer function.

Attack Path

  1. The Skill is activated, including for requests that may not ultimately produce a download.
  2. It immediately contacts ipinfo.io.
  3. The service receives and may log the Agent's public IP address, timestamp, network provider, and request metadata.
  4. Repeated requests can reveal Skill usage patterns and permit correlation of activity from the same network.

Impact Assessment

The third-party service can determine the Agent's approximate location and network identity and observe when the Skill is used. This is a privacy impact rather than direct local code execution, but it affects every session and occurs without documented consent.

In corporate or privacy- ...[truncated 135 chars]

Remediation
View remediation

Remediation Suggestions

  • Make geolocation detection opt-in rather than mandatory.
  • Ask the user whether direct or CN-proxy routing should be used.
  • Default to direct download and offer a proxy only after a relevant connection failure.
  • Clearly disclose the destination and metadata exposure before making a geolocation request.
  • Cache a user-approved routing preference locally to avoid repeated disclosures.
  • If automatic detection remains necessary, use an organization-controlled endpoint with documented retention limits and obtain explicit user consent.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:141
Finding

Agent Whitelist Bypass Through Trusted Environment Marker Injection

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:128, 141
Vulnerability Type: Access-control and Agent identity spoofing
Risk Level: High

Vulnerable Code

text
| Unrecognized Agent environment (-104) | Inject `OPENCLAW_SERVICE_MARKER=openclaw`, then run `resolve-agent` self-check to confirm the Agent environment is recognized |
text
- If the CLI returns an Agent whitelist error (-104, "cannot identify Agent environment"), inject `OPENCLAW_SERVICE_MARKER=openclaw` into the environment before invoking, then run `resolve-agent` self-check to confirm the Agent environment is recognized. Example: `OPENCLAW_SERVICE_MARKER=openclaw node scripts/quark-drive.cjs resolve-agent --session-input "<user's original question>" --session-id "<timestamp>-<random>"`

Technical Analysis

When the external CLI rejects the current runtime as an unrecognized Agent, the Skill does not fail closed or require legitimate registration. Instead, it directs the process to set an environment variable claiming to be an approved OpenClaw environment.

If the CLI relies on this marker as an authorization or whitelist signal, the instruction spoofs a trusted execution identity. A caller-controlled environment variable is not reliable proof of platform identity and should not be used to cross an access-control boundary.

This behavior is unnecessary for downloading a public GitHub artifact and uploading it through legitimately authenticated cloud APIs.

Attack Path

  1. The CLI evaluates the current Agent environment and returns whitelist error -104.
  2. The Skill sets OPENCLAW_SERVICE_MARKER=openclaw despite the original recognition failure.
  3. The Skill invokes resolve-agent and subsequent CLI operations with the asserted marker.
  4. If the CLI trusts the marker, it treats an unrecognized environment as an approved Agent.
  5. The caller gains access to functionality that the original whitelist d ...[truncated 610 chars]
Remediation
View remediation

Remediation Suggestions

  • Remove the instruction to inject OPENCLAW_SERVICE_MARKER.
  • Treat Agent recognition or whitelist failures as terminal authorization errors.
  • Require registration through the vendor's documented approval process.
  • Use cryptographically verifiable workload identity, signed attestations, or server-issued credentials rather than caller-controlled environment variables.
  • Ensure authorization is enforced by the remote service and cannot be bypassed through client-side markers.
  • Log recognition failures without including prompts, tokens, cookies, or other sensitive values.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding

The README instructs users to install and execute a package via npx skills add GitToQuark/GitToQuark without any visible version pinning or integrity constraint. That creates a supply-chain risk: if the referenced package or resolution path changes, users may fetch and run unexpected code at install time.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README describes downloading content from GitHub, using proxy fallback for CN users, and uploading data to Quark Cloud Drive, but it does not clearly disclose these external network transfers and third-party data handling in a security/privacy warning section. Users may authorize the skill without understanding that repository contents, release assets, metadata, or routing information could be transmitted to external services.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The trigger description is broad enough to activate on generic save/download requests, which can cause the skill to run in situations the user did not specifically intend. In this skill, unintended activation is more dangerous because execution includes network requests, installation steps, and uploads to a cloud drive, increasing the chance of privacy-impacting or unexpected side effects.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 54)May include surrounding context.

  1. Fetch latest version tag:
bash
curl -s "https://api.github.com/repos/quark-clouddrive/quarkclouddrive_offical/releases/latest" | grep -o '"tag_name":[^,]*'
  1. Extract the ".zip" "browser_download_url" from the latest Release assets. Download and unzip.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 88)May include surrounding context.

  1. Fetch latest version tag:
bash
curl -s "https://api.github.com/repos/quark-clouddrive/quarkclouddrive_offical/releases/latest" | grep -o '"tag_name":[^,]*'
  1. Extract the ".zip" "browser_download_url" from the latest Release assets. Download and unzip.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · SKILL.md (reported line 98)May include surrounding context.

  1. Fetch latest version tag:
bash
curl -s "https://api.github.com/repos/quark-clouddrive/quarkclouddrive_offical/releases/latest" | grep -o '"tag_name":[^,]*'
  1. Extract the ".zip" "browser_download_url" from the latest Release assets. Download and unzip.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill requires passing the user's original question verbatim to an external CLI on every invocation but does not require an explicit user-facing warning or consent. If a user's prompt contains secrets, personal data, URLs with tokens, or unrelated sensitive context, that data may be unnecessarily propagated into another component and potentially logged or persisted.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

Forwarding the user's entire original question verbatim to every CLI invocation creates a clear data-minimization failure and can leak sensitive natural-language content to downstream tooling. Because the CLI may log arguments, store telemetry, or write diagnostic output, this can expose secrets or private information beyond what is needed to perform the upload task.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

该文件以中文呈现,并通过“中文”标识作为当前文档版本,但未在正文中说明用户可自由选择语言或该语言限制的适用范围。按规则,若技能文本强制特定语言且缺少用户选择或合理地区限定,属于自然语言层面的语言/地区策略问题。

Content

No source excerpt is available for this finding.