agent-platform-access-audit
Fungsinya
Skill ini mengkueri Cloud Audit Logs di BigQuery untuk menunjukkan sumber daya apa yang disentuh agent, identitas apa yang digunakannya, dan mengapa permintaan ditolak. Ditujukan untuk tim keamanan dan platform yang mengawasi agent AI di Google Cloud.
Kapan dipakai
- ✓Saat Anda perlu tahu sumber daya Google Cloud mana yang diakses agent AI.
- ✓Ketika Anda melihat error PERMISSION_DENIED dan perlu tahu apakah itu masalah perimeter atau IAM.
- ✓Saat Anda ingin tahu identitas teratas yang digunakan agent dalam rentang waktu tertentu.
Link skill
https://github.com/google/skills/blob/main/skills/cloud/agent-platform-access-audit/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
“Apa yang diakses agent AI saya di Google Cloud minggu lalu, dan mengapa ada permintaan yang ditolak?”
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Skill memeriksa alat dan API yang diperlukan, menjalankan kueri BigQuery pada log audit, dan mengelompokkan hasilnya menjadi akses, cakupan dampak, dan alasan penolakan.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Apakah ia mengubah pengaturan akses apa pun?
Tidak. Ini adalah audit yang membaca log, dan tidak memberikan atau mengubah izin.
Alat apa yang harus dipasang?
Google Cloud CLI dan bq, dengan kredensial aktif dan akun penagihan di proyek.
Bagaimana ia membedakan error perimeter dari error izin?
Ia memisahkan pelanggaran VPC Service Controls perimeter dari penolakan izin IAM.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 22k
- Peringkat
- #10198
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- …
Skill lain dari repositori ini
finding-google-skills
22kMembantu agent Anda menemukan panduan Google yang tepat untuk tugas pengaturan, seperti hosting, database, penyimpanan, login, atau penyajian model AI.
gcloud
22kMembantu agent Anda menulis dan memeriksa perintah gcloud Google Cloud, dengan mencari sintaks yang tepat sebelum menjalankan apa pun agar tidak menebak flag.
google-cloud-recipe-auth
22kMemandu agent Anda melalui identitas dan akses Google Cloud, termasuk cara orang dan layanan masuk serta izin apa yang mereka dapatkan.
google-cloud-recipe-onboarding
22kMemandu pengembang baru melalui langkah pertama di Google Cloud, termasuk memilih proyek, menautkan penagihan, dan men-deploy sumber daya pertama.
Skill serupa
reverse-engineer-anything
422kMembantu agent Anda memeriksa aplikasi dan paket yang sudah dirilis untuk menjelaskan fitur, membandingkan versi, atau memandu pembangunan ulang dengan alat REA.
1password
394kMembantu agent Anda mengatur CLI 1Password, masuk, serta membaca atau menyisipkan rahasia tanpa menampilkan nilainya di chat.
healthcheck
394kMembantu agent Anda mengaudit komputer atau server OpenClaw dari risiko keamanan seperti SSH, firewall, pembaruan, dan cadangan, lalu menyarankan perbaikan aman.