{"insertId":"637c2de7-0000-2b64-b671-24058876bb74","jsonPayload":{"podEvent":{"endTime":"2022-11-22T01:14:30.430151Z","policyName":"projects/123456789/platforms/gke/policies/my-policy","images":[{"result":"DENY","checkResults":[{"explanation":"TrustedDirectoryCheck at index 0 with display name \"My trusted directory check\" has verdict NOT_CONFORMANT. Image is not in a trusted directory","checkSetName":"My check set","checkSetIndex":"0","checkName":"My trusted directory check","verdict":"NON_CONFORMANT","checkType":"TrustedDirectoryCheck","checkIndex":"0"}],"image":"gcr.io/my-project/hello-app:latest"}],"verdict":"VIOLATES_POLICY","podNamespace":"default","deployTime":"2022-11-22T01:06:53Z","pod":"hello-app"},"@type":"type.googleapis.com/google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent"},"resource":{"type":"k8s_cluster","labels":{"project_id":"my-project","location":"us-central1-a","cluster_name":"my-test-cluster"}},"timestamp":"2022-11-22T01:44:28.729881832Z","severity":"WARNING","logName":"projects/my-project/logs/binaryauthorization.googleapis.com%2Fcontinuous_validation","receiveTimestamp":"2022-11-22T03:35:47.171905337Z"}
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-07。"],[[["\u003cp\u003eThis document provides guidance on how to view Cloud Logging entries generated by continuous validation (CV) with check-based platform policies, distinguishing them from legacy CV entries.\u003c/p\u003e\n"],["\u003cp\u003eCV logs document check-related issues in \u003ccode\u003epodEvent\u003c/code\u003e entries and configuration-related issues in \u003ccode\u003econfigErrorEvent\u003c/code\u003e entries, such as misconfigured platform policies or IAM roles.\u003c/p\u003e\n"],["\u003cp\u003eYou can utilize \u003ccode\u003egcloud\u003c/code\u003e commands to search Cloud Logging for CV configuration errors and platform policy validation violations within a specified time frame, typically the last seven days.\u003c/p\u003e\n"],["\u003cp\u003eCV logs any errors and violations to Cloud Logging, generally within a few hours, but can take up to 24 hours to appear.\u003c/p\u003e\n"],["\u003cp\u003eThe document includes an example of a CV Logging entry for a non-conformant image that violates a trusted directory check, along with a list of different check types that CV logs can generate.\u003c/p\u003e\n"]]],[],null,["# View continuous validation logs\n\n| **Preview**\n|\n|\n| This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n| of the [Service Specific Terms](/terms/service-terms#1).\n|\n| Pre-GA products and features are available \"as is\" and might have limited support.\n|\n| For more information, see the\n| [launch stage descriptions](/products#product-launch-stages).\n\nThis guide shows you how to view Cloud Logging entries that are generated by\ncontinuous validation (CV) with check-based platform policies. To instead view legacy continuous validation\n([deprecated](/binary-authorization/docs/deprecations/cv-project-singleton-policy)) entries, see [View legacy CV logs](/binary-authorization/docs/using-cv#view_cv_events_in_logging).\n\nCV logs check-related issues in `podEvent` entries.\nCV logs configuration-related issues in `configErrorEvent`\nentries---for example, if a platform policy or IAM roles are\nmisconfigured.\n\nView logs for CV entries\n------------------------\n\nYou can search Cloud Logging entries to find [CV configuration errors](#view-config-errors)\nand [CV platform policy validation violations](#view-validation-violations).\n\nCV logs errors and violations to Cloud Logging\nwithin 24 hours. You can usually see entries within a few hours.\n\n### View CV configuration error logs\n\nTo view CV configuration error logs, run the following command: \n\n gcloud logging read \\\n --order=\"desc\" \\\n --freshness=7d \\\n --project=\u003cvar translate=\"no\"\u003eCLUSTER_PROJECT_ID\u003c/var\u003e \\\n 'logName:\"binaryauthorization.googleapis.com%2Fcontinuous_validation\" \"configErrorEvent\"'\n\nThe following output shows a configuration error in which a CV\nplatform policy isn't found: \n\n {\n \"insertId\": \"141d4f10-72ea-4a43-b3ec-a03da623de42\",\n \"jsonPayload\": {\n \"@type\": \"type.googleapis.com/google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent\",\n \"configErrorEvent\": {\n \"description\": \"Cannot monitor cluster 'us-central1-c.my-cluster': Resource projects/123456789/platforms/gke/policies/my-policy does not exist.\"\n }\n },\n \"resource\": {\n \"type\": \"k8s_cluster\",\n \"labels\": {\n \"cluster_name\": \"my-cluster\",\n \"location\": \"us-central1-c\",\n \"project_id\": \"my-project\"\n }\n },\n \"timestamp\": \"2024-05-28T15:31:03.999566Z\",\n \"severity\": \"WARNING\",\n \"logName\": \"projects/my-project/logs/binaryauthorization.googleapis.com%2Fcontinuous_validation\",\n \"receiveTimestamp\": \"2024-05-28T16:30:56.304108670Z\"\n }\n\n### View CV platform policy validation violations\n\nIf no images violate the platform policies that you have enabled, no entries\nappear in the logs.\n\nTo view CV log entries for the last seven days, run the following\ncommand: \n\n gcloud logging read \\\n --order=\"desc\" \\\n --freshness=7d \\\n --project=\u003cvar translate=\"no\"\u003eCLUSTER_PROJECT_ID\u003c/var\u003e \\\n 'logName:\"binaryauthorization.googleapis.com%2Fcontinuous_validation\" \"policyName\"'\n\nReplace \u003cvar translate=\"no\"\u003eCLUSTER_PROJECT_ID\u003c/var\u003e with the cluster project ID.\n\n#### Check types\n\nCV logs check violation information to `checkResults`. In the\nentry, the value `checkType` indicates the check. The values for each check are\nas follows:\n\n- `ImageFreshnessCheck`\n- `SigstoreSignatureCheck`\n- `SimpleSigningAttestationCheck`\n- `SlsaCheck`\n- `TrustedDirectoryCheck`\n- `VulnerabilityCheck`\n\n#### Example log\n\nThe following example CV Logging entry describes\na non-conformant image that violates a [trusted directory check](/binary-authorization/docs/overview-cv#trusted-directory-check): \n\n {\n \"insertId\": \"637c2de7-0000-2b64-b671-24058876bb74\",\n \"jsonPayload\": {\n \"podEvent\": {\n \"endTime\": \"2022-11-22T01:14:30.430151Z\",\n \"policyName\": \"projects/123456789/platforms/gke/policies/my-policy\",\n \"images\": [\n {\n \"result\": \"DENY\",\n \"checkResults\": [\n {\n \"explanation\": \"TrustedDirectoryCheck at index 0 with display name \\\"My trusted directory check\\\" has verdict NOT_CONFORMANT. Image is not in a trusted directory\",\n \"checkSetName\": \"My check set\",\n \"checkSetIndex\": \"0\",\n \"checkName\": \"My trusted directory check\",\n \"verdict\": \"NON_CONFORMANT\",\n \"checkType\": \"TrustedDirectoryCheck\",\n \"checkIndex\": \"0\"\n }\n ],\n \"image\": \"gcr.io/my-project/hello-app:latest\"\n }\n ],\n \"verdict\": \"VIOLATES_POLICY\",\n \"podNamespace\": \"default\",\n \"deployTime\": \"2022-11-22T01:06:53Z\",\n \"pod\": \"hello-app\"\n },\n \"@type\": \"type.googleapis.com/google.cloud.binaryauthorization.v1beta1.ContinuousValidationEvent\"\n },\n \"resource\": {\n \"type\": \"k8s_cluster\",\n \"labels\": {\n \"project_id\": \"my-project\",\n \"location\": \"us-central1-a\",\n \"cluster_name\": \"my-test-cluster\"\n }\n },\n \"timestamp\": \"2022-11-22T01:44:28.729881832Z\",\n \"severity\": \"WARNING\",\n \"logName\": \"projects/my-project/logs/binaryauthorization.googleapis.com%2Fcontinuous_validation\",\n \"receiveTimestamp\": \"2022-11-22T03:35:47.171905337Z\"\n }\n\nWhat's next\n-----------\n\n- [Use the image freshness check](/binary-authorization/docs/cv-freshness-check)\n- [Use the simple signing attestation check](/binary-authorization/docs/cv-attestation-check)\n- [Use the Sigstore signature check](/binary-authorization/docs/cv-sigstore-check)\n- [Use the SLSA check](/binary-authorization/docs/cv-slsa-check)\n- [Use the trusted directory check](/binary-authorization/docs/cv-trusted-directory-check)\n- [Use the vulnerability check](/binary-authorization/docs/cv-vulnerability-check)\n- [View CV logs](/binary-authorization/docs/cv-view-logs)"]]