Home / Market / google cloud filestore auditing

google cloud filestore auditing

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

skill★ 255554290 dlskills.shApache-2.0Install in CosmosUpstream Source

Documentation & Preview

--- name: google-cloud-filestore-auditing metadata: version: "1.0.2" category: Storage description: >- 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.

---

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:

locations.

IP ranges, squash mode, and PZI/PZS isolation status.

status.

2. Remediation Operations (Backup Creation)

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

instances.

3. MCP Tool Invocation

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

get_instance, list_backups, get_backup, create_backup).

4. Cloud Authentication Setup

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

    gcloud auth login
    gcloud auth application-default login
    export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account-key.json"

5. Billing Account Attachment

    gcloud beta billing projects describe {project_id}

Quick Start

  1. Ensure gcloud is installed. See

gcloud installation guide if needed.

  1. Authenticate your environment:
    gcloud auth login
    gcloud auth application-default login
  1. 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}
  1. Configure a well-supported default region (e.g., us-central1). See official

region availability documentation:

    gcloud config set compute/region us-central1
  1. Verify required service APIs are enabled:
    gcloud services enable file.googleapis.com --quiet
  1. Run fleet discovery and backup inventory (see "Discovery & Read Operations"

below).

  1. Evaluate findings against the audit rules matrix and render the executive

scorecard and inventory table.

  1. 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"*):

references/.

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"*:

shell, python, or gcloud commands.

  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).

  1. 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).

  1. 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.

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.

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:

Option A: Filestore MCP Tools (Recommended when MCP is mounted)

  1. Instances Discovery: Call

list_instances(parent="projects/{project_id}/locations/-").

  1. 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"
  1. 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`

  1. 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

(backup.sourceInstance == instance.name).

finding: *"Instance has 0 backups on file share '{share_name}'. Disaster recovery is not configured."*

assign MEDIUM severity finding: *"Latest backup is {days} days old (exceeds SLA threshold of 7 days)."*

rules.

Vector 2: Security & Access Governance

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}'."*

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."*

MEDIUM severity: *"No explicit NFS export options configured. Share defaults to open client access within VPC with NO_ROOT_SQUASH."*

configurations.

Vector 3: Zone Isolation & Reliability Compliance

MEDIUM severity: *"Instance does not satisfy Physical Zone Isolation (PZI)."*

and satisfiesPzs: false, assign HIGH severity: *"Enterprise/Regional tier instance does not satisfy Physical Zone Separation (PZS)."*

performanceLimits.maxReadThroughputBps (convert to MB/s).

domain isolation standards.

--------------------------------------------------------------------------------

3. Executive Posture Scoring & Grading

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

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