Back to skill

Security audit

Volcengine Supabase

Security checks for vulnerabilities and agentic risk

Overview

This is a real Supabase administration skill, but it uses powerful credentials and write operations with unsafe defaults and incomplete read-only safeguards.

Install only in an environment intended for Volcengine Supabase administration. Force HTTPS before use, do not rely on READ_ONLY=true as a complete write barrier, review every SQL or migration before running it, avoid revealing keys unless strictly necessary, keep secrets out of logs and chats, and verify or replace the personal GitHub dependency before using production credentials.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/volcengine_supabase/platform/aidap_client.py:33
Finding
Privileged service-role credentials are transmitted over plaintext HTTP by default## Vulnerability Details **File Location**: `scripts/call_volcengine_supabase.py:103`, `scripts/volcengine_supabase/platform/aidap_client.py:33,342-384`, `scripts/volcengine_supabase/platform/supabase_client.py:62-78` **Vulnerability Type**: Plaintext transmission of privileged credentials **Risk Level**: High ### Vulnerable Code `scripts/call_volcengine_supabase.py:103`: ```python parser.add_argument("--endpoint-scheme", default=os.getenv("SUPABASE_ENDPOINT_SCHEME", "http"), help="workspace URL 协议") ``` `scripts/volcengine_supabase/platform/aidap_client.py:33,342-384`: ```python ENDPOINT_SCHEME = os.getenv("SUPABASE_ENDPOINT_SCHEME", "http").strip().lower() or "http" async def get_endpoint(self, workspace_id: str, branch_id: Optional[str] = None, use_cache: bool = True) -> Optional[str]: cache_key = f"{workspace_id}:{branch_id}" if branch_id else workspace_id endpoint_cache = get_endpoint_cache() if use_cache and cache_key in endpoint_cache: return endpoint_cache[cache_key] if not branch_id: branch_id = await self.get_default_branch_id(workspace_id) if not branch_id: return None try: request = DescribeWorkspaceEndpointRequest( workspace_id=workspace_id, branch_id=branch_id ) response = self.client.describe_workspace_endpoint(request) if hasattr(response, 'endpoints') and response.endpoints: domains = [] for endpoint in response.endpoints: if hasattr(endpoint, 'addresses') and endpoint.addresses: for addr in endpoint.addresses: if hasattr(addr, 'address_domain'): domains.append(addr.address_domain) for domain in domains: if 'volces.com' in domain and 'ivolces.com' not in domain: if ENDPOINT_SCHEME == "https": ...[truncated 3201 chars]
Remediation
## Remediation Suggestions - Change the default endpoint scheme to HTTPS. - Reject any endpoint whose parsed scheme is not exactly `https`; do not provide an HTTP downgrade option for authenticated traffic. - Remove the port 80 endpoint construction path. - Parse endpoints with a URL parser and validate hostnames using an exact hostname or approved domain-suffix allowlist rather than substring matching. - Do not silently fall back to an arbitrary first domain. - Preserve normal TLS certificate and hostname verification in `httpx`. - Consider using short-lived, narrowly scoped credentials instead of a long-lived service-role key. - Rotate any service-role keys that may already have been transmitted through the default HTTP configuration. - Add automated tests that fail if privileged API calls can be constructed with a non-HTTPS URL.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/volcengine_supabase/tools/database_tools.py:23
Finding
Read-only mode can be bypassed through arbitrary SQL execution## Vulnerability Details **File Location**: `scripts/volcengine_supabase/tools/database_tools.py:23-48`; related enforcement in `scripts/volcengine_supabase/utils/decorators.py:49-56` **Vulnerability Type**: Missing authorization enforcement on a write-capable operation **Risk Level**: High ### Vulnerable Code `scripts/volcengine_supabase/tools/database_tools.py:23-48`: ```python async def _execute_sql_raw(self, query: str, workspace_id: Optional[str] = None) -> List[dict]: if not query or not query.strip(): raise ValueError("SQL query cannot be empty") ws_id, branch_id = await self._resolve_target(workspace_id) logger.info( "Executing SQL query", extra={"workspace_id": ws_id, "branch_id": branch_id, "query_length": len(query)} ) client = await self._get_client(ws_id, branch_id) result = await client.call_api("/pg/query", method="POST", json_data={"query": query}) if isinstance(result, dict) and isinstance(result.get("data"), list): result = result["data"] if not isinstance(result, list): raise TypeError(f"Unexpected SQL result type: {type(result).__name__}") logger.debug(f"SQL query returned {len(result)} rows") return result @handle_errors async def execute_sql(self, query: str, workspace_id: Optional[str] = None) -> List[dict]: return await self._execute_sql_raw(query, workspace_id) ``` The available read-only enforcement in `scripts/volcengine_supabase/utils/decorators.py:49-56` is not applied to `execute_sql`: ```python def read_only_check(func: Callable) -> Callable: @wraps(func) async def wrapper(*args, **kwargs) -> Any: from ..config import READ_ONLY if READ_ONLY: return to_json({"error": f"Cannot execute {func.__name__} in read-only mode"}) return await func(*args, **kwargs) return wrapper ``` ### Technical Analysis The CLI accepts arb ...[truncated 1917 chars]
Remediation
## Remediation Suggestions - Apply `@read_only_check` to `execute_sql` as an immediate defense-in-depth measure. - Enforce read-only behavior server-side by using a dedicated database role that has only `SELECT` and required metadata privileges. - When read-only mode is active, execute queries in a transaction configured with `SET TRANSACTION READ ONLY`. - Do not reuse the service-role key for read-only sessions if a lower-privileged credential can be issued. - Separate query and administrative endpoints or actions so read-only users cannot reach a write-capable primitive. - Treat SQL parsing or keyword blocking only as supplementary validation, not as the security boundary. - Add integration tests proving that direct and indirect mutations fail while `READ_ONLY=true`. - Update documentation so the stated read-only guarantee matches the actual server-side controls.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/volcengine_supabase/tools/database_tools.py:72
Finding
The list-migrations operation silently modifies the database schema## Vulnerability Details **File Location**: `scripts/volcengine_supabase/tools/database_tools.py:72-85` **Vulnerability Type**: Hidden write operation in a nominally read-only command **Risk Level**: Medium ### Vulnerable Code ```python @handle_errors async def list_migrations(self, workspace_id: Optional[str] = None) -> List[dict]: query = """ CREATE SCHEMA IF NOT EXISTS supabase_migrations; CREATE TABLE IF NOT EXISTS supabase_migrations.schema_migrations ( version text PRIMARY KEY, name text NOT NULL, inserted_at timestamptz NOT NULL DEFAULT now() ); SELECT version, name FROM supabase_migrations.schema_migrations ORDER BY version DESC """ return await self._execute_sql_raw(query, workspace_id) ``` ### Technical Analysis The operation is named and documented as a listing function, but it executes `CREATE SCHEMA` and `CREATE TABLE` before reading migration records. It is not protected by `@read_only_check`. This violates command-query separation and causes an inspection action to mutate database state. It also provides a second route around the project's read-only guarantee, independent of arbitrary user-supplied SQL. Even if the objects already exist, PostgreSQL must process write-capable DDL and acquire associated locks and privileges. ### Attack Path 1. An operator enables read-only mode or invokes `list-migrations` believing it to be a non-mutating inspection operation. 2. The command calls `_execute_sql_raw` without a read-only guard. 3. The service-role-backed endpoint executes `CREATE SCHEMA IF NOT EXISTS supabase_migrations`. 4. It then executes `CREATE TABLE IF NOT EXISTS supabase_migrations.schema_migrations`. 5. Database state is changed if either object did not previously exist, despite no explicit migration or initialization request. ### Impact Assessment The command can create persistent schema objects in the selected w ...[truncated 319 chars]
Remediation
## Remediation Suggestions - Make `list_migrations` a pure `SELECT` operation. - Move schema and table creation into an explicit initialization or migration command protected by `@read_only_check`. - If the migration table does not exist, return an empty result or a clear non-mutating error. - Enforce read-only database transactions for all inspection commands. - Add tests that compare database schema state before and after every command classified as read-only. - Clearly document any command that creates persistent objects and require explicit operator confirmation for initialization.

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding
Installation executes a dependency directly from a personal GitHub repository## Vulnerability Details **File Location**: `requirements.txt:1-3`; installation instruction in `SKILL.md:50` **Vulnerability Type**: Unsafe third-party dependency source **Risk Level**: Medium ### Vulnerable Code `requirements.txt:1-3`: ```text httpx>=0.27.0 pydantic>=2.0.0 git+https://github.com/sjcsjcsjc/volcengine-python-sdk.git@9905a8853a0e5fd26fdae93eefb4f201e8bef539 ``` `SKILL.md:50` instructs users to install the manifest: ```bash uv pip install -r requirements.txt ``` or: ```bash pip install -r requirements.txt ``` ### Technical Analysis The project installs `volcengine-python-sdk` directly from a repository under the personal GitHub account `sjcsjcsjc`, rather than from an identified official Volcengine package source. The Git commit is pinned, which limits unintentional version drift, but a commit hash does not establish publisher provenance or prove that the repository contents are trustworthy. Python package installation may execute backend build logic and installs code that the skill later imports with access to Volcengine credentials. In addition, `httpx` and `pydantic` use open-ended minimum-version constraints without hashes, reducing reproducibility and allowing future releases to enter installations without review. No evidence in the reviewed project proves that the pinned dependency is malicious. The confirmed issue is the unsafe trust and installation model. ### Attack Path 1. A user follows the documented setup command. 2. `pip` or `uv` clones the personal GitHub repository at the specified commit. 3. The package build backend and installation process handle code from that repository on the user's system. 4. The installed SDK is later imported by `aidap_client.py` in a process containing Volcengine access keys and session credentials. 5. If the external source or pinned content is compromised, malicious package code could execute during installation or import and access th ...[truncated 485 chars]
Remediation
## Remediation Suggestions - Replace the personal Git repository dependency with a verified official Volcengine package from a trusted package index. - Pin all dependencies to reviewed exact versions. - Use a lock file and cryptographic hashes for all distributable artifacts. - If the fork is required, vendor the reviewed source into a controlled repository, document why it is needed, and verify its provenance. - Build wheels in a controlled CI environment and install only signed or hash-verified artifacts. - Run software composition analysis and dependency vulnerability scanning in CI. - Review package build metadata and installation hooks before approval. - Restrict network access and cloud credentials during dependency installation.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (44)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding
The supplied code is clearly related to Volcengine Supabase backend administration, so the overall domain is aligned. However, the declared description significantly overstates what this code chunk actually does. The implementation is limited to AIDAP workspace/branch lifecycle operations and retrieval of endpoints/API keys. There is no evidence here of SQL execution, migration handling, Edge Function deployment/management, Storage operations, or TypeScript type generation. Because the description presents these as core supported capabilities, while the code chunk lacks them, this is a material description-to-behavior mismatch.

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
Functions, Storage, and TypeScript type generation via a local CLI. Run uv run ./scripts/call_volcengine_supabase.py to get real-time results. Use this skill w
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Intent-Code Divergence

High
Confidence
97% confidence
Finding
`apply_migration` executes clearly state-changing SQL (`BEGIN`, DDL/DML, `COMMIT`) while being decorated with `@read_only_check`, which can misclassify a destructive operation as safe/read-only. In an agent skill that manages live Supabase resources, this increases the chance that policy gates, UX prompts, or higher-level orchestration permit database modifications under a read-only assumption.

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill advertises and instructs use of a local CLI that can access environment credentials, read local files, and make network calls, but it declares no explicit tool scope or permission boundaries. In an agent environment, this increases the risk of over-broad execution and unintended access to secrets or local resources because the runtime cannot constrain the skill to the minimum necessary capabilities.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The markdown instructions and operational guidance are presented entirely in Chinese, which effectively forces a specific language for users of the skill. The file does not indicate that Chinese is optional, configurable, or limited to a justified region-specific audience.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The document begins and continues in Chinese only, and there is no indication that users can choose another language or that the skill is intended solely for a Chinese-speaking audience. This can violate language/locale policy where skills should not force a specific language without user opt-in.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The guide explicitly demonstrates deploying an Edge Function with `--no-verify-jwt` for a public API, but does not pair that example with strong warnings about authentication, authorization, abuse controls, or the requirement to implement alternate verification such as webhook signature validation. In this skill context, which manages Supabase backends and includes examples using `SUPABASE_SERVICE_ROLE_KEY`, readers may copy the pattern into sensitive functions and unintentionally expose privileged functionality to unauthenticated callers.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The document title and all instructional content are presented only in Chinese, which effectively forces a specific language for users consuming the skill guidance. Under the stated policy, language constraints should either offer user choice or be clearly documented as justified for a region-specific use case.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The playbook provides copy-pastable SQL that enables RLS and then creates fully public SELECT/INSERT/UPDATE/DELETE policies using unconditional true expressions, effectively removing access control at the row level. In the context of a Supabase management skill that is meant to run real backend operations, users may apply this directly to production tables, causing unauthorized read/write/delete access and possible data loss or exposure.

Missing User Warnings

Medium
Confidence
84% confidence
Finding
The file documents sensitive credentials (`VOLCENGINE_ACCESS_KEY`, `VOLCENGINE_SECRET_KEY`) and a `get-keys ... [--reveal]` operation, but it does not warn users that these values are secrets and should not be logged, shared, or exposed. For markdown files, omission of privacy-sensitive warnings around credential handling is in scope.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This markdown file documents destructive operations such as `delete-branch` and `reset-branch`, but it does not include a clear warning about possible data loss or irreversible changes. The brief note to 'check before modifying' on L17 is helpful but does not explicitly disclose the risks of deletion or reset actions to users.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The workflow explicitly tells operators to use `get-keys` to retrieve credentials but provides no warning that this exposes sensitive secrets that should be tightly controlled and minimally disclosed. In a backend-management skill for Supabase, normalizing credential retrieval without caution increases the chance of unnecessary secret access, leakage into logs, or sharing credentials in unsafe contexts.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The workflow recommends `reset-branch` or deleting a branch when issues occur, but it does not warn that these actions can irreversibly discard schema changes, data, or debugging state. In an infrastructure-management skill, omission of destructive-action warnings can cause operators to perform unsafe recovery steps without confirmation or backup checks.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document instructs users to run `execute-sql` and `apply-migration` without noting that these operations can alter data, lock tables, break applications, or cause irreversible schema drift. Because this skill is specifically designed to manage live Supabase resources, missing cautions around direct SQL and migrations materially increases the risk of damaging production systems.

Static analysis

No suspicious patterns detected.