Back to skill

Security audit

Bigquery Optimizer

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent BigQuery cost-analysis skill, but users should treat exported query, user, and billing metadata as sensitive before sharing it.

Install only if you are comfortable preparing BigQuery metadata for analysis. Before pasting results, review them locally and redact full SQL literals, user or service-account emails, project and dataset names, billing account identifiers, customer data, tokens, keys, and any other sensitive values.

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
SKILL.md:23
Finding

Collection of Unredacted BigQuery Query and Billing Metadata

Content
View full analysis
= DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY) ORDER BY total_bytes_billed DESC LIMIT 50' ``` 2. **BigQuery storage usage per dataset** — to identify large datasets ```bash bq query --use_legacy_sql=false \ 'SELECT table_schema as dataset, ROUND(SUM(size_bytes)/1e9, 2) as size_gb FROM `project`.INFORMATION_SCHEMA.TABLE_STORAGE GROUP BY 1 ORDER BY 2 DESC' ``` 3. **GCP Billing export filtered to BigQuery** — monthly BigQuery costs ```bash gcloud billing accounts list ``` ``` ### Technical Analysis The skill directs users to export and submit complete BigQuery job SQL, user email addresses, dataset names, and billing-account metadata. These fields exceed the minimum information necessary for many cost-optimization tasks. The `query` field can contain sensitive literals embedded in SQL statements, including customer identifiers, email addresses, internal project or table names, access tokens, or other application data. The `user_email` field directly exposes user or service-account identities. Dataset names may disclose internal system structure or business functions. The command `gcloud billing accounts list` enumerates billing-account identifiers and display names but does not provide the requested monthly BigQuery cost data. It therefore introduces unnecessary metadata exposure without directly satisfying the stated analysis objective. Although the skill later tells th ...[truncated 1827 chars]
Remediation
View remediation
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (2)

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The manifest claims 'credentials: none — user provides exported data', yet the documented workflow depends on IAM roles and authenticated CLI access to query BigQuery metadata. This mismatch can mislead users, reviewers, or policy engines about the real access requirements and data exposure involved, undermining informed consent and safe deployment decisions.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill states it is 'instruction-only' and does not access the user's GCP account, but it directly tells the user to run authenticated bq and gcloud commands in their own environment. This is a deceptive trust-boundary issue: users may believe the workflow is fully offline/export-based when it actually relies on live access to cloud metadata and billing context, increasing the chance they execute commands without appreciating the account exposure.

Content

No source excerpt is available for this finding.