Parser ini mengekstrak kolom dari log audit CircleCI dalam format CSV dan JSON, lalu mentransformasinya ke dalam Model Data Terpadu (UDM). Proses ini menangani kedua format, melakukan transformasi dan pengayaan data, serta memetakan kolom yang diekstrak ke kolom UDM yang sesuai dalam objek event. Log ini berfokus pada tindakan pengguna, akses resource, dan peristiwa pembaruan, mengategorikannya, dan mengisi kolom UDM yang relevan seperti principal, target, network, dan metadata.
Sebelum memulai
Pastikan Anda memenuhi prasyarat berikut:
Instance Google SecOps.
Akses istimewa ke CircleCI.
Menyiapkan feed
Untuk mengonfigurasi feed, ikuti langkah-langkah berikut:
Buka Setelan SIEM>Feed.
Klik Tambahkan Feed Baru.
Di halaman berikutnya, klik Konfigurasi satu feed.
Di kolom Feed name, masukkan nama untuk feed (misalnya, CircleCI Logs).
Pilih Webhook sebagai Jenis sumber.
Pilih CircleCI sebagai Jenis log.
Klik Berikutnya.
Opsional: Tentukan nilai untuk parameter input berikut:
Pemisah pemisahan: pemisah yang digunakan untuk memisahkan baris log, seperti \n.
Label penyerapan: label yang diterapkan ke peristiwa dari feed ini.
Klik Berikutnya.
Tinjau konfigurasi feed di layar Selesaikan, lalu klik Kirim.
Klik Buat Kunci Rahasia untuk membuat kunci rahasia guna mengautentikasi feed ini.
Salin dan simpan kunci rahasia. Anda tidak dapat melihat kunci rahasia ini lagi. Jika perlu, Anda dapat membuat ulang kunci rahasia baru, tetapi tindakan ini akan membuat kunci rahasia sebelumnya tidak berlaku.
Dari tab Detail, salin URL endpoint feed dari kolom Informasi Endpoint. Anda perlu menentukan URL endpoint ini di aplikasi klien Anda.
Rekomendasi: Tentukan kunci API sebagai header, bukan menentukannya di URL.
Jika klien webhook Anda tidak mendukung header kustom, Anda dapat menentukan kunci API dan kunci rahasia menggunakan parameter kueri dalam format berikut:
ENDPOINT_URL?key=API_KEY&secret=SECRET
Ganti kode berikut:
ENDPOINT_URL: URL endpoint feed.
API_KEY: kunci API untuk mengautentikasi ke Google SecOps.
SECRET: kunci rahasia yang Anda buat untuk mengautentikasi feed.
Mengonfigurasi webhook di CircleCI
Login ke antarmuka web CircleCI.
Pilih project yang ingin Anda masukkan lognya.
Klik Setelan Project.
Pilih Webhooks.
Klik Tambahkan Webhook.
Tentukan nilai untuk parameter input berikut:
Nama Webhook: berikan nama deskriptif (misalnya, Google SecOps).
Endpoint URL: masukkan <ENDPOINT_URL> endpoint Google SecOps API.
Peristiwa: Pilih peristiwa CircleCI yang akan memicu webhook (misalnya, pilih workflow-completed untuk mengirim data setelah alur kerja selesai).
Nilai account.id dari log mentah ditetapkan ke kolom UDM read_only_udm.about.resource.attribute.labels.value dengan key yang sesuai adalah account_id.
tindakan
read_only_udm.metadata.product_event_type
Nilai action dari log mentah ditetapkan ke kolom UDM read_only_udm.metadata.product_event_type.
actor.id
read_only_udm.principal.user.product_object_id
Nilai actor.id dari log mentah ditetapkan ke kolom UDM read_only_udm.principal.user.product_object_id.
actor.name
read_only_udm.principal.user.userid
Awalan "github: " dihapus dari kolom actor.name dalam log mentah. Nilai yang tersisa ditetapkan ke kolom UDM read_only_udm.principal.user.userid. Jika actor.name ada di log mentah, nilai USER_RESOURCE_UPDATE_CONTENT akan ditetapkan ke read_only_udm.metadata.event_type. Jika tidak, USER_RESOURCE_ACCESS akan ditetapkan.
id
read_only_udm.metadata.product_log_id
Nilai id dari log mentah ditetapkan ke kolom UDM read_only_udm.metadata.product_log_id. Parser menetapkan read_only_udm.metadata.log_type ke CIRCLECI. Parser menetapkan read_only_udm.metadata.product_name ke CIRCLECI. Parser menetapkan read_only_udm.metadata.vendor_name ke CIRCLECI.
occurred_at
read_only_udm.metadata.event_timestamp
Nilai occurred_at dari log mentah diuraikan sebagai stempel waktu dan ditetapkan ke kolom UDM read_only_udm.metadata.event_timestamp.
organization.name
read_only_udm.target.administrative_domain
Awalan "github: " dihapus dari kolom organization.name dalam log mentah. Nilai yang tersisa ditetapkan ke kolom UDM read_only_udm.target.administrative_domain.
Nilai payload.job.job_name dari log mentah ditetapkan ke kolom UDM read_only_udm.about.resource.attribute.labels.value dengan key yang sesuai adalah job_name.
Nilai payload.job.job_status dari log mentah ditetapkan ke kolom UDM read_only_udm.about.resource.attribute.labels.value dengan key yang sesuai adalah job_status.
Nilai payload.workflow.id dari log mentah ditetapkan ke kolom UDM read_only_udm.about.resource.attribute.labels.value dengan key yang sesuai adalah workflow_id.
request.id
read_only_udm.network.session_id
Nilai request.id dari log mentah ditetapkan ke kolom UDM read_only_udm.network.session_id.
Nilai scope.id dari log mentah ditetapkan ke kolom UDM read_only_udm.about.resource.attribute.labels.value dengan key yang sesuai adalah scope_id. Parser awalnya menetapkan sec_action ke BLOCK. Jika kolom success dalam log mentah bernilai benar (true), sec_action akan diubah menjadi ALLOW. Nilai sec_action kemudian ditetapkan ke kolom UDM read_only_udm.security_result.action.
target.id
read_only_udm.target.resource.product_object_id
Nilai target.id dari log mentah ditetapkan ke kolom UDM read_only_udm.target.resource.product_object_id.
target.name
read_only_udm.target.resource.name
Awalan "github: " dihapus dari kolom target.name dalam log mentah. Nilai yang tersisa ditetapkan ke kolom UDM read_only_udm.target.resource.name. Parser menetapkan read_only_udm.target.resource.resource_type ke STORAGE_OBJECT.
Nilai version dari log mentah dikonversi menjadi string dan ditetapkan ke kolom UDM read_only_udm.target.resource.attribute.labels.value dengan key yang sesuai adalah version.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-04 UTC."],[[["\u003cp\u003eThis document provides instructions for collecting CircleCI audit logs and ingesting them into Google SecOps, where they will be parsed and transformed into the Unified Data Model (UDM).\u003c/p\u003e\n"],["\u003cp\u003eThe parser supports both CSV and JSON formats of CircleCI audit logs, extracting key fields related to user actions, resource access, and updates.\u003c/p\u003e\n"],["\u003cp\u003eTo begin, users must have a Google SecOps instance, privileged access to CircleCI, and will need to configure a new webhook feed in Google SecOps to receive the CircleCI logs.\u003c/p\u003e\n"],["\u003cp\u003eConfiguring a webhook in CircleCI requires setting up an endpoint URL within CircleCI's settings, including the Google SecOps API key and secret for authentication.\u003c/p\u003e\n"],["\u003cp\u003eThe UDM Mapping table specifies how the various fields from CircleCI audit logs are mapped into the corresponding UDM fields in Google SecOps, enabling standardized analysis and reporting.\u003c/p\u003e\n"]]],[],null,["# Collect CircleCI audit logs\n===========================\n\nSupported in: \nGoogle secops [SIEM](/chronicle/docs/secops/google-secops-siem-toc)\n| **Note:** This feature is covered by [Pre-GA Offerings Terms](https://chronicle.security/legal/service-terms/) of the Google Security Operations Service Specific Terms. Pre-GA features might have limited support, and changes to pre-GA features might not be compatible with other pre-GA versions. For more information, see the [Google SecOps Technical Support Service guidelines](https://chronicle.security/legal/technical-support-services-guidelines/) and the [Google SecOps Service Specific Terms](https://chronicle.security/legal/service-terms/).\n\nThis parser extracts fields from CircleCI audit logs in CSV and JSON formats, transforming them into the Unified Data Model (UDM). It handles both formats, performs data transformations and enrichments, and maps the extracted fields to their corresponding UDM fields within the **event** object. It focuses on user actions, resource access, and update events, categorizing them and populating relevant UDM fields like **principal** , **target** , **network** , and **metadata**.\n\nBefore you begin\n----------------\n\nEnsure that you have the following prerequisites:\n\n- Google SecOps instance.\n- Privileged access to CircleCI.\n\nSet up feeds\n------------\n\nTo configure a feed, follow these steps:\n\n1. Go to **SIEM Settings** \\\u003e **Feeds**.\n2. Click **Add New Feed**.\n3. On the next page, click **Configure a single feed**.\n4. In the **Feed name** field, enter a name for the feed (for example, **CircleCI Logs**).\n5. Select **Webhook** as the **Source type**.\n6. Select **CircleCI** as the **Log type**.\n7. Click **Next**.\n8. Optional: Specify values for the following input parameters:\n - **Split delimiter** : the delimiter that is used to separate log lines, such as `\\n`.\n - **Asset namespace** : the [asset namespace](/chronicle/docs/investigation/asset-namespaces).\n - **Ingestion labels**: the label applied to the events from this feed.\n9. Click **Next**.\n10. Review the feed configuration in the **Finalize** screen, and then click **Submit**.\n11. Click **Generate Secret Key** to generate a secret key to authenticate this feed.\n12. Copy and store the secret key. You cannot view this secret key again. If needed, you can regenerate a new secret key, but this action makes the previous secret key obsolete.\n13. From the **Details** tab, copy the feed endpoint URL from the **Endpoint Information** field. You need to specify this endpoint URL in your client application.\n14. Click **Done**.\n\nCreate an API key for the webhook feed\n--------------------------------------\n\n1. Go to **Google Cloud console** \\\u003e **Credentials**.\n\n [Go to Credentials](https://console.cloud.google.com/apis/credentials)\n2. Click **Create credentials** , and then select **API key**.\n\n3. Restrict the API key access to the **Google Security Operations API**.\n\nSpecify the endpoint URL\n------------------------\n\n1. In your client application, specify the HTTPS endpoint URL provided in the webhook feed.\n2. Enable authentication by specifying the API key and secret key as part of the custom header in the following format:\n\n X-goog-api-key = \u003cvar class=\"readonly\" translate=\"no\"\u003eAPI_KEY\u003c/var\u003e\n X-Webhook-Access-Key = \u003cvar class=\"readonly\" translate=\"no\"\u003eSECRET\u003c/var\u003e\n\n **Recommendation**: Specify the API key as a header instead of specifying it in the URL.\n3. If your webhook client doesn't support custom headers, you can specify the API key and secret key using query parameters in the following format:\n\n \u003cvar translate=\"no\"\u003eENDPOINT_URL\u003c/var\u003e?key=\u003cvar translate=\"no\"\u003eAPI_KEY\u003c/var\u003e&secret=\u003cvar translate=\"no\"\u003eSECRET\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eENDPOINT_URL\u003c/var\u003e: the feed endpoint URL.\n - \u003cvar translate=\"no\"\u003eAPI_KEY\u003c/var\u003e: the API key to authenticate to Google SecOps.\n - \u003cvar translate=\"no\"\u003eSECRET\u003c/var\u003e: the secret key that you generated to authenticate the feed.\n\nConfiguring a webhook in CircleCI\n---------------------------------\n\n1. Sign in to the CircleCI web interface.\n2. Select the project you want to ingest the logs from.\n3. Click **Project Settings**.\n4. Select **Webhooks**.\n5. Click **Add Webhook**.\n6. Specify values for the following input parameters:\n\n - **Webhook Name** : provide a descriptive name (for example, **Google SecOps**).\n - **Endpoint URL** : enter the `\u003cENDPOINT_URL\u003e` of the Google SecOps API endpoint.\n\n | **Important:** Append the `\u003cAPI_KEY\u003e` and `\u003cSECRET\u003e` to the endpoint URL `\u003cENDPOINT_URL\u003e?key=\u003cAPI_KEY\u003e&secret=\u003cSECRET\u003e`.\n - **Events:** Select the CircleCI events that should trigger the webhook (for example, select **workflow-completed** to send data after a workflow finishes).\n7. Click **Save** to create the webhook.\n\nUDM Mapping Table\n-----------------\n\n**Need more help?** [Get answers from Community members and Google SecOps professionals.](https://security.googlecloudcommunity.com/google-security-operations-2)"]]