Back to skill

Security audit

Volcengine Db Supabase

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a coherent Volcengine Supabase operations helper, but it ships high-privilege dataplane code that can send service-role credentials to arbitrary or plaintext endpoints.

Install only in an environment where you are comfortable granting access to Volcengine credentials and Supabase service-role privileges. Avoid using SUPABASE_URL with this script unless the endpoint is verified and HTTPS, prefer the official CLI flow, confirm destructive operations manually, and pin or review external packages and demo archives before running them.

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

T09 · Insecure Skill Coding Practices

Error
Location
scripts/supabase_dataplane.py:276
Finding

Service-role credential disclosure through an attacker-controlled API endpoint

Content
View full analysis
tuple[str, str, str | None, str | None]: endpoint = env("SUPABASE_URL") key = env("SUPABASE_SERVICE_ROLE_KEY") workspace_id: str | None = None branch_id: str | None = args.branch_id if not endpoint or not key: workspace_id, branch_id = resolve_workspace_and_branch(args) if not workspace_id: raise DataPlaneError( "workspace_id is required unless SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY are set" ) if not endpoint: endpoint_payload = run_ve_aidap( "DescribeWorkspaceEndpoint", {"WorkspaceId": workspace_id, "BranchId": branch_id}, args.region, ) endpoint = extract_endpoint(endpoint_payload, args.endpoint_scheme) if not key: key_payload = run_ve_aidap( "DescribeAPIKeys", {"WorkspaceId": workspace_id, "BranchId": branch_id, "Limit": 100}, args.region, ) key = extract_api_key(key_payload, "service") return endpoint.rstrip("/"), key, workspace_id, branch_id def call_supabase_api( endpoint: str, api_key: str, path: str, method: str = "GET", json_data: Any | None = None, params: dict[str, Any] | None = None, content: bytes | None = None, timeout: float = 30.0, ) -> Any: url = f"{endpoint}{path}" if params: url = f"{url}?{urlencode(params, doseq=True)}" headers = { "apikey": api_key, "Authorization": f"Bearer {api_key}", } data = content if json_data is not None: data = json.dumps(json_data, ensure_ascii=False).encode("utf-8") headers["Content-Type"] = "application/json" for atte ...[truncated 2453 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/supabase_dataplane.py:181
Finding

Privileged API credentials and data may be transmitted over plaintext HTTP

Content
View full analysis
str | None: text = value.strip() if not text: return None if text.startswith(("http://", "https://")): return text.rstrip("/") if " " in text or "/" in text or "." not in text: return None if scheme == "http": return f"http://{text}:80" return f"https://{text}" ``` ```python headers = { "apikey": api_key, "Authorization": f"Bearer {api_key}", } data = content if json_data is not None: data = json.dumps(json_data, ensure_ascii=False).encode("utf-8") headers["Content-Type"] = "application/json" for attempt in range(3): req = urllib_request.Request(url=url, data=data, headers=headers, method=method) try: with urllib_request.urlopen(req, timeout=timeout) as response: ``` ```python parser.add_argument("--endpoint-scheme", default=env("SUPABASE_ENDPOINT_SCHEME", "http")) ``` ### Technical Analysis The default endpoint scheme is `http`, and `normalize_endpoint` explicitly constructs a plaintext URL on port 80. It also accepts an explicit `http://` endpoint without restriction. Every data-plane request includes the service-role key in request headers. Write operations can additionally transmit SQL migrations or edge-function source code in the request body. Plaintext HTTP supplies neither confidentiality nor server authentication, so any network observer or active intermediary can read or modify these requests. Although plaintext service endpoints may exist inside controlled private networks, the script does not verify that an HTTP endpoint is private, local, or protected by another authenticated transport. The default therefore fails open for sensitive traffic. ### Attack Path 1. The user invoke ...[truncated 1108 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:129
Finding

Unpinned global CLI installation and unchecked remote archive create supply-chain exposure

Content
View full analysis
--help # 任何子命令都可加 --help 看参数 ``` From `references/tool-reference.md`: ```bash curl -fsSL https://lf3-static.bytednsdoc.com/obj/eden-cn/whkph/ljhwZthlaukjlkulzlp/nextjs-supabase-filebox.zip -o filebox.zip && unzip -q filebox.zip ``` The same unchecked download and extraction command also appears in `references/workflows.md:121`. ### Technical Analysis The Skill directs installation of the latest available `@byted-supabase/cli` package globally without an exact version or integrity value. The effective executable can therefore change after the Skill has been audited. A package installation may also run package lifecycle scripts under the Agent's current user privileges. The demo archive is downloaded from a remote URL and extracted without a cryptographic digest or signature check. If the hosted object, hosting account, DNS path, or upstream build pipeline is compromised, the Agent can receive content different from what reviewers examined. Downloading the ZIP before extraction is safer than piping remote content directly into a shell, but it does not establish authenticity or integrity. Automatic extraction may also overwrite files in the current directory, depending on archive contents. ### Attack Path #### Unpinned package path 1. The package publisher account, registry, or distribution pipeline is compromised, or a malicious release is published. 2. The Agent follows the Skill and runs `npm i -g @byted-supabase/cli`. 3. The package manager resolves a mutable current release rather than a reviewed ve ...[truncated 1145 chars]
Remediation
View remediation
`. 2. Record and verify package-manager integrity metadata and maintain a lockfile where applicable. 3. Prefer a project-local installation invoked through a controlled package script over a global installation. 4. Disable unnecessary package lifecycle scripts during installation when operationally compatible. 5. Publish a SHA-256 digest or signed provenance record for the ZIP and verify it before extraction. 6. Store the expected digest in the reviewed Skill package rather than retrieving the digest from the same mutable location as the archive. 7. Extract archives into a newly created restricted directory and inspect archive paths before extraction to prevent file overwrite or path traversal. 8. Review extracted dependency manifests and build scripts before installation, execution, or deployment. 9. Maintain an approved-artifact mirror or immutable, versioned object URL for production workflows. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (26)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/security-guide.md (reported line 37)May include surrounding context.

using ( (auth.jwt() -> 'app_metadata' ->> 'role') = 'admin' );

text

### 删除用户不会让已签发的 access token 失效

删用户**不会**吊销其现有 token。敏感操作前先 sign out / 吊销会话;JWT 过期时间设短;要严格保证时,在敏感操作里校验 `session_id` 是否还在 `auth.sessions` 中。

Lp1

High
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The script performs outbound HTTP requests to discovered Supabase endpoints and invokes the external ve CLI, but the networking capability is not declared in the skill permissions. In an agent environment, undeclared network access is dangerous because it enables direct data-plane operations and secret-bearing requests outside the reviewed permission boundary.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The script performs outbound HTTP requests to discovered Supabase endpoints and invokes the external ve CLI, but the networking capability is not declared in the skill permissions. In an agent environment, undeclared network access is dangerous because it enables direct data-plane operations and secret-bearing requests outside the reviewed permission boundary.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

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

md
services (RDS MySQL, Redis), or pure client-side coding unrelated to Supabase backend management.
version: 2.3.3
user-invocable: true
allowed-tools: Bash, Read, Write
license: MIT
metadata:
  openclaw:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

该技能文档从标题开始即以中文呈现,全文未说明语言选择机制,也未提供其他语言选项。根据语言/区域策略,若未获得用户选择或明确的合理限制说明,强制单一语言属于自然语言政策风险。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This markdown file includes a function deletion command, which is a destructive operation affecting deployed system state. Although the section is titled deployment and management, the surrounding guidance does not explicitly warn that the command permanently removes the function or advise caution before use.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The guidance hard-codes the PostgreSQL full-text search configuration to 'english' in the generated tsvector expression. This is a natural-language locale choice embedded in the skill content, and the document does not indicate that users should select a language appropriate to their data or that the skill is intentionally limited to English-language content.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The document title and all instructional content are written in Chinese, and there is no indication that users may choose another language or that the locale restriction is required for a region-specific compliance purpose. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The file title and all instructional content are written in Chinese, which effectively fixes the skill documentation to a single language. Under the stated policy, forcing a specific language without user opt-in or a documented region-specific justification is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The playbook includes direct DELETE statements without any nearby warning about data loss, transaction safety, backups, or narrowing conditions before execution. In this skill’s context, operators are expected to run SQL against real Volcengine Supabase workspaces through a management CLI, so copy-pasting these examples can cause irreversible deletion of production data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The migration section shows schema-altering commands like CREATE TABLE and ALTER TABLE without warning that schema changes can be irreversible, lock tables, or affect application compatibility. Because this skill is specifically for operational management of live BaaS environments, users may apply these examples directly to production and cause outages or incompatible schema drift.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The workflow explicitly instructs operators to retrieve anon and service_role API keys during initial inspection, but provides no warning about their sensitivity, least-privilege use, redaction, or prohibition on exposing them back to users or logs. In this skill context, service_role keys are especially dangerous because they can grant broad backend access and bypass normal client-side protections, so normalizing their retrieval without guardrails materially increases secret-exposure risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The storage deletion example includes only a brief comment to confirm impact, but does not clearly state that deleting a bucket may irreversibly remove stored data and disrupt dependent applications. In an agent-operated infrastructure skill, terse destructive commands can be copied or executed with insufficient user confirmation, making accidental data loss more likely.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The docstring says the module handles only operations 'not exposed by ve aidap', but the implementation also discovers endpoints and service-role keys and then makes privileged direct API calls. This understatement can mislead reviewers and operators about the true authority of the script, increasing the chance of unsafe deployment or overbroad trust.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

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

python
cmd.extend(["--body", json.dumps(body, separators=(",", ":"), ensure_ascii=False)])
    if region:
        cmd.extend(["---region", region])
    completed = subprocess.run(cmd, check=False, text=True, capture_output=True)
    output = "\n".join(part for part in (completed.stdout, completed.stderr) if part)
    if completed.returncode != 0:
        raise DataPlaneError(f"ve aidap {action} failed: {output.strip()}")

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The code sends a service-role API key in apikey and Authorization headers to dynamically resolved endpoints, yet the file does not clearly disclose this privileged secret handling. In this skill context, service-role keys grant broad backend access, so undisclosed outbound transmission materially raises the risk of secret misuse, SSRF-like redirection to unintended hosts, or unsafe operator assumptions.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The code issues a DELETE request to remove an edge function and returns success, but there is no confirmation prompt, warning print/log, or explanatory comment/docstring near the operation. For a destructive action in a code file, the required user disclosure is missing in this file.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The code deletes a storage bucket via an HTTP DELETE call and reports success, but the file contains no visible confirmation prompt, warning output, or nearby documentation disclosing the destructive nature of this action. This meets the missing-warning criterion for destructive operations in code files.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

list-migrations sounds read-only, but it executes CREATE SCHEMA IF NOT EXISTS and CREATE TABLE IF NOT EXISTS before reading results. In an agent workflow, this violates least surprise and can bypass read-only expectations, causing unauthorized state changes during what appears to be an inspection command.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The entire skill file is written only in Chinese and does not indicate that users may choose another language or locale. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This markdown file consists entirely of Chinese instructional content and does not mention any user opt-in, language selection, or region-specific justification. Under the policy rule, forcing a specific language without user choice is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

This markdown file includes commands to reset pg_stat_statements and later recommends VACUUM/ANALYZE-related maintenance actions, but it does not explicitly warn users that these actions can affect observability data or place load on live systems. Under the markdown-specific warning rule, operations that may affect system integrity or diagnostics should be disclosed to users.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

The entire skill document is written in Chinese and does not indicate that language selection is optional or configurable. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation unless clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The file title and all instructional content are written in Chinese, and there is no statement offering alternative language support or explaining that the guide is intentionally limited to a Chinese-speaking audience. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale policy violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The entire skill file is written as a Chinese-only guide and does not indicate that language choice is optional or that the skill is intentionally limited to Chinese-speaking users. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy concern.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/app-integration-guide.md:54