Generated banner for Google Cloud Filestore Auditing
Generated logo for Google Cloud Filestore Auditing

Google Cloud Filestore Auditing

GoogleOfficialPublished by Google

  • Skill
  • Review and audit
  • Cloud and DevOps
  • Apache-2.0
  • Low risk
  • Has scripts

From the author

Audits Filestore instances on Google Cloud across projects for disaster recovery readiness (missing or stale backups), security access governance (overly permissive NFS export rules, 0.0.0.0/0 exposure, missing ROOT_SQUASH), and reliability compliance (Physical Zone Isolation PZI and Physical Zone Separation PZS). Use when assessing storage health posture, auditing NFS export permissions, identifying unprotected file shares, or validating zone failure domains. Don't use for Cloud Storage buckets, Persistent Disk, or NetApp Volumes.
— the description by Google

AutoGineer summary

Written by AutoGineer from the skill’s own files, not by the author

This skill provides a structured framework for autonomous agents to assess the health and security posture of Google Cloud Filestore fleets. It evaluates instances against critical benchmarks, including backup availability, NFS export security (such as 0.0.0.0/0 exposure and root squashing), and physical zone isolation standards. The skill generates an executive scorecard and a detailed inventory report, offering actionable remediation paths for identified risks while maintaining strict safety protocols for command execution.

What it does

  • Discovers Filestore instances and backups across Google Cloud projects.
  • Evaluates disaster recovery readiness by identifying unprotected or stale backups.
  • Audits security configurations, including NFS export rules and root squash settings.
  • Validates reliability compliance against Physical Zone Isolation (PZI) and Separation (PZS) standards.
  • Generates a comprehensive executive posture scorecard and instance inventory report.
  • Provides attributed commands for remediation with mandatory user confirmation.

When to use it

  • When performing a security audit of NFS export permissions and network exposure.
  • When assessing the disaster recovery posture of storage infrastructure.
  • When validating compliance with zone failure domain and reliability requirements.
  • When preparing a health report for Google Cloud Filestore fleets.

Advantages

  • Standardized reporting format ensures consistent audit outputs.
  • Prioritizes findings by severity to focus remediation efforts.
  • Includes built-in safety guardrails requiring confirmation before executing changes.
  • Supports multiple discovery methods including CLI, REST API, and MCP tools.

Usage examples

“Audit my Filestore instances in project my-gcp-project for security and backup issues.”
The agent will list all instances and backups, evaluate them against the audit rules, and present an executive scorecard with a priority findings matrix.
“Are any of my Filestore shares exposed to the public internet?”
The agent will inspect the NFS export options for all instances and report any instances with 0.0.0.0/0 or ::/0 access, flagging them as critical security findings.

Install

  1. Download the skill as a ZIP:

    https://mp-staging.autogineer.com/agent-skills/google/google-cloud-filestore-auditing/download
  2. Unzip it into the cross-client skills folder of your project:

    mkdir -p .agents/skills && unzip google-cloud-filestore-auditing.zip -d .agents/skills

Documentation by Google

Filestore Auditing Skill

This skill enables autonomous agents to audit, evaluate, and report the disaster recovery, security access governance, and architectural reliability posture of Filestore fleets across Google Cloud projects.

Prerequisites / IAM Requirements & Permissions

Before executing this skill, the runtime principal (user account or Service Account) must possess the following IAM roles and granular permissions on the target GCP project(s):

1. Audit Operations (Read-Only Assessment)

Requires the roles/file.viewer role, which provides:

  • file.instances.list: Enumerate Filestore instances across project locations.

  • file.instances.get: Inspect instance configuration, NFS export rules, IP ranges, squash mode, and PZI/PZS isolation status.

  • file.backups.list: Enumerate existing backups across regions.

  • file.backups.get: Inspect backup timestamps, source instance URIs, and status.

2. Remediation Operations (Backup Creation)

Requires the roles/file.editor (or roles/file.admin) role, which provides:

  • file.backups.create: Create on-demand baseline backups for unprotected instances.

  • file.operations.get: Monitor long-running backup creation operations.

3. MCP Tool Invocation

If invoking capabilities via the Filestore MCP Server (file.googleapis.com/mcp):

  • roles/mcp.toolUser: Required to execute MCP tools (list_instances, get_instance, list_backups, get_backup, create_backup).

4. Cloud Authentication Setup

Authenticate the runtime environment using the appropriate method for your execution context:

  • CLI Execution (gcloud):

    gcloud auth login
  • Application SDKs & Scripts:

    gcloud auth application-default login
  • Automated Services & Service Accounts:

    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"
5. Billing Account Attachment
  • Active Billing Required: The target GCP project must have an active Cloud Billing account attached. Filestore instances and backup operations require active billing. Verify billing status with:

    gcloud beta billing projects describe {project_id}

Quick Start

  1. Ensure gcloud is installed. See gcloud installation guide if needed.

  2. Authenticate your environment:

    gcloud auth login
    gcloud auth application-default login
  3. Set the target project context and verify an active billing account is attached:

    gcloud config set project {project_id}
    gcloud beta billing projects describe {project_id}
  4. Configure a well-supported default region (e.g., us-central1). See official region availability documentation:

    gcloud config set compute/region us-central1
  5. Verify required service APIs are enabled:

    gcloud services enable file.googleapis.com --quiet
  6. Run fleet discovery and backup inventory (see "Discovery & Read Operations" below).

  7. Evaluate findings against the audit rules matrix and render the executive scorecard and inventory table.

  8. If unprotected instances are identified, present baseline backup creation commands and prompt the user for confirmation.

Attribution Guardrail

Tag every Cloud Filestore command or API request provided or executed. Prefix gcloud commands with the designated metrics environment:

CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-auditing)" \
gcloud filestore instances list ...

On direct HTTP calls to the GCP REST API, append the User-Agent:

User-Agent: gcs-skills/1.0 (skill:google-cloud-filestore-auditing)

Conceptual & Informational Queries (CRITICAL)

For purely conceptual, educational, or architectural questions (e.g., "What is Physical Zone Isolation (PZI) in Filestore?", "Why is NO_ROOT_SQUASH dangerous?", "Explain Filestore backup architecture"):

  • Rule: Answer immediately using pre-trained knowledge and the guidance in references/.

  • Constraint: Do NOT execute external tool calls or API requests for basic conceptual queries.

Handling "No-Command" Constraints & Evaluations (CRITICAL)

If the user prompt contains constraints like "Do not execute commands", "without executing", or "read-only":

  • Rule: Strictly avoid calling the run_command tool to execute any shell, python, or gcloud commands.

  • Discovery Hierarchy:

    1. First, check if Filestore MCP tools (list_instances, list_backups) are available and query them directly (these are API invocations, not shell command executions).

    2. If MCP tools are not present or cannot connect, search local reference markdown files (specifically the mock fleet definitions in references/zone-isolation-pzi-pzs.md) for any mock instances or project details matching the request. (Do NOT attempt to read evaluation config files such as EVAL.yaml or EVAL.txtpb during evaluation runs as access is restricted and triggers anti-cheating timeouts).

    3. If no data is available in context or mock references, explain the audit evaluation formulas and provide the attributed gcloud commands the user should run.

  • Mandatory User Confirmation Requirement: Even when the user prompt asks not to execute commands or asks only for audit recommendations, any response recommending backup remediation MUST STILL end with a clear confirmation prompt before execution (e.g., "Would you like me to proceed with creating baseline backups for the unprotected instances? Please confirm to proceed.").


Core Operational Workflow

1. Discovery & Read Operations

The agent must discover all Filestore instances and backups in the target project.

  • Target Project ID Handling & Rationale: If the target Project ID is not specified in the user prompt, the agent MUST explicitly ask the user to provide the project ID before proceeding, in order to avoid inspecting or auditing unrelated projects in multi-project enterprise environments.

Choose the discovery method matching your runtime environment:

  1. Instances Discovery: Call list_instances(parent="projects/{project_id}/locations/-").

  2. Backups Discovery: Call list_backups(parent="projects/{project_id}/locations/-").

Option B: gcloud CLI (Terminal / Coding Harnesses)
  1. Instances Discovery:

    CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-auditing)" \
    gcloud filestore instances list --project="{project_id}" --format="json"
  2. Backups Discovery:

    CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-auditing)" \
    gcloud filestore backups list --project="{project_id}" --format="json"

    (Note: Do NOT pass --location=- to gcloud filestore backups list; omitting the flag queries all regions across the project automatically).

Option C: GCP REST API (call_gcp_api in Gemini Enterprise File Agent / curl)
  1. Instances: GET https://file.googleapis.com/v1/projects/{project_id}/locations/-/instances

  2. Backups: GET https://file.googleapis.com/v1/projects/{project_id}/locations/-/backups

Option D: Standalone Script Runner

For environments with standard python3 execution enabled, the agent may invoke the portable script: python3 scripts/filestore_audit.py --project="{project_id}" [--format=markdown|json]


2. Audit Evaluation & Vector Checks

For each discovered instance, evaluate three audit vectors:

Vector 1: Disaster Recovery & Backup Protection
  • Match backups to instances using full canonical resource URIs (backup.sourceInstance == instance.name).

  • Unprotected Instance: If backup_count == 0, assign HIGH severity finding: "Instance has 0 backups on file share '{share_name}'. Disaster recovery is not configured."

  • Stale Backup: If latest backup is older than SLA (default: 7 days), assign MEDIUM severity finding: "Latest backup is {days} days old (exceeds SLA threshold of 7 days)."

  • Refer to references/backup-dr-governance.md for backup retention and SLA rules.

Vector 2: Security & Access Governance
  • Inspect fileShares[0].nfsExportOptions:

    • Open Network Exposure: If 0.0.0.0/0, 0.0.0.0, or ::/0 is present in ipRanges, assign CRITICAL severity (if accessMode: READ_WRITE) or HIGH severity (if READ_ONLY): "Export rule exposes share to 0.0.0.0/0 with accessMode='{access_mode}'."

    • Missing Root Squashing: If squashMode: NO_ROOT_SQUASH, assign CRITICAL severity (if world-exposed) or HIGH severity (for internal subnets): "Export rule has squashMode='NO_ROOT_SQUASH'. Remote root clients retain superuser UID 0 privileges."

    • Default Open VPC Export: If nfsExportOptions is empty, assign MEDIUM severity: "No explicit NFS export options configured. Share defaults to open client access within VPC with NO_ROOT_SQUASH."

  • Refer to references/security-access-governance.md for export option configurations.

Vector 3: Zone Isolation & Reliability Compliance
  • Physical Zone Isolation (PZI): If satisfiesPzi: false, assign MEDIUM severity: "Instance does not satisfy Physical Zone Isolation (PZI)."

  • Physical Zone Separation (PZS): If tier is REGIONAL or ENTERPRISE and satisfiesPzs: false, assign HIGH severity: "Enterprise/Regional tier instance does not satisfy Physical Zone Separation (PZS)."

  • Performance Limits: Extract performanceLimits.maxWriteIops and performanceLimits.maxReadThroughputBps (convert to MB/s).

  • Refer to references/zone-isolation-pzi-pzs.md for datacenter failure domain isolation standards.


3. Executive Posture Scoring & Grading

Calculate fleet posture grade as defined in references/audit-rules-matrix.md:

  • Grade F (🔴 CRITICAL RISK): $\ge 1$ CRITICAL findings.

  • Grade C (🟠 ELEVATED RISK): 0 Critical, but $\ge 1$ HIGH findings.

  • Grade B (🟡 MODERATE): 0 Critical/High, but $\ge 1$ MEDIUM findings.

  • Grade A (🟢 HEALTHY): 0 findings across all vectors.

Calculate Backup Protection Rate %: $$\text{Protection Rate} = \frac{\text{Total Instances} - \text{Unprotected Instances}}{\text{Total Instances}} \times 100$$


4. Required Output Format

Every audit report response MUST include the following structured sections in Markdown:

1. Executive Posture Scorecard
## Executive Posture Scorecard: `{project_id}`

| Metric | Status | Details |
| :--- | :--- | :--- |
| **Overall Health Posture** | **[🔴 CRITICAL RISK / 🟠 ELEVATED RISK / 🟡 MODERATE / 🟢 HEALTHY]** | [Grade F / C / B / A] |
| **Instances Audited** | `[count]` | Total Filestore instances evaluated |
| **Backup Protection Rate** | **[pct]%** | `[protected]/[total]` instances have active backups |
| **Critical & High Security Findings** | `[crit] Critical, [high] High` | Open exports (0.0.0.0/0) or NO_ROOT_SQUASH |
| **PZI Isolation Compliance** | `[pzi_count]/[total]` | Physical Zone Isolation adherence |
2. Priority Findings & Remediation Matrix

List findings ranked by severity (CRITICAL $\to$ HIGH $\to$ MEDIUM $\to$ LOW):

## Priority Findings & Remediation Matrix

| Severity | Instance ID | Category | Finding Description | Remediation Plan |
| :--- | :--- | :--- | :--- | :--- |
| 🚨 **CRITICAL** | `[instance]` | Security | [Description] | [Remediation] |
| ⚠️ **HIGH** | `[instance]` | Disaster Recovery | [Description] | [Remediation] |
3. Filestore Instance Inventory & Compliance Status
## Filestore Instance Inventory & Compliance Status

| Instance ID | Location | Tier | Capacity | Reserved CIDR | Write IOPS | Throughput | PZI | PZS | Backups | Latest Backup |
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
| `[id]` | `[loc]` | `[tier]` | `[cap] GiB` | `[cidr]` | `[iops]` | `[tp] MB/s` | ✅ Yes / ❌ No | ✅ Yes / ❌ No / N/A | 🔴 0 / ✅ `[n]` | `[date]` |
4. Automated Remediation & Mandatory Confirmation Gate

If any unprotected instances are discovered, display attributed backup creation commands and conclude with an explicit confirmation request:

CLOUDSDK_METRICS_ENVIRONMENT="gcs-skills gcs-skills/1.0 (skill:google-cloud-filestore-auditing)" \
gcloud filestore backups create [INSTANCE]-backup-[DATE] \
    --project=[PROJECT_ID] \
    --instance=[INSTANCE] \
    --file-share=[SHARE] \
    [--instance-zone=[ZONE] | --instance-location=[REGION]] \
    --region=[BACKUP_REGION]

Confirmation Required: Would you like me to proceed with creating baseline backups for the unprotected instances? Please confirm to proceed.

CRITICAL RATIONALE: Do NOT execute backup creation without explicit user confirmation. Confirmation is strictly required before executing any mutation or backup creation commands in order to prevent unintended operational disruption, unwanted resource allocation, or unexpected backup storage billing.


Reference Directory

For progressive disclosure and deep architectural guidance, consult the following references:

Files

references/zone-isolation-pzi-pzs.md

Zone Isolation (PZI) & Reliability (PZS) Compliance Reference

This reference explains Physical Zone Isolation (PZI), Physical Zone Separation (PZS), and architectural reliability standards for Google Cloud Filestore.


Table of Contents

SectionLine hints
1. Physical Zone Isolation (PZI)Lines 23-48
2. Physical Zone Separation (PZS)Lines 51-80
3. High-Availability & Architecture Profiles by TierLines 83-105
4. Performance Limits VisibilityLines 108-120
5. Mock Fleet Definitions (For No-Command Evaluations)Lines 123-197
• Instance 1: nfs-prod-1Lines 132-154
• Instance 2: nfs-prod-2Lines 156-175
• Instance 3: nfs-prod-3Lines 177-197

1. Physical Zone Isolation (PZI)

Concept

Physical Zone Isolation (PZI) verifies that a zonal Google Cloud resource (such as a Filestore instance hosted in us-central1-a) has all of its compute, storage, network routing, and power infrastructure confined strictly to a single physical failure domain within that datacenter.

Operational Importance

If an infrastructure incident (such as an uninterruptible power supply failure or Top-of-Rack switch fault) occurs in Zone A, a PZI-compliant resource has zero hidden runtime dependencies on Zone B or Zone C. Failures remain confined to that single physical domain.

API Representation

The Filestore Instance API exposes satisfiesPzi as an output-only boolean:

  • true: The instance is provisioned in a datacenter domain verified for Physical Zone Isolation.

  • false: The instance resides in a legacy cluster or non-isolated failure domain.

  • Audit Severity: MEDIUM if satisfiesPzi: false.


2. Physical Zone Separation (PZS)

Concept

Physical Zone Separation (PZS) applies to multi-zone and regional Filestore resources (such as REGIONAL or ENTERPRISE tiers, which provide 99.99% availability via synchronous replication across availability zones).

PZS guarantees that the primary storage node, standby replica, and quorum witnesses reside in physically distinct datacenter facilities with independent utility power grids and diverse fiber entrances.

Operational Importance

If a major physical facility incident (such as a municipal power outage, building fire, or localized flooding) impacts one datacenter facility, the secondary replica in the physically separated zone is completely unaffected, ensuring automated failover without data loss.

API Representation

The Filestore Instance API exposes satisfiesPzs as an output-only boolean:

  • true: Active and standby replicas reside in confirmed physically separated datacenter buildings.

  • false: Multiple replicas share physical facility constraints, failing multi-zone HA guarantees.

  • Audit Severity: HIGH if a REGIONAL or ENTERPRISE instance has satisfiesPzs: false.


3. High-Availability & Architecture Profiles by Tier

| Tier (UI / | Architecture | Replication | PZI Applicable? | PZS Applicable? | Supported |

: API) : Profile : Model : : : Resizing : | :------------ | :----------- | :---------- | :--------------: | :--------------: | :--------: | | Basic HDD | Single | None | Yes | N/A | Scale-Up | : (BASIC_HDD) : Compute : (Zonal) : (satisfiesPzi) : : Only : : : Engine VM + : : : : : : : PD-Standard : : : : : | Basic SSD | Single | None | Yes | N/A | Scale-Up | : (BASIC_SSD) : Compute : (Zonal) : (satisfiesPzi) : : Only : : : Engine VM + : : : : : : : PD-SSD : : : : : | Zonal | ECFS | Intra-Zone | Yes | N/A | Scale-Up & | : (ZONAL) : Multi-Node : Replicated : (satisfiesPzi) : : Scale-Down : : : Cluster : : : : : : : (Single : : : : : : : Zone) : : : : : | Regional | ECFS | Cross-Zone | Yes | Yes | Scale-Up & | : (REGIONAL / : Multi-Node : Synchronous : (satisfiesPzi) : (satisfiesPzs) : Scale-Down : : ENTERPRISE) : Cluster : : : : : : : (Multi-Zone) : : : : :


4. Performance Limits Visibility

The Filestore Instance API provides baseline performance ceilings under performanceLimits:

  • maxWriteIops: Maximum write I/O operations per second.

  • maxReadThroughputBps: Maximum read throughput in bytes per second. Convert to MB/s using: $$\text{Throughput (MB/s)} = \left\lfloor \frac{\text{maxReadThroughputBps}}{1024 \times 1024} \right\rfloor$$

Display these values in the Instance Inventory Table to provide complete operational context.


5. Mock Fleet Definitions (For No-Command Evaluations)

When running in headless evaluation suites, testing under "no-command" constraints, or when the GCP API is not directly reachable, the following reference fleet in project audit-prod serves as the golden evaluation baseline:

Project audit-prod Mock Fleet
Instance 1: nfs-prod-1
  • Resource URI: projects/audit-prod/locations/us-central1-b/instances/nfs-prod-1

  • Location: us-central1-b

  • Tier: BASIC_SSD

  • Capacity: 2560 GiB (2.5 TiB)

  • File Share: vol1

  • Network: default (Reserved CIDR: 10.0.0.0/29)

  • Export Rules:

    • Rule 1: ipRanges: ["0.0.0.0/0"], accessMode: "READ_WRITE", squashMode: "NO_ROOT_SQUASH"

  • PZI / PZS: satisfiesPzi: true, satisfiesPzs: false

  • Performance Limits: maxWriteIops: 4000, maxReadThroughputBps: 104857600 (100 MB/s)

  • Backups: 2 backups present (backup-20260901 created 2 days ago, backup-20260815 created 19 days ago)

  • Expected Findings:

    • CRITICAL: Overly Permissive NFS Network Export (0.0.0.0/0 with READ_WRITE).

    • CRITICAL: Missing Root Squashing (NO_ROOT_SQUASH paired with 0.0.0.0/0).

Instance 2: nfs-prod-2
  • Resource URI: projects/audit-prod/locations/us-central1-c/instances/nfs-prod-2

  • Location: us-central1-c

  • Tier: BASIC_HDD

  • Capacity: 1024 GiB (1 TiB)

  • File Share: vol1

  • Network: default (Reserved CIDR: 10.0.1.0/29)

  • Export Rules:

    • Rule 1: ipRanges: ["10.128.0.0/20"], accessMode: "READ_WRITE", squashMode: "ROOT_SQUASH"

  • PZI / PZS: satisfiesPzi: false, satisfiesPzs: false

  • Performance Limits: maxWriteIops: 1000, maxReadThroughputBps: 20971520 (20 MB/s)

  • Backups: 0 backups present

  • Expected Findings:

    • HIGH: Missing Backup Protection (0 backups on share vol1).

    • MEDIUM: Physical Zone Isolation (PZI) Non-Compliant (satisfiesPzi: false).

Instance 3: nfs-prod-3
  • Resource URI: projects/audit-prod/locations/us-central1/instances/nfs-prod-3

  • Location: us-central1

  • Tier: REGIONAL

  • Capacity: 1024 GiB (1 TiB)

  • File Share: vol1

  • Network: default (Reserved CIDR: 10.0.2.0/29)

  • Export Rules:

    • Rule 1: ipRanges: ["10.128.0.0/20"], accessMode: "READ_WRITE", squashMode: "ROOT_SQUASH"

  • PZI / PZS: satisfiesPzi: true, satisfiesPzs: false

  • Performance Limits: maxWriteIops: 10000, maxReadThroughputBps: 262144000 (250 MB/s)

  • Backups: 1 backup present (backup-old created 20 days ago)

  • Expected Findings:

    • HIGH: Physical Zone Separation (PZS) Non-Compliant (satisfiesPzs: false on Regional tier).

    • MEDIUM: Stale Backup (latest backup is 20 days old, exceeding 7-day SLA).

Requirements and compatibility

Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta

“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.

Needs: Needs an MCP server, Needs a command-line tool, Needs Python

Security

What our scanner noticed· Low risk

  • Scripts that your agent may run

This skill includes scripts that your agent may run. Read them before you use it.

A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.

Attribution and licence

Published by
Google
Publisher
Google (Official)
Source
google/skills · skills/cloud/google-cloud-filestore-auditing · commit 2194d3b
Licence
Apache License 2.0 (redistribution allowed)
  • LICENSE (added by AutoGineer from LICENSE)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Google.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-cloud-filestore-auditing.zip