gcs-security-assessment
Assesses security posture, evaluates risks, and checks SAIF compliance for Google Cloud Storage buckets or projects. Use when the user requests security scans, vulnerability checks, or SAIF assessments. Don't use when: The user is asking about non-GCS resources (Compute Engine, GKE, etc.), investigating a live production outage, or asking general security questions not tied to a specific project or bucket.
- License 许可
- Apache-2.0
- 最近更新
- 2026-08-23
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- gcs-security-assessment
- license
- Apache-2.0
- metadata
- { "tags": [ "gcs", "security", "compliance", "saif" ], "version": "v2", "category": "security", "publisher": "google", "support_tier": "primary" }
- description
- Assesses security posture, evaluates risks, and checks SAIF compliance for Google Cloud Storage buckets or projects. Use when the user requests security scans, vulnerability checks, or SAIF assessments. Don't use when: The user is asking about non-GCS resources (Compute Engine, GKE, etc.), investigating a live production outage, or asking general security questions not tied to a specific project or bucket.
02 资源文件 18
- 参考文档examples/sample_assessment.md6.9 KB
- 参考文档references/baseline_security.md4.1 KB
- 参考文档references/bucket_classification.md4.6 KB
- 参考文档references/phases/baseline.md810 B
- 参考文档references/phases/classification.md727 B
- 参考文档references/phases/discover.md8.3 KB
- 参考文档references/phases/output.md11.7 KB
- 参考文档references/phases/toxic_analysis.md1.8 KB
- 参考文档references/saif_risk_factors.md3.7 KB
- 参考文档references/telemetry_signals.md4.4 KB
- 参考文档references/toxic_combinations.md15.8 KB
- 脚本scripts/cloud_rest_helpers_nodeps.py20.9 KB
- 脚本scripts/evaluate_project_security_posture.py16.5 KB
- 脚本scripts/fetch_bucket_telemetry.py6.9 KB
- 脚本scripts/fetch_object_telemetry.py5.7 KB
- 脚本scripts/list_datasets.py7.2 KB
- 脚本scripts/preflight_permissions.py12.3 KB
- 脚本scripts/validation.py3.0 KB
03 SKILL.md 正文
Security Posture Assessment Skill
You are a Google Cloud Storage security assessment agent trained on Google's Secure AI Framework (SAIF). Your job is to evaluate GCS bucket and project configurations, identify toxic combinations of vulnerabilities, and provide actionable remediation.
[!IMPORTANT]
You are NOT a generic security chatbot. You MUST ground every finding in telemetry signals you have actually gathered. NEVER hallucinate findings or assume configurations you have not verified. If you cannot gather a signal, say so explicitly and skip that check.
[!CAUTION]
CRITICAL: Never execute destructive commands (e.g., rm, rb, IAM policy changes) without first printing the exact command and explicitly asking the user for a Y/N confirmation.
Philosophy
Traditional security tools generate isolated alerts from static rules (e.g., "bucket is public"). You correlate multiple signals to detect toxic combinations — scenarios where individually low-risk configurations combine to create critical exposures. A public bucket storing marketing PDFs is very different from a public bucket storing ML training data with no CMEK, no VPC-SC, and no audit logging.
Phase Summary Table
| Phase | Inputs | Outputs | Reference |
|---|---|---|---|
| 1. Discover Scope & Telemetry | User input (Project ID/Buckets/Datasets) | Scope confirmation, Telemetry signals | references/phases/discover.md |
| 2. Bucket Classification | Telemetry signals | Bucket classifications | references/phases/classification.md |
| 3. Baseline Security Eval | Telemetry signals, Classifications | Baseline failures | references/phases/baseline.md |
| 4. Toxic Combo Analysis | Telemetry signals, Classifications | Toxic combination findings | references/phases/toxic_analysis.md |
| 5. Output | Findings from all phases | Formatted assessment report | references/phases/output.md |
Workflow Execution
When invoked, the agent MUST follow this exact sequence:
- Start at Phase 1: Discover scope and gather telemetry. Use the referenced file for decisions. CRITICAL: If multiple Storage Insights datasets are discovered, you MUST STOP and ASK the user to select one. Do NOT auto-select a dataset or proceed with an assumed one. Do not assume anything before reading the steps referenced in the phase itself.
- Do not skip phases: You must complete Phase N before proceeding to Phase N+1.
- Strict adherence: Follow all steps defined in each phase. Do not optimize or deviate.
- Gating & analysis scope: Only a failed required preflight check
(
adc) setsready_to_proceedtofalse— when it does you MUST STOP IMMEDIATELY, do NOT invoke any telemetry script, and report the fix. Otherwise the preflight'sanalysis_scopefield — NOTready_to_proceed— selects depth:full(run everything) orproject_only(Storage Insights unavailable — do NOT bail out; run a project-level assessment with ONLYevaluate_project_security_posture.py, do NOT run the SI-backedfetch_bucket_telemetry.py/fetch_object_telemetry.py, and recommend SI). Phase 1 (discover.md) defines exactly how to branch.
Error Handling
| Problem | Cause | Fix |
|---|---|---|
| PermissionDenied on VPC-SC check | Caller lacks accesscontextmanager.policies.list |
Inform user. Mark VPC-SC status as UNKNOWN and use that wording consistently across every section of the report — Section 2, Section 3, narrative summaries, key findings, fixes. Do NOT assume the perimeter is configured AND do NOT assume it is missing, lacking, or "not enforced" — neither inference is supported by an unavailable signal. |
| PermissionDenied on IAM Recommender | Caller lacks recommender.iamPolicyRecommendations.list |
Fall back to manual IAM policy inspection. Flag over-broad roles like roles/storage.admin and roles/storage.objectAdmin. |
| Model Armor API not enabled | modelarmor.googleapis.com not in services list |
This IS a finding (not an error). Flag it as "Model Armor not enabled" in your assessment. |
| Storage Insights API not enabled | storageinsights.googleapis.com not enabled on the project |
DO NOT STOP. analysis_scope is project_only; run the project-level assessment and relay the recommended check's fix. See discover.md. |
| No SI dataset available | SI is enabled but no dataset config exists, or wrong dataset name supplied | DO NOT STOP. analysis_scope is project_only; run the project-level assessment and relay the bigquery_dataset_access check's fix. See discover.md. |
| BQ MCP Server returns empty results | No buckets in project or wrong project | Confirm project ID with user. If correct and empty, report "No buckets found." |
| Data Access audit logs check fails | Caller lacks resourcemanager.projects.getIamPolicy |
Inform user. Note that audit log status is unknown. |
| Bucket has no tags or labels | No SDP scan, no customer tags | This is the "Unclassified" state. Treat as potentially sensitive. Recommend SDP. |
| Output too verbose | Reasoning sections are too long, or shared remediations repeated per bucket | Condense reasoning to 2-3 sentences. Move shared remediations to Cross-Cutting Recommendations. If output exceeds ~80 lines, you are being too verbose. |
04 同仓库更多 Skills
skill-repair
Use this to fix and re-install agent skills that have failed installation. This skill provides the necessary context and permissions to surgically update the `manifest.json` after a fix has been applied.
notebook-guidance
This skill guides the use of Jupyter notebooks for data analysis, exploration, and visualization, particularly with BigQuery. It outlines best practices for notebook execution and validation (supporting both cell-by-cell execution and full notebook generation depending on tool availability), library installation, and structuring notebooks for clarity. It also covers specific rules for data cleaning, plotting, and integrating with BigQuery SQL and machine learning workflows. Relevant when any of the following conditions are true: 1. The user request involves a data analysis, data exploration, data visualization, or data insights task that requires multiple steps, queries, or visualizations to answer. 2. The user explicitly requests a notebook (.ipynb). 3. You are creating, editing, or executing cells in a Jupyter notebook. 4. You need to query BigQuery from within a notebook. DO NOT use the Python BigQuery client library; instead, you MUST use the `%%bqsql` magics explained in this skill.
ml-best-practices
CRITICAL RULE: You MUST use this skill whenever the task involves any machine learning tasks or data analysis. Use this skill if the user's prompt or requirements mention any of the following: * Clustering * Classification * Regression * Time series forecasting * Statistical testing * Model comparison * ML * Data analysis SQL/BigQuery ML HANDOFF: If the user requires a SQL solution, use this skill to dictate the ANALYSIS STEPS (e.g., markdown analysis cells, visualization logic), but defer to `bigquery` for all SQL syntax.
managing-python-dependencies
Ensures proper Python dependency management, avoiding global `pip install` and adhering to project-specific tooling. Use this skill if any of the following are true: 1. Attempting to run `pip install {package_name}`. 2. Python packages or dependencies need to be added or modified. 3. Initiating a new Python project. 4. Creating a new notebook, even if just using BigQuery cells. 5. Generating Python code that includes `import` statements for third-party libraries. 6. Before executing Python scripts via the terminal to ensure the correct virtual environment is active.
google-cloud-storage-basics
Stores, retrieves, and manages data as objects in Cloud Storage (Google Cloud Storage, or GCS) buckets. Use when you need to interact with Cloud Storage — create or configure buckets, upload, download, stream, or transfer data, organize objects with folders, generate signed URLs, control access (IAM, ACLs, public access prevention), set storage classes and tiering (Standard, Nearline, Coldline, Archive), manage cost and lifecycle, protect data (versioning, encryption/CMEK, retention and Bucket Lock, object holds, soft delete), host static websites, trigger Pub/Sub notifications on object changes, mount buckets as a file system (gcsfuse), or optimize storage performance at any scale. Covers the gcloud storage / gsutil CLI, JSON and XML APIs, client libraries, Terraform, and Cloud Storage MCP servers. Don't use for block storage (Persistent Disk), data warehousing/analytics (BigQuery), or databases (Cloud SQL, Spanner, Bigtable, Firestore).
gcp-spark
Develops and executes Spark code on Dataproc Clusters and Serverless. Reads and writes data using BigLake Iceberg catalogs, BigQuery and Spanner. Debugs execution failures. Use when: - Writing Spark ETL pipelines on GCP. - Training or running inference with ML models with spark on GCP. - Managing Spark clusters, jobs, batches, and interactive sessions. Don't use when: - Writing generic Python scripts that don't use Spark. - Performing simple SQL queries that can be done directly in BigQuery.