Google Cloud Filestore Auditing
GoogleOfficialPublished by Google
- Skill
- Review and audit
- Cloud and DevOps
- Apache-2.0
- Low risk
- Has scripts
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
Download the skill as a ZIP:
https://autogineer.com/agent-skills/google/google-cloud-filestore-auditing/downloadUnzip 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 loginApplication SDKs & Scripts:
gcloud auth application-default loginAutomated 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
Ensure
gcloudis installed. See gcloud installation guide if needed.Authenticate your environment:
gcloud auth login gcloud auth application-default loginSet 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}Configure a well-supported default region (e.g.,
us-central1). See official region availability documentation:gcloud config set compute/region us-central1Verify required service APIs are enabled:
gcloud services enable file.googleapis.com --quietRun fleet discovery and backup inventory (see "Discovery & Read Operations" below).
Evaluate findings against the audit rules matrix and render the executive scorecard and inventory table.
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_commandtool to execute any shell, python, orgcloudcommands.Discovery Hierarchy:
First, check if Filestore MCP tools (
list_instances,list_backups) are available and query them directly (these are API invocations, not shell command executions).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 asEVAL.yamlorEVAL.txtpbduring evaluation runs as access is restricted and triggers anti-cheating timeouts).If no data is available in context or mock references, explain the audit evaluation formulas and provide the attributed
gcloudcommands 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:
Option A: Filestore MCP Tools (Recommended when MCP is mounted)
Instances Discovery: Call
list_instances(parent="projects/{project_id}/locations/-").Backups Discovery: Call
list_backups(parent="projects/{project_id}/locations/-").
Option B: gcloud CLI (Terminal / Coding Harnesses)
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"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=-togcloud 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)
Instances:
GET https://file.googleapis.com/v1/projects/{project_id}/locations/-/instancesBackups:
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, assignHIGHseverity 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
MEDIUMseverity finding: "Latest backup is {days} days old (exceeds SLA threshold of 7 days)."Refer to
references/backup-dr-governance.mdfor 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::/0is present inipRanges, assignCRITICALseverity (ifaccessMode: READ_WRITE) orHIGHseverity (ifREAD_ONLY): "Export rule exposes share to 0.0.0.0/0 with accessMode='{access_mode}'."Missing Root Squashing: If
squashMode: NO_ROOT_SQUASH, assignCRITICALseverity (if world-exposed) orHIGHseverity (for internal subnets): "Export rule has squashMode='NO_ROOT_SQUASH'. Remote root clients retain superuser UID 0 privileges."Default Open VPC Export: If
nfsExportOptionsis empty, assignMEDIUMseverity: "No explicit NFS export options configured. Share defaults to open client access within VPC with NO_ROOT_SQUASH."
Refer to
references/security-access-governance.mdfor export option configurations.
Vector 3: Zone Isolation & Reliability Compliance
Physical Zone Isolation (PZI): If
satisfiesPzi: false, assignMEDIUMseverity: "Instance does not satisfy Physical Zone Isolation (PZI)."Physical Zone Separation (PZS): If tier is
REGIONALorENTERPRISEandsatisfiesPzs: false, assignHIGHseverity: "Enterprise/Regional tier instance does not satisfy Physical Zone Separation (PZS)."Performance Limits: Extract
performanceLimits.maxWriteIopsandperformanceLimits.maxReadThroughputBps(convert to MB/s).Refer to
references/zone-isolation-pzi-pzs.mdfor 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$
CRITICALfindings.Grade C (🟠 ELEVATED RISK): 0 Critical, but $\ge 1$
HIGHfindings.Grade B (🟡 MODERATE): 0 Critical/High, but $\ge 1$
MEDIUMfindings.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
- ATTRIBUTION.mdAdded by AutoGineer880 B
- LICENSELicence file added by AutoGineer11.1 KiB
- SKILL.md15.0 KiB
- references/audit-rules-matrix.md8.8 KiB
- references/backup-dr-governance.md7.1 KiB
- references/security-access-governance.md6.0 KiB
- references/zone-isolation-pzi-pzs.md9.0 KiB
- scripts/filestore_audit.pyScript21.4 KiB
LICENSE
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
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
- 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 or Google.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download google-cloud-filestore-auditing.zip