Back to skill

Security audit

GCP Global Search

Security checks for vulnerabilities and agentic risk

Overview

This skill is not malicious, but it needs review because it mixes a documentation lookup purpose with executable Google Cloud provisioning examples that can create billable infrastructure and include overbroad GKE node OAuth scopes.

Install only if you want a Google Cloud documentation helper and are comfortable reviewing cloud deployment examples carefully. Do not run copied gcloud, SDK, or Terraform snippets without checking billing impact, IAM permissions, least-privilege service accounts, Workload Identity guidance, and cleanup steps.

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
examples.md:639
Finding

Overly Broad OAuth Scope Assigned to GKE Nodes

Content
View full analysis

Vulnerability Details

File Location: examples.md:639-643, examples.md:709-713, and examples.md:786-790
Vulnerability Type: Overly broad cloud API authorization scope
Risk Level: Medium

The Python, Java, and Go GKE creation examples assign the broad Google Cloud Platform OAuth scope to every cluster node.

python
node_config=container_v1.NodeConfig(
    machine_type="e2-medium",
    disk_size_gb=100,
    oauth_scopes=[
        "https://www.googleapis.com/auth/cloud-platform"
    ]
),
java
NodeConfig nodeConfig = NodeConfig.newBuilder()
    .setMachineType("e2-medium")
    .setDiskSizeGb(100)
    .addOauthScopes("https://www.googleapis.com/auth/cloud-platform")
    .build();
go
NodeConfig: &containerpb.NodeConfig{
    MachineType: "e2-medium",
    DiskSizeGb:  100,
    OauthScopes: []string{
        "https://www.googleapis.com/auth/cloud-platform",
    },
},

Technical Analysis

The cloud-platform OAuth scope permits tokens issued to the node service account to be presented to any Google Cloud API. OAuth scopes and IAM permissions are both evaluated, so this scope does not independently grant permissions that the service account lacks. Nevertheless, it removes OAuth scopes as a defense-in-depth restriction and makes the service account's IAM roles the only substantive authorization boundary.

If a node uses a service account with excessive IAM permissions, a compromised workload capable of reaching the relevant metadata credentials could obtain a node service-account token and invoke every API operation allowed by those IAM roles. Repeating this configuration in several language examples increases the likelihood that users will deploy it without applying workload-specific identity controls.

Attack Path

A practical exploitation path requires both workload compromise and access to node credentials:

  1. A user deploys a cluster based on one of the affected examples.
  2. The cluster nodes use the broad `clou ...[truncated 1555 chars]
Remediation
View remediation

Remediation Suggestions

  1. Adopt Workload Identity Federation for GKE

    • Map each Kubernetes service account to a dedicated, least-privilege Google Cloud identity.
    • Grant cloud permissions to individual workloads rather than to the shared node identity.
    • Ensure applications use their workload identity instead of node credentials.
  2. Minimize the node service account

    • Create a dedicated node service account instead of relying on a broadly privileged default service account.
    • Grant only the roles required for node operation.
    • Regularly review the service account through IAM policy analysis and remove unused permissions.
  3. Restrict access to metadata credentials

    • Use supported GKE metadata-protection controls.
    • Verify that ordinary workloads cannot retrieve the underlying node service account's credentials.
    • Apply appropriate network and workload isolation controls as additional defense in depth.
  4. Avoid presenting cloud-platform as a secure default

    • Update all Python, Java, Go, CLI, and Terraform examples consistently.
    • If the broad scope is operationally necessary, explicitly state that security depends on least-privilege IAM and workload identity controls.
    • Prefer current GKE configuration guidance that uses IAM and workload identities rather than shared node OAuth scopes.
  5. Add deployment safeguards

    • Run policy-as-code checks against sample Terraform and cluster definitions.
    • Flag broadly privileged node service accounts and unrestricted OAuth scopes during CI.
    • Test credential isolation from an unprivileged pod before approving production deployment.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (5)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The Compute Engine example contains concrete instance-creation commands and API code that can provision billable resources, but it does not warn about costs, required permissions, or the need to delete created instances afterward. In agent-assisted environments, omission of side-effect warnings increases the risk of accidental infrastructure creation and unexpected charges.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples materially expand the skill from passive, no-login product information lookup into prescriptive architecture design and operational guidance. This broadening increases the chance that an agent will provide implementation or deployment assistance beyond the skill’s declared trust boundary, including recommendations that can trigger downstream changes, costs, or unsafe automation in contexts where only documentation retrieval was intended.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The GKE examples provide end-to-end cluster creation via SDKs, gcloud, and Terraform without any prominent notice that these actions provision substantial infrastructure and can incur significant ongoing costs. Because Kubernetes clusters often create multiple dependent resources and require cleanup, these examples are especially risky in an agent context where code may be copied or operationalized with limited scrutiny.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The document includes actionable workflows for creating cloud resources, such as GKE clusters, despite the skill being described as a no-login product search capability. In an agent setting, such examples can normalize or induce execution of provisioning steps that create billable infrastructure or alter environments, even when the user only requested information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The output template requires parallel Chinese and English sections and fields throughout the response, which imposes a specific language policy regardless of the user's requested language. This is a natural-language policy concern because the skill does not offer a language choice or state that bilingual output is optional.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.