Compliance Environment Assessor Skill
This skill performs zero-risk, non-mutating compliance discovery, physical telemetry profiling, and data boundary framework recommendation across Google Cloud Folders (folders/{folder_id}) and Projects (projects/{project_id}).
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution [blocked].
Safety & Execution Tier (CRITICAL)
- Tier R (Strictly Read-Only):
All discovery operations execute read-only queries
(
gcloud asset search-all-resources,gcloud compliance-manager frameworks list,gcloud compliance-manager cloud-controls describe, andgcloud org-policies describe --effective). You MUST NEVER execute mutating commands (gcloud compliance-manager framework-deployments create,gcloud org-policies set-policy, orgcloud resource-manager ...).
Grounding Guardrails: Google Cloud & Assured Workloads Precedence (CRITICAL)
To prevent hallucinations, incorrect compliance assessments, and false blockers derived from generic LLM pre-training, the agent is governed by strict Grounding Guardrails:
- Strict Prohibition on Generic LLM Pre-Training Priors:
- You MUST NOT derive compliance rules, API semantics, or deployment constraints from generic web pre-training (e.g., generic NIST/FedRAMP certification audit checklists, AWS/Azure architectures, or legacy on-prem IT auditor mindsets).
- In traditional IT audits, non-compliance is a binary go/no-go gate that
blocks deployment. In Google Cloud Assured Workloads, deploying in
Monitoring (
Detective) mode enables detective controls without mutating existing Organization Policies, allowing continuous observability without halting Day 0 rollout. You MUST NOT confuse these paradigms.
- Authoritative Assured Workloads Scope & Deployment Grounding:
- Assured Workloads binds compliance frameworks directly to existing or new
Google Cloud folders (
folders/...) and projects (projects/...). - Existing Workloads (Folders or Projects): Recommend deploying in
Monitoring (
Detective) mode first to assess and remediate findings safely without mutating existing Organization Policies, and then transitioning to Preventive mode. - New Workloads (Folders or Projects): Recommend starting in
Preventive mode or Monitoring (
Detective) mode. - Google Cloud Console Deployment: Always guide the user to deploy the
recommended framework via the Assured Workloads Frameworks tab in Google
Cloud Console
(
https://console.cloud.google.com/compliance/configure/frameworks?organizationId=ORGANIZATION_ID). Do NOT recommendgcloud assured workloads create(which only provisions new greenfield folders using legacy regime enums and cannot bind frameworks to existing folders or projects).
- Assured Workloads binds compliance frameworks directly to existing or new
Google Cloud folders (
- Client-Side Org Policy Readiness vs. Server-Side CES Boundary:
- Client-Side Scope: Pre-flight evaluation via
scripts/evaluate_control_rules.pyassesses ONLY the 3 high-confidence Organization Policy parameter sets bound inFramework.cloudControlDetails[].parameters:- Resource Locations (
builtin-restrict-resource-locations/constraints/gcp.resourceLocations) - Service Usage Restrictions / SUR
(
builtin-enforce-service-usage-restrictions/constraints/gcp.restrictServiceUsage) - CMEK Encryption Requirements (
builtin-require-cmek/constraints/gcp.restrictNonCmekServices)
- Resource Locations (
- Server-Side CES Scope: Complex Continuous Evaluation Service
(
ces_rule) and REST API rules (rest_api_measurement) are evaluated server-side by the Continuous Evaluation Service (CES) after the framework is deployed. - Terminology Invariant: You MUST frame client-side findings as
Pre-Flight Org Policy Readiness Recommendations / Potential Drift
Indicators (
orgPolicyDriftIndicators), NEVER as definitive compliance "violations" or "deployment blockers" that could contradict an actual post-deployment CES run.
- Client-Side Scope: Pre-flight evaluation via
- Static Built-In Catalog, Session Caching, Support Routing & KAJ Flow:
- Built-in Frameworks (
type: BUILT_IN) returned bygcloud compliance-manager frameworks listare static configurations uniform across organizations. Fetchframeworks.jsononce per session and reuse the cached file across all candidate evaluations and follow-up queries. - Personnel Support Model: Determine whether a framework requires a
Paid Sovereign/Regulated Support Subscription or uses Standard
Commercial Support ($0 support uplift) from the framework's public
displayNameanddescriptioninframeworks.json:- Paid Sovereign/Regulated Support Subscription: Frameworks whose
descriptionspecifies support personnel access controls (e.g.,"Support access controls are set to ...",-and-supportvariants such asbuiltin-eu-data-boundary-and-supportandbuiltin-us-data-boundary-and-support, or regulated standards such asbuiltin-il4,builtin-il5,builtin-itar,builtin-fedramp-high,builtin-cjis). - Standard Commercial Support ($0 support uplift): Regional-only Data
Boundary frameworks whose
descriptionsets data location controls only without a support access controls clause (e.g.,builtin-us-data-boundary,builtin-eu-data-boundary,builtin-uk-data-boundary,builtin-japan-data-boundary). - Important: Do NOT use the mere presence of
builtin-restrict-technical-support-servicesincloudControlDetailsas a discriminator, because both regional-only and paid-support Data Boundary frameworks include that control.
- Paid Sovereign/Regulated Support Subscription: Frameworks whose
- Key Access Justifications (KAJ) & EKM: Recommend
-with-access-justificationsframework variants only when the customer explicitly requests KAJ/EKM, or when disambiguating between matching regional variants inframeworks.json.
- Built-in Frameworks (
- Deterministic Tool Gating:
- You MUST NOT guess compatibility scores ($$S_{\text{composite}}$$) or resource inventories.
- You MUST execute
scripts/evaluate_control_rules.pywith--frameworks-file=frameworks.json.
Prerequisites
Before executing environment assessment, ensure your local or Cloud Shell environment meets the following prerequisites:
- Google Cloud SDK:
- Install and initialize the latest Google Cloud CLI (
gcloud): https://docs.cloud.google.com/sdk/docs/install.md.txt
- Install and initialize the latest Google Cloud CLI (
- Project Setup & Target Selection:
- Select or configure an administrative project for running assessment queries:
- Region Configuration & Availability:
- Configure a well-supported default region (e.g.
us-central1): - Consult official region availability documentation: Google Cloud Locations.
- Configure a well-supported default region (e.g.
- Required API Enablement:
- Enable the required Google Cloud APIs on the administrative project:
- Authentication Setup:
- Authenticate your user or service account identity and establish application default credentials:
- Billing & Quota Project Setup (Zero Billing Impact):
- Zero-Cost Assessment Guarantee: Running this assessment incurs $0 in
Google Cloud infrastructure and API billing charges. All discovery
operations (
gcloud asset search-all-resources,gcloud compliance-manager frameworks list, andgcloud org-policies describe --effective) are free read-only metadata queries. - Quota Project Requirement: Google Cloud Service Infrastructure requires an administrative project with an active Cloud Billing account attached to allocate API rate limits and meter service usage (sent via the
X-Goog-User-Projectheader), even for free APIs. - Pre-Flight Verification:
- Zero-Cost Assessment Guarantee: Running this assessment incurs $0 in
Google Cloud infrastructure and API billing charges. All discovery
operations (
- Commands & Payloads Reference:
- Consult the Google Cloud CLI Commands Reference [blocked] for full server-side projection masks, field filters, and API payload definitions.
Step-by-Step Operating Workflow
Step 1: Ingest Scope & Resolve Organization ID
- Accept or prompt for the target scope (
folders/{folder_id}orprojects/{project_id}). If the user provides an open-ended scope without stating a regulatory regime, DO NOT block on broad questionnaires. Proceed immediately to ingest telemetry. - Automatically resolve the parent Organization ID from the scope to drive downstream catalog queries:
- For Folders:
(If the parent is another folder, traverse up ancestors until
organizations/{org_id}is found) - For Projects:
- For Folders:
(If the parent is another folder, traverse up ancestors until
Step 2: Ingest Asset Telemetry & Effective Org Policies via Two-Pass Telescoping Protocol
To guarantee 100% coverage across the scope hierarchy while keeping payloads compact, telemetry ingestion executes in two telescoping passes (see Google Cloud CLI Commands Reference [blocked]):
-
Pass 1: Macro Footprint & API Enumeration (100% Scope Coverage):
- Pagination & Scope Semantics:
--page-size=500fetches 500 cloud assets per HTTP API page (the maximum batch size permitted by Cloud Asset Inventory), automatically paginating through all assets strictly insidefolders/FOLDER_IDand its descendant projects. - Full Location & SUR Coverage:
macro_telemetry.jsoncaptures 100% of activelocationandassetTypevalues required to evaluate bothbuiltin-restrict-resource-locations(allowedLocations) andbuiltin-enforce-service-usage-restrictions(allowedServices/ SUR). - If
PERMISSION_DENIEDis returned:- If the error states
USER_PROJECT_DENIEDor referencesroles/serviceusage.serviceUsageConsumer, the error is on the administrative quota project (it lacks an attached billing account or caller lacksserviceUsageConsumer). Follow the Quota Project Recovery playbook and stop running further commands. - If the error references the target scope (
folders/...orprojects/...), HALT ALL TOOL CALLS IMMEDIATELY (do not run Step 2.2, Step 3, or any further commands) and inform the user they requireroles/cloudasset.viewerandroles/orgpolicy.policyVieweron that scope.
- If the error states
- If 0 resources are returned, inform the user the target scope is empty.
- Pagination & Scope Semantics:
-
Inspect Effective Universal Org Policies on Scope (
38/38Frameworks):
Step 3: Fetch & Cache Built-In Framework Catalog and Filter by Location + SUR
- Fetch & Cache Built-In Framework Catalog (with Bound Parameters):
- Session Caching: Because built-in
ASSURED_WORKLOADSframeworks are static definitions uniform across organizations, cache the output inframeworks.jsonand reuse it for all candidate evaluations and follow-up questions.
- Session Caching: Because built-in
- Filter Candidates by Location + SUR Footprint & Clarify Intent:
- Exclude location-less control-plane management metadata
(
cloudresourcemanager.googleapis.com/*,orgpolicy.googleapis.com/*,cloudasset.googleapis.com/*,accesscontextmanager.googleapis.com/*, andlocation: "global"hierarchy nodes) from data-plane location checks. - Match active data-plane regions (
location) and active service prefixes (assetType) frommacro_telemetry.jsonagainst each framework'sbuiltin-restrict-resource-locations(allowedLocations) andbuiltin-enforce-service-usage-restrictions(allowedServices/ SUR) parameters inframeworks.json:- US-Only Regions (
us-central1,us-east4): Candidates include DoD IL5 (builtin-il5, adjudicated support), ITAR (builtin-itar, US persons support), FedRAMP High/Moderate, or US Regional Data Boundary (builtin-us-data-boundary, standard commercial support). - EU-Only Regions (
europe-west3,europe-west1): Candidates include EU Data Boundary and Support (builtin-eu-data-boundary-and-support) vs. standard EU Regional Boundary (builtin-eu-data-boundary).
- US-Only Regions (
- Targeted Disambiguation:
- If multiple frameworks match the physical footprint and user regulatory intent is unstated (e.g., an open-ended request with no regime specified), DO NOT finalize a single primary recommendation yet — present the matching candidate frameworks and STOP to ask the user a targeted clarifying question about their regulatory intent (e.g., EU Sovereignty, US FedRAMP/IL5) and personnel support model (Standard Commercial Support vs. Paid Sovereign/Regulated Support).
- Recommend
-with-access-justifications(KAJ/EKM) framework variants only if the customer explicitly asks for KAJ/EKM or when disambiguating between matching regional variants. - Out-of-Scope / Non-Catalog Compliance Standards (e.g., CMMC, UK
GDPR):
If the user asks to evaluate a compliance standard or legal certification
that is not present as a built-in
ASSURED_WORKLOADSframework inframeworks.json(such as CMMC, UK GDPR, SOC 2, or PCI-DSS), DO NOT fabricate or pass non-existent framework IDs (e.g.,builtin-cmmcorbuiltin-uk-gdpr) toevaluate_control_rules.py. Explicitly state that the requested standard is not a standalone Assured Workloads Data Boundary framework, explain the catalog scope boundary (Data Boundary enforces regional data residency, SUR, CMEK, and sovereign support routing rather than legal privacy or third-party certification audits), and offer the closest adjacentASSURED_WORKLOADSframeworks fromframeworks.jsonthat match their active regional footprint (e.g.,builtin-il5orbuiltin-fedramp-highfor US defense/CUI workloads, orbuiltin-eu-data-boundary-and-support/builtin-eu-data-boundary/builtin-uk-data-boundaryfor European/UK regional residency).
- Exclude location-less control-plane management metadata
(
Step 4: Conditional Pass 2 CMEK Ingestion & Org Policy Evaluation
- Pass 2: Conditional Targeted Deep Ingestion for CMEK Resource Types:
Derive
TARGET_TYPES(the intersection of active CAIassetTypes inmacro_telemetry.jsonand CMEK-governed services inbuiltin-require-cmekfromframeworks.json). Only 6 of the 38 Data Boundary frameworks includebuiltin-require-cmek; ifTARGET_TYPESis non-empty, fetchkmsKeys: - Execute High-Confidence Org Policy Evaluator:
Run
scripts/evaluate_control_rules.pyovermacro_telemetry.json(and optionaldeep_telemetry.json) withframeworks.jsonto compute the 3 quantitative scores (locationScore,serviceScore,cmekScore,compositeScore) andorgPolicyDriftIndicators(whencmekRequiredisfalse, always display the CMEK Readiness column asN/Ain the scorecard): - Evaluate Operational & Governance Impact:
- Review
cloudControlDetailsinframeworks.jsonfor parameterized and operational controls (builtin-restrict-kms-protection-levels,builtin-enforce-allowed-cmek-crypto-key-projects,builtin-restrict-cloud-function-generations,builtin-restrict-cloudstorage-auth-types,builtin-iam-disable-service-account-key-creation,builtin-disable-ssh-in-browser,builtin-enable-axt, and*-regulatory-settingscontrols likebuiltin-cloud-logging-regulatory-settings) and summarize their workflow impact in the final report.
- Review
Step 5: Render Executive Assessment Report (Minto Pyramid Structure)
Present an executive report structured around the Minto Pyramid Principle (Bottom Line Up Front -> Core Value Pillars -> Supporting Evidence -> Action Plan):
Step 6: Handling Customer Follow-Up Questions on Specific Services
When a customer follows up with a specific question about how a recommended or candidate framework affects a particular Google Cloud service (e.g., Cloud Run, Cloud Storage, Spanner, GKE, Cloud SQL, Vertex AI, Cloud Logging):
- Inspect Cached
frameworks.jsonLocally (or Fetch via Step 3frameworks listif Not Cached):- If
frameworks.jsonis not yet present in the current working directory, run the Step 3gcloud compliance-manager frameworks listcommand first to populateframeworks.json. - Check whether
<service>.googleapis.comis permitted inbuiltin-enforce-service-usage-restrictions(allowedServices) and whether CMEK is required inbuiltin-require-cmek(services). - Identify all service-specific
cloudControlDetails[].nameentries bound in that framework (e.g.,builtin-run-disable-ephemeral-disk,builtin-restrict-cloudstorage-auth-types,builtin-disable-spanner-multi-region,builtin-cloud-logging-regulatory-settings) and any boundparameters.
- If
- Fetch Authoritative Control Details On Demand:
- Because
Framework.cloudControlDetailsomits control descriptions, enforcement modes, and remediation steps, runcloud-controls describefor the relevant control ID(s): - Extract the exact underlying Organization Policy constraint (e.g.,
run.managed.disableEphemeralDisk,storage.restrictAuthTypes),supportedEnforcementModes(PREVENTIVEvs.DETECTIVE), andremediationStepsfrom the response.
- Because
- Check Effective Folder/Project Policy If Requested:
- If the customer asks whether their folder already enforces that service-specific Org Policy constraint, run:

