agent-platform-access-audit
Was er macht
Er fragt Cloud Audit Logs in BigQuery ab, um zu zeigen, welche Ressourcen ein Agent angefasst hat, als welche Identitäten er gehandelt hat und warum Anfragen abgelehnt wurden. Gedacht ist das für Sicherheits- und Plattformteams, die KI-Agenten in Google Cloud überwachen.
Wann du ihn nutzt
- ✓Wenn du wissen musst, auf welche Google-Cloud-Ressourcen ein KI-Agent zugegriffen hat.
- ✓Wenn du einen PERMISSION_DENIED-Fehler siehst und wissen musst, ob es ein Perimeter- oder ein IAM-Problem ist.
- ✓Wenn du die wichtigsten Identitäten sehen willst, als die ein Agent in einem Zeitraum gehandelt hat.
Link zum Skill
https://github.com/google/skills/blob/main/skills/cloud/agent-platform-access-audit/SKILL.mdKopiere ihn und füge ihn in deine KI ein (Claude, ChatGPT oder Cursor) mit der Bitte, den Anweisungen zu folgen.
So nutzt du ihn
Am einfachsten: Kopiere die Nachricht und füge sie in deine KI ein. Sie liest den Skill und folgt den Anweisungen.
Fertige Nachricht zum Einfügen
Für Claude Code, Codex oder Cursor: Führe den Befehl in deinem Projektordner aus, dann wird der Skill installiert.
Lade die SKILL.md herunter und lege sie in den Skills-Ordner deines Agenten.
Beispielanfrage an deine KI
“Worauf hat mein KI-Agent letzte Woche in Google Cloud zugegriffen, und warum wurden einige Anfragen abgelehnt?”
5 neue Skills pro Woche. 1 Minute Lesezeit.
So funktioniert es
Er prüft die nötigen Werkzeuge und APIs, führt BigQuery-Abfragen über die Audit-Logs aus und gruppiert die Ergebnisse in Zugriff, Reichweite und Ablehnungsgründe.
Technischer Inhalt (originale SKILL.md)
Originaltext des Autors, auf Englisch, direkt von GitHub.
Agent Access Audit
Use this skill to audit AI agent resource accesses, blast radius, and policy denials in Google Cloud using Cloud Audit Logs.
Usage Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read and follow the instructions in
Usage Attribution.
Prerequisites
Only refer to this section if a command fails. Proceed directly with the
workflow below, and only if a gcloud or bq command fails with an
authentication, API, billing, or PERMISSION_DENIED error, tell the user what
they need to do (do NOT configure or grant these yourself):
Google Cloud CLI:
gcloudandbqinstalled (installation guide).Authentication: Active credentials via
gcloud auth loginorgcloud auth application-default login.Active Billing Account: The Google Cloud project must have an active billing account attached (required for running
bq queryjobs against_AllLogs).Enabled APIs:
logging.googleapis.com,bigquery.googleapis.com, andagentregistry.googleapis.com. If any required API is disabled, provide the exact enablement command:gcloud services enable logging.googleapis.com bigquery.googleapis.com agentregistry.googleapis.com --project={PROJECT_ID}IAM roles on the project:
roles/logging.privateLogViewer,roles/bigquery.dataViewer,roles/bigquery.jobUser, androles/agentregistry.viewer.
Execution workflow
Follow these steps in order before answering any audit question:
Step 1: Resolve the project ID ({PROJECT_ID})
If the user explicitly provides a Google Cloud project ID in the prompt, use that project ID.
If the project ID is omitted from the prompt, run:
gcloud config get-value projectIf
gcloud config get-value projectreturns empty or(unset), stop and ask the user which Google Cloud project ID to query. Never leave{PROJECT_ID}as a literal placeholder in a SQL query.
Step 2: Resolve the exact SPIFFE principal ({PRINCIPAL_SUBJECT})
Cloud Audit Logs record the agent's SPIFFE runtime identity (principal://...),
not its human-readable display name, since multiple agents in a project can
share the same display name while having different SPIFFE identities.
If the user provides a
principal://...URI in the prompt: Use that exact string as{PRINCIPAL_SUBJECT}.If the user provides an agent display name (for example,
financial-advisor) instead of aprincipal://...URI: Look up the agent's location via Cloud Asset Inventory and then search Agent Registry to retrieve its SPIFFE principal before querying_AllLogs:LOCATION=$(gcloud asset search-all-resources \ --scope=projects/{PROJECT_ID} \ --query='displayName:"{AGENT_NAME}"' \ --format="value(location)" \ --limit=1) echo "Resolved location: $LOCATION" gcloud agent-registry agents search \ --location="${LOCATION:-global}" \ --project={PROJECT_ID} \ --search-string="displayName:{AGENT_NAME}" \ --format=jsonExtract the SPIFFE URI from
attributes["agentregistry.googleapis.com/system/RuntimeIdentity"]["principal"]:- Single match: Use its
principal://...value as{PRINCIPAL_SUBJECT}. - IMPORTANT: Identity does NOT start with
principal://(for example, starts withsa://or is missing): Stop immediately and do NOT runbq queryor check_AllLogs. Inform the user that the agent's runtime identity is not a SPIFFE ID (for example, it uses a shared service accountsa://...), and that Agent Access Audit requires an agent with aprincipal://...SPIFFE identity. - Multiple matches with different
principal://...URIs: List the matching agents alongside theirname,location, andprincipal://...URIs, and ask the user which specific agent to audit before runningbq query. - No matches (or no agent specified): Stop and ask the user to provide
the agent's
principal://...identity URI.
- Single match: Use its
SQL Parameterization Rule: Never pass a display name (such as `principal_subject = 'financia
Häufige Fragen
Ändert er Zugriffseinstellungen?
Nein. Es ist ein Audit, das Logs liest, und es erteilt oder ändert keine Berechtigungen.
Welche Tools müssen installiert sein?
Die Google Cloud CLI und bq, mit aktiven Anmeldedaten und einem Abrechnungskonto für das Projekt.
Wie unterscheidet er Perimeter-Fehler von Berechtigungsfehlern?
Er trennt Verstöße gegen VPC-Service-Controls-Perimeter von IAM-Berechtigungsablehnungen.
Details
Originalbeschreibung des Autors
Audits AI agent data access, blast radius, and blocked policy operations in Google Cloud by querying Cloud Audit Logs via BigQuery. Use when investigating what resources or services an agent accessed, identifying top originating principals the agent is acting as, or triaging PERMISSION_DENIED errors to distinguish VPC Service Controls perimeter violations from IAM permission denials. Don't use for configuring Cloud Monitoring alert policies, modifying IAM policies or VPC Service Controls perimeters, querying non-audit application logs, or performing write operations.
repo: google/skills
Beliebtheit
- GitHub-Sterne
- 22k
- Platz im Ranking
- #10198
- Lizenz
- Apache-2.0
- Aktualisiert
- 2.11.2026
Kommentare
- …
Weitere Skills aus diesem Repository
finding-google-skills
22kHilft deinem Agenten, die richtigen Google-Anleitungen für eine Einrichtungsaufgabe zu finden, etwa für Hosting, Datenbanken, Speicher, Anmeldung oder das Bereitstellen von KI-Modellen.
gcloud
22kHilft deinem Agenten, gcloud-Befehle für Google Cloud zu schreiben und zu prüfen, und schlägt die genaue Syntax nach, bevor etwas ausgeführt wird, damit keine Flags geraten werden.
google-cloud-recipe-auth
22kFührt deinen Agenten durch Identität und Zugriff in Google Cloud, einschließlich Anmeldung von Personen und Diensten und der Berechtigungen, die sie erhalten.
google-cloud-recipe-onboarding
22kFührt einen neuen Entwickler durch die ersten Schritte in Google Cloud, darunter Projektauswahl, Verknüpfung der Abrechnung und die Bereitstellung einer ersten Ressource.
Ähnliche Skills
reverse-engineer-anything
422kHilft deinem Agenten, fertige Apps und Pakete zu untersuchen, um Funktionen zu erklären, Versionen zu vergleichen oder einen Nachbau zu leiten, mit dem REA-Tool.
1password
394kHilft deinem Agenten, die 1Password-Kommandozeile einzurichten, sich anzumelden und Geheimnisse zu lesen oder einzufügen, ohne deren Werte im Chat auszugeben.
healthcheck
394kHilft deinem Agenten, den Computer oder Server, auf dem OpenClaw läuft, auf Sicherheitsrisiken wie SSH, Firewall, Updates und Backups zu prüfen und sichere Korrekturen vorzuschlagen.