Debian Codegraph @

docs/dyn/binaryauthorization_v1.projects.platforms.policies.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="binaryauthorization_v1.html">Binary Authorization API</a> . <a href="binaryauthorization_v1.projects.html">projects</a> . <a href="binaryauthorization_v1.projects.platforms.html">platforms</a> . <a href="binaryauthorization_v1.projects.platforms.policies.html">policies</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#create">create(parent, body=None, policyId=None, x__xgafv=None)</a></code></p>
82 <p class="firstline">Creates a platform policy, and returns a copy of it. Returns `NOT_FOUND` if the project or platform doesn't exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the policy already exists, and `INVALID_ARGUMENT` if the policy contains a platform-specific policy that does not match the platform value specified in the URL.</p>
83 <p class="toc_element">
84 <code><a href="#delete">delete(name, etag=None, x__xgafv=None)</a></code></p>
85 <p class="firstline">Deletes a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.</p>
86 <p class="toc_element">
87 <code><a href="#get">get(name, x__xgafv=None)</a></code></p>
88 <p class="firstline">Gets a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.</p>
89 <p class="toc_element">
90 <code><a href="#list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</a></code></p>
91 <p class="firstline">Lists platform policies owned by a project in the specified platform. Returns `INVALID_ARGUMENT` if the project or the platform doesn't exist.</p>
92 <p class="toc_element">
93 <code><a href="#list_next">list_next()</a></code></p>
94 <p class="firstline">Retrieves the next page of results.</p>
95 <p class="toc_element">
96 <code><a href="#replacePlatformPolicy">replacePlatformPolicy(name, body=None, x__xgafv=None)</a></code></p>
97 <p class="firstline">Replaces a platform policy. Returns `NOT_FOUND` if the policy doesn't exist.</p>
98 <h3>Method Details</h3>
99 <div class="method">
100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102 </div>
103
104 <div class="method">
105 <code class="details" id="create">create(parent, body=None, policyId=None, x__xgafv=None)</code>
106 <pre>Creates a platform policy, and returns a copy of it. Returns `NOT_FOUND` if the project or platform doesn&#x27;t exist, `INVALID_ARGUMENT` if the request is malformed, `ALREADY_EXISTS` if the policy already exists, and `INVALID_ARGUMENT` if the policy contains a platform-specific policy that does not match the platform value specified in the URL.
107
108 Args:
109 parent: string, Required. The parent of this platform policy. (required)
110 body: object, The request body.
111 The object takes the form of:
112
113 { # A Binary Authorization platform policy for deployments on various platforms.
114 &quot;description&quot;: &quot;A String&quot;, # Optional. A description comment about the policy.
115 &quot;etag&quot;: &quot;A String&quot;, # Optional. Used to prevent updating the policy when another request has updated it since it was retrieved.
116 &quot;gkePolicy&quot;: { # A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a `PlatformPolicy`. # Optional. GKE platform-specific policy.
117 &quot;checkSets&quot;: [ # Optional. The `CheckSet` objects to apply, scoped by namespace or namespace and service account. Exactly one `CheckSet` will be evaluated for a given Pod (unless the list is empty, in which case the behavior is &quot;always allow&quot;). If multiple `CheckSet` objects have scopes that match the namespace and service account of the Pod being evaluated, only the `CheckSet` with the MOST SPECIFIC scope will match. `CheckSet` objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a `CheckSet` with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one `CheckSet` matches a given Pod, the `CheckSet` that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a `CheckSet` with no scope set, i.e. a catchall to handle any situation not caught by the preceding `CheckSet` objects.
118 { # A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a `CheckSet` to return &quot;allowed&quot; for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to &quot;allowed&quot;.
119 &quot;checks&quot;: [ # Optional. The checks to apply. The ultimate result of evaluating the check set will be &quot;allow&quot; if and only if every check in `checks` evaluates to &quot;allow&quot;. If `checks` is empty, the default behavior is &quot;always allow&quot;.
120 { # A single check to perform against a Pod. Checks are grouped into `CheckSet` objects, which are defined by the top-level policy.
121 &quot;alwaysDeny&quot;: True or False, # Optional. A special-case check that always denies. Note that this still only applies when the scope of the `CheckSet` applies and the image isn&#x27;t exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to &quot;deny&quot;.
122 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
123 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated.
124 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
125 &quot;A String&quot;,
126 ],
127 },
128 &quot;imageFreshnessCheck&quot;: { # An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories. # Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time.
129 &quot;maxUploadAgeDays&quot;: 42, # Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero.
130 },
131 &quot;sigstoreSignatureCheck&quot;: { # A Sigstore signature check, which verifies the Sigstore signature associated with an image. # Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry.
132 &quot;sigstoreAuthorities&quot;: [ # Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.
133 { # A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.
134 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
135 &quot;publicKeySet&quot;: { # A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it. # Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature.
136 &quot;publicKeys&quot;: [ # Required. `public_keys` must have at least one entry.
137 { # A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.
138 &quot;publicKeyPem&quot;: &quot;A String&quot;, # The public key material in PEM format.
139 },
140 ],
141 },
142 },
143 ],
144 },
145 &quot;simpleSigningAttestationCheck&quot;: { # Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning. # Optional. Require a SimpleSigning-type attestation for every image in the deployment.
146 &quot;attestationAuthenticators&quot;: [ # Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification. Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an &quot;OR&quot; of the authenticator results. At least one authenticator is required.
147 { # An attestation authenticator that will be used to verify attestations. Typically this is just a set of public keys. Conceptually, an authenticator can be treated as always returning either &quot;authenticated&quot; or &quot;not authenticated&quot; when presented with a signed attestation (almost always assumed to be a [DSSE](https://github.com/secure-systems-lab/dsse) attestation). The details of how an authenticator makes this decision are specific to the type of &#x27;authenticator&#x27; that this message wraps.
148 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `AttestationAuthenticator`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
149 &quot;pkixPublicKeySet&quot;: { # A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a `PkixPublicKeySet` if any of the public keys verify it (i.e. it is an &quot;OR&quot; of the keys). # Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate).
150 &quot;pkixPublicKeys&quot;: [ # Required. `pkix_public_keys` must have at least one entry.
151 { # A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.
152 &quot;keyId&quot;: &quot;A String&quot;, # Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the `key_id` field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.
153 &quot;publicKeyPem&quot;: &quot;A String&quot;, # A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
154 &quot;signatureAlgorithm&quot;: &quot;A String&quot;, # The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in `public_key_pem` (i.e. this algorithm must match that of the public key).
155 },
156 ],
157 },
158 },
159 ],
160 &quot;containerAnalysisAttestationProjects&quot;: [ # Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. A project ID must be used, not a project number. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.
161 &quot;A String&quot;,
162 ],
163 },
164 &quot;slsaCheck&quot;: { # A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only. # Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory.
165 &quot;rules&quot;: [ # Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied.
166 { # Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.
167 &quot;attestationSource&quot;: { # Specifies the locations for fetching the provenance attestations. # Specifies where to fetch the provenances attestations generated by the builder (group).
168 &quot;containerAnalysisAttestationProjects&quot;: [ # The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.
169 &quot;A String&quot;,
170 ],
171 },
172 &quot;configBasedBuildRequired&quot;: True or False, # If true, require the image to be built from a top-level configuration. `trusted_source_repo_patterns` specifies the repositories containing this configuration.
173 &quot;customConstraints&quot;: &quot;A String&quot;, # Optional. A CEL expression for specifying custom constraints on the provenance payload. This can be used when users want to specify expectations on provenance fields that are not covered by the general check. For example, users can use this field to require that certain parameters should never be used during the build process.
174 &quot;trustedBuilder&quot;: &quot;A String&quot;, # Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don&#x27;t need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group).
175 &quot;trustedSourceRepoPatterns&quot;: [ # List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. `https://`). The patterns must not include schemes. For example, the pattern `source.cloud.google.com/my-project/my-repo-name` matches the following URLs: - `source.cloud.google.com/my-project/my-repo-name` - `git+ssh://source.cloud.google.com/my-project/my-repo-name` - `https://source.cloud.google.com/my-project/my-repo-name` A pattern matches a URL either exactly or with `*` wildcards. `*` can be used in only two ways: 1. trailing `*` after hosturi/ to match varying endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` and `**` can only be used as wildcards and can only occur at the end of the pattern after a `/`. (So it&#x27;s not possible to match a URL that contains literal `*`.) For example: - `github.com/my-project/my-repo` is valid to match a single repo - `github.com/my-project/*` will match all direct repos in `my-project` - `github.com/**` matches all repos in GitHub
176 &quot;A String&quot;,
177 ],
178 },
179 ],
180 },
181 &quot;trustedDirectoryCheck&quot;: { # A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories. # Optional. Require that an image lives in a trusted directory.
182 &quot;trustedDirPatterns&quot;: [ # Required. List of trusted directory patterns. A pattern is in the form &quot;registry/path/to/directory&quot;. The registry domain part is defined as two or more dot-separated words, e.g., `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three ways as wildcards: 1. leading `*` to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing `*` after registry/ to match varying endings; 3. trailing `**` after registry/ to match &quot;/&quot; as well. For example: -- `gcr.io/my-project/my-repo` is valid to match a single directory -- `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are valid to match varying prefixes -- `gcr.io/my-project/*` will match all direct directories in `my-project` -- `gcr.io/my-project/**` would match all directories in `my-project` -- `gcr.i*` is not allowed since the registry is not completely specified -- `sub*domain.gcr.io/nginx` is not valid because only leading `*` or trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not valid because leading `*` can only match subdomain -- `**-docker.pkg.dev` is not valid because one leading `*` is allowed, and that it cannot match `/`
183 &quot;A String&quot;,
184 ],
185 },
186 &quot;vulnerabilityCheck&quot;: { # An image vulnerability check, which rejects images that violate the configured vulnerability rules. # Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels.
187 &quot;allowedCves&quot;: [ # Optional. A list of specific CVEs to ignore even if the vulnerability level violates `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
188 &quot;A String&quot;,
189 ],
190 &quot;blockedCves&quot;: [ # Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
191 &quot;A String&quot;,
192 ],
193 &quot;containerAnalysisVulnerabilityProjects&quot;: [ # Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check. Maximum number of `container_analysis_vulnerability_projects` allowed in each `VulnerabilityCheck` is 10.
194 &quot;A String&quot;,
195 ],
196 &quot;maximumFixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix is currently available. This field is required and must be set.
197 &quot;maximumUnfixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix isn&#x27;t currently available. This field is required and must be set.
198 },
199 },
200 ],
201 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `CheckSet`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
202 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this `CheckSet`. If any of the patterns match the image being evaluated, no checks in the `CheckSet` will be evaluated.
203 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
204 &quot;A String&quot;,
205 ],
206 },
207 &quot;scope&quot;: { # A scope specifier for `CheckSet` objects. # Optional. The scope to which this `CheckSet` applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the `Scope` message documentation for details on scoping rules.
208 &quot;kubernetesNamespace&quot;: &quot;A String&quot;, # Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific `kubernetes_service_account` scope already matched.
209 &quot;kubernetesServiceAccount&quot;: &quot;A String&quot;, # Optional. Matches a single Kubernetes service account, e.g. `my-namespace:my-service-account`. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.
210 },
211 },
212 ],
213 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated.
214 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
215 &quot;A String&quot;,
216 ],
217 },
218 },
219 &quot;name&quot;: &quot;A String&quot;, # Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.
220 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the policy was last updated.
221 }
222
223 policyId: string, Required. The platform policy ID.
224 x__xgafv: string, V1 error format.
225 Allowed values
226 1 - v1 error format
227 2 - v2 error format
228
229 Returns:
230 An object of the form:
231
232 { # A Binary Authorization platform policy for deployments on various platforms.
233 &quot;description&quot;: &quot;A String&quot;, # Optional. A description comment about the policy.
234 &quot;etag&quot;: &quot;A String&quot;, # Optional. Used to prevent updating the policy when another request has updated it since it was retrieved.
235 &quot;gkePolicy&quot;: { # A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a `PlatformPolicy`. # Optional. GKE platform-specific policy.
236 &quot;checkSets&quot;: [ # Optional. The `CheckSet` objects to apply, scoped by namespace or namespace and service account. Exactly one `CheckSet` will be evaluated for a given Pod (unless the list is empty, in which case the behavior is &quot;always allow&quot;). If multiple `CheckSet` objects have scopes that match the namespace and service account of the Pod being evaluated, only the `CheckSet` with the MOST SPECIFIC scope will match. `CheckSet` objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a `CheckSet` with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one `CheckSet` matches a given Pod, the `CheckSet` that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a `CheckSet` with no scope set, i.e. a catchall to handle any situation not caught by the preceding `CheckSet` objects.
237 { # A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a `CheckSet` to return &quot;allowed&quot; for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to &quot;allowed&quot;.
238 &quot;checks&quot;: [ # Optional. The checks to apply. The ultimate result of evaluating the check set will be &quot;allow&quot; if and only if every check in `checks` evaluates to &quot;allow&quot;. If `checks` is empty, the default behavior is &quot;always allow&quot;.
239 { # A single check to perform against a Pod. Checks are grouped into `CheckSet` objects, which are defined by the top-level policy.
240 &quot;alwaysDeny&quot;: True or False, # Optional. A special-case check that always denies. Note that this still only applies when the scope of the `CheckSet` applies and the image isn&#x27;t exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to &quot;deny&quot;.
241 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
242 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated.
243 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
244 &quot;A String&quot;,
245 ],
246 },
247 &quot;imageFreshnessCheck&quot;: { # An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories. # Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time.
248 &quot;maxUploadAgeDays&quot;: 42, # Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero.
249 },
250 &quot;sigstoreSignatureCheck&quot;: { # A Sigstore signature check, which verifies the Sigstore signature associated with an image. # Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry.
251 &quot;sigstoreAuthorities&quot;: [ # Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.
252 { # A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.
253 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
254 &quot;publicKeySet&quot;: { # A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it. # Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature.
255 &quot;publicKeys&quot;: [ # Required. `public_keys` must have at least one entry.
256 { # A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.
257 &quot;publicKeyPem&quot;: &quot;A String&quot;, # The public key material in PEM format.
258 },
259 ],
260 },
261 },
262 ],
263 },
264 &quot;simpleSigningAttestationCheck&quot;: { # Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning. # Optional. Require a SimpleSigning-type attestation for every image in the deployment.
265 &quot;attestationAuthenticators&quot;: [ # Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification. Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an &quot;OR&quot; of the authenticator results. At least one authenticator is required.
266 { # An attestation authenticator that will be used to verify attestations. Typically this is just a set of public keys. Conceptually, an authenticator can be treated as always returning either &quot;authenticated&quot; or &quot;not authenticated&quot; when presented with a signed attestation (almost always assumed to be a [DSSE](https://github.com/secure-systems-lab/dsse) attestation). The details of how an authenticator makes this decision are specific to the type of &#x27;authenticator&#x27; that this message wraps.
267 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `AttestationAuthenticator`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
268 &quot;pkixPublicKeySet&quot;: { # A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a `PkixPublicKeySet` if any of the public keys verify it (i.e. it is an &quot;OR&quot; of the keys). # Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate).
269 &quot;pkixPublicKeys&quot;: [ # Required. `pkix_public_keys` must have at least one entry.
270 { # A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.
271 &quot;keyId&quot;: &quot;A String&quot;, # Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the `key_id` field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.
272 &quot;publicKeyPem&quot;: &quot;A String&quot;, # A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
273 &quot;signatureAlgorithm&quot;: &quot;A String&quot;, # The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in `public_key_pem` (i.e. this algorithm must match that of the public key).
274 },
275 ],
276 },
277 },
278 ],
279 &quot;containerAnalysisAttestationProjects&quot;: [ # Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. A project ID must be used, not a project number. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.
280 &quot;A String&quot;,
281 ],
282 },
283 &quot;slsaCheck&quot;: { # A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only. # Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory.
284 &quot;rules&quot;: [ # Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied.
285 { # Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.
286 &quot;attestationSource&quot;: { # Specifies the locations for fetching the provenance attestations. # Specifies where to fetch the provenances attestations generated by the builder (group).
287 &quot;containerAnalysisAttestationProjects&quot;: [ # The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.
288 &quot;A String&quot;,
289 ],
290 },
291 &quot;configBasedBuildRequired&quot;: True or False, # If true, require the image to be built from a top-level configuration. `trusted_source_repo_patterns` specifies the repositories containing this configuration.
292 &quot;customConstraints&quot;: &quot;A String&quot;, # Optional. A CEL expression for specifying custom constraints on the provenance payload. This can be used when users want to specify expectations on provenance fields that are not covered by the general check. For example, users can use this field to require that certain parameters should never be used during the build process.
293 &quot;trustedBuilder&quot;: &quot;A String&quot;, # Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don&#x27;t need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group).
294 &quot;trustedSourceRepoPatterns&quot;: [ # List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. `https://`). The patterns must not include schemes. For example, the pattern `source.cloud.google.com/my-project/my-repo-name` matches the following URLs: - `source.cloud.google.com/my-project/my-repo-name` - `git+ssh://source.cloud.google.com/my-project/my-repo-name` - `https://source.cloud.google.com/my-project/my-repo-name` A pattern matches a URL either exactly or with `*` wildcards. `*` can be used in only two ways: 1. trailing `*` after hosturi/ to match varying endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` and `**` can only be used as wildcards and can only occur at the end of the pattern after a `/`. (So it&#x27;s not possible to match a URL that contains literal `*`.) For example: - `github.com/my-project/my-repo` is valid to match a single repo - `github.com/my-project/*` will match all direct repos in `my-project` - `github.com/**` matches all repos in GitHub
295 &quot;A String&quot;,
296 ],
297 },
298 ],
299 },
300 &quot;trustedDirectoryCheck&quot;: { # A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories. # Optional. Require that an image lives in a trusted directory.
301 &quot;trustedDirPatterns&quot;: [ # Required. List of trusted directory patterns. A pattern is in the form &quot;registry/path/to/directory&quot;. The registry domain part is defined as two or more dot-separated words, e.g., `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three ways as wildcards: 1. leading `*` to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing `*` after registry/ to match varying endings; 3. trailing `**` after registry/ to match &quot;/&quot; as well. For example: -- `gcr.io/my-project/my-repo` is valid to match a single directory -- `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are valid to match varying prefixes -- `gcr.io/my-project/*` will match all direct directories in `my-project` -- `gcr.io/my-project/**` would match all directories in `my-project` -- `gcr.i*` is not allowed since the registry is not completely specified -- `sub*domain.gcr.io/nginx` is not valid because only leading `*` or trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not valid because leading `*` can only match subdomain -- `**-docker.pkg.dev` is not valid because one leading `*` is allowed, and that it cannot match `/`
302 &quot;A String&quot;,
303 ],
304 },
305 &quot;vulnerabilityCheck&quot;: { # An image vulnerability check, which rejects images that violate the configured vulnerability rules. # Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels.
306 &quot;allowedCves&quot;: [ # Optional. A list of specific CVEs to ignore even if the vulnerability level violates `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
307 &quot;A String&quot;,
308 ],
309 &quot;blockedCves&quot;: [ # Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
310 &quot;A String&quot;,
311 ],
312 &quot;containerAnalysisVulnerabilityProjects&quot;: [ # Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check. Maximum number of `container_analysis_vulnerability_projects` allowed in each `VulnerabilityCheck` is 10.
313 &quot;A String&quot;,
314 ],
315 &quot;maximumFixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix is currently available. This field is required and must be set.
316 &quot;maximumUnfixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix isn&#x27;t currently available. This field is required and must be set.
317 },
318 },
319 ],
320 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `CheckSet`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
321 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this `CheckSet`. If any of the patterns match the image being evaluated, no checks in the `CheckSet` will be evaluated.
322 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
323 &quot;A String&quot;,
324 ],
325 },
326 &quot;scope&quot;: { # A scope specifier for `CheckSet` objects. # Optional. The scope to which this `CheckSet` applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the `Scope` message documentation for details on scoping rules.
327 &quot;kubernetesNamespace&quot;: &quot;A String&quot;, # Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific `kubernetes_service_account` scope already matched.
328 &quot;kubernetesServiceAccount&quot;: &quot;A String&quot;, # Optional. Matches a single Kubernetes service account, e.g. `my-namespace:my-service-account`. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.
329 },
330 },
331 ],
332 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated.
333 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
334 &quot;A String&quot;,
335 ],
336 },
337 },
338 &quot;name&quot;: &quot;A String&quot;, # Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.
339 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the policy was last updated.
340 }</pre>
341 </div>
342
343 <div class="method">
344 <code class="details" id="delete">delete(name, etag=None, x__xgafv=None)</code>
345 <pre>Deletes a platform policy. Returns `NOT_FOUND` if the policy doesn&#x27;t exist.
346
347 Args:
348 name: string, Required. The name of the platform policy to delete, in the format `projects/*/platforms/*/policies/*`. (required)
349 etag: string, Optional. Used to prevent deleting the policy when another request has updated it since it was retrieved.
350 x__xgafv: string, V1 error format.
351 Allowed values
352 1 - v1 error format
353 2 - v2 error format
354
355 Returns:
356 An object of the form:
357
358 { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
359 }</pre>
360 </div>
361
362 <div class="method">
363 <code class="details" id="get">get(name, x__xgafv=None)</code>
364 <pre>Gets a platform policy. Returns `NOT_FOUND` if the policy doesn&#x27;t exist.
365
366 Args:
367 name: string, Required. The name of the platform policy to retrieve in the format `projects/*/platforms/*/policies/*`. (required)
368 x__xgafv: string, V1 error format.
369 Allowed values
370 1 - v1 error format
371 2 - v2 error format
372
373 Returns:
374 An object of the form:
375
376 { # A Binary Authorization platform policy for deployments on various platforms.
377 &quot;description&quot;: &quot;A String&quot;, # Optional. A description comment about the policy.
378 &quot;etag&quot;: &quot;A String&quot;, # Optional. Used to prevent updating the policy when another request has updated it since it was retrieved.
379 &quot;gkePolicy&quot;: { # A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a `PlatformPolicy`. # Optional. GKE platform-specific policy.
380 &quot;checkSets&quot;: [ # Optional. The `CheckSet` objects to apply, scoped by namespace or namespace and service account. Exactly one `CheckSet` will be evaluated for a given Pod (unless the list is empty, in which case the behavior is &quot;always allow&quot;). If multiple `CheckSet` objects have scopes that match the namespace and service account of the Pod being evaluated, only the `CheckSet` with the MOST SPECIFIC scope will match. `CheckSet` objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a `CheckSet` with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one `CheckSet` matches a given Pod, the `CheckSet` that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a `CheckSet` with no scope set, i.e. a catchall to handle any situation not caught by the preceding `CheckSet` objects.
381 { # A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a `CheckSet` to return &quot;allowed&quot; for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to &quot;allowed&quot;.
382 &quot;checks&quot;: [ # Optional. The checks to apply. The ultimate result of evaluating the check set will be &quot;allow&quot; if and only if every check in `checks` evaluates to &quot;allow&quot;. If `checks` is empty, the default behavior is &quot;always allow&quot;.
383 { # A single check to perform against a Pod. Checks are grouped into `CheckSet` objects, which are defined by the top-level policy.
384 &quot;alwaysDeny&quot;: True or False, # Optional. A special-case check that always denies. Note that this still only applies when the scope of the `CheckSet` applies and the image isn&#x27;t exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to &quot;deny&quot;.
385 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
386 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated.
387 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
388 &quot;A String&quot;,
389 ],
390 },
391 &quot;imageFreshnessCheck&quot;: { # An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories. # Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time.
392 &quot;maxUploadAgeDays&quot;: 42, # Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero.
393 },
394 &quot;sigstoreSignatureCheck&quot;: { # A Sigstore signature check, which verifies the Sigstore signature associated with an image. # Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry.
395 &quot;sigstoreAuthorities&quot;: [ # Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.
396 { # A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.
397 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
398 &quot;publicKeySet&quot;: { # A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it. # Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature.
399 &quot;publicKeys&quot;: [ # Required. `public_keys` must have at least one entry.
400 { # A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.
401 &quot;publicKeyPem&quot;: &quot;A String&quot;, # The public key material in PEM format.
402 },
403 ],
404 },
405 },
406 ],
407 },
408 &quot;simpleSigningAttestationCheck&quot;: { # Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning. # Optional. Require a SimpleSigning-type attestation for every image in the deployment.
409 &quot;attestationAuthenticators&quot;: [ # Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification. Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an &quot;OR&quot; of the authenticator results. At least one authenticator is required.
410 { # An attestation authenticator that will be used to verify attestations. Typically this is just a set of public keys. Conceptually, an authenticator can be treated as always returning either &quot;authenticated&quot; or &quot;not authenticated&quot; when presented with a signed attestation (almost always assumed to be a [DSSE](https://github.com/secure-systems-lab/dsse) attestation). The details of how an authenticator makes this decision are specific to the type of &#x27;authenticator&#x27; that this message wraps.
411 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `AttestationAuthenticator`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
412 &quot;pkixPublicKeySet&quot;: { # A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a `PkixPublicKeySet` if any of the public keys verify it (i.e. it is an &quot;OR&quot; of the keys). # Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate).
413 &quot;pkixPublicKeys&quot;: [ # Required. `pkix_public_keys` must have at least one entry.
414 { # A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.
415 &quot;keyId&quot;: &quot;A String&quot;, # Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the `key_id` field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.
416 &quot;publicKeyPem&quot;: &quot;A String&quot;, # A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
417 &quot;signatureAlgorithm&quot;: &quot;A String&quot;, # The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in `public_key_pem` (i.e. this algorithm must match that of the public key).
418 },
419 ],
420 },
421 },
422 ],
423 &quot;containerAnalysisAttestationProjects&quot;: [ # Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. A project ID must be used, not a project number. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.
424 &quot;A String&quot;,
425 ],
426 },
427 &quot;slsaCheck&quot;: { # A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only. # Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory.
428 &quot;rules&quot;: [ # Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied.
429 { # Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.
430 &quot;attestationSource&quot;: { # Specifies the locations for fetching the provenance attestations. # Specifies where to fetch the provenances attestations generated by the builder (group).
431 &quot;containerAnalysisAttestationProjects&quot;: [ # The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.
432 &quot;A String&quot;,
433 ],
434 },
435 &quot;configBasedBuildRequired&quot;: True or False, # If true, require the image to be built from a top-level configuration. `trusted_source_repo_patterns` specifies the repositories containing this configuration.
436 &quot;customConstraints&quot;: &quot;A String&quot;, # Optional. A CEL expression for specifying custom constraints on the provenance payload. This can be used when users want to specify expectations on provenance fields that are not covered by the general check. For example, users can use this field to require that certain parameters should never be used during the build process.
437 &quot;trustedBuilder&quot;: &quot;A String&quot;, # Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don&#x27;t need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group).
438 &quot;trustedSourceRepoPatterns&quot;: [ # List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. `https://`). The patterns must not include schemes. For example, the pattern `source.cloud.google.com/my-project/my-repo-name` matches the following URLs: - `source.cloud.google.com/my-project/my-repo-name` - `git+ssh://source.cloud.google.com/my-project/my-repo-name` - `https://source.cloud.google.com/my-project/my-repo-name` A pattern matches a URL either exactly or with `*` wildcards. `*` can be used in only two ways: 1. trailing `*` after hosturi/ to match varying endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` and `**` can only be used as wildcards and can only occur at the end of the pattern after a `/`. (So it&#x27;s not possible to match a URL that contains literal `*`.) For example: - `github.com/my-project/my-repo` is valid to match a single repo - `github.com/my-project/*` will match all direct repos in `my-project` - `github.com/**` matches all repos in GitHub
439 &quot;A String&quot;,
440 ],
441 },
442 ],
443 },
444 &quot;trustedDirectoryCheck&quot;: { # A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories. # Optional. Require that an image lives in a trusted directory.
445 &quot;trustedDirPatterns&quot;: [ # Required. List of trusted directory patterns. A pattern is in the form &quot;registry/path/to/directory&quot;. The registry domain part is defined as two or more dot-separated words, e.g., `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three ways as wildcards: 1. leading `*` to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing `*` after registry/ to match varying endings; 3. trailing `**` after registry/ to match &quot;/&quot; as well. For example: -- `gcr.io/my-project/my-repo` is valid to match a single directory -- `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are valid to match varying prefixes -- `gcr.io/my-project/*` will match all direct directories in `my-project` -- `gcr.io/my-project/**` would match all directories in `my-project` -- `gcr.i*` is not allowed since the registry is not completely specified -- `sub*domain.gcr.io/nginx` is not valid because only leading `*` or trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not valid because leading `*` can only match subdomain -- `**-docker.pkg.dev` is not valid because one leading `*` is allowed, and that it cannot match `/`
446 &quot;A String&quot;,
447 ],
448 },
449 &quot;vulnerabilityCheck&quot;: { # An image vulnerability check, which rejects images that violate the configured vulnerability rules. # Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels.
450 &quot;allowedCves&quot;: [ # Optional. A list of specific CVEs to ignore even if the vulnerability level violates `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
451 &quot;A String&quot;,
452 ],
453 &quot;blockedCves&quot;: [ # Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
454 &quot;A String&quot;,
455 ],
456 &quot;containerAnalysisVulnerabilityProjects&quot;: [ # Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check. Maximum number of `container_analysis_vulnerability_projects` allowed in each `VulnerabilityCheck` is 10.
457 &quot;A String&quot;,
458 ],
459 &quot;maximumFixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix is currently available. This field is required and must be set.
460 &quot;maximumUnfixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix isn&#x27;t currently available. This field is required and must be set.
461 },
462 },
463 ],
464 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `CheckSet`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
465 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this `CheckSet`. If any of the patterns match the image being evaluated, no checks in the `CheckSet` will be evaluated.
466 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
467 &quot;A String&quot;,
468 ],
469 },
470 &quot;scope&quot;: { # A scope specifier for `CheckSet` objects. # Optional. The scope to which this `CheckSet` applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the `Scope` message documentation for details on scoping rules.
471 &quot;kubernetesNamespace&quot;: &quot;A String&quot;, # Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific `kubernetes_service_account` scope already matched.
472 &quot;kubernetesServiceAccount&quot;: &quot;A String&quot;, # Optional. Matches a single Kubernetes service account, e.g. `my-namespace:my-service-account`. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.
473 },
474 },
475 ],
476 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated.
477 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
478 &quot;A String&quot;,
479 ],
480 },
481 },
482 &quot;name&quot;: &quot;A String&quot;, # Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.
483 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the policy was last updated.
484 }</pre>
485 </div>
486
487 <div class="method">
488 <code class="details" id="list">list(parent, pageSize=None, pageToken=None, x__xgafv=None)</code>
489 <pre>Lists platform policies owned by a project in the specified platform. Returns `INVALID_ARGUMENT` if the project or the platform doesn&#x27;t exist.
490
491 Args:
492 parent: string, Required. The resource name of the platform associated with the platform policies using the format `projects/*/platforms/*`. (required)
493 pageSize: integer, Requested page size. The server may return fewer results than requested. If unspecified, the server picks an appropriate default.
494 pageToken: string, A token identifying a page of results the server should return. Typically, this is the value of ListPlatformPoliciesResponse.next_page_token returned from the previous call to the `ListPlatformPolicies` method.
495 x__xgafv: string, V1 error format.
496 Allowed values
497 1 - v1 error format
498 2 - v2 error format
499
500 Returns:
501 An object of the form:
502
503 { # Response message for PlatformPolicyManagementService.ListPlatformPolicies.
504 &quot;nextPageToken&quot;: &quot;A String&quot;, # A token to retrieve the next page of results. Pass this value in the ListPlatformPoliciesRequest.page_token field in the subsequent call to the `ListPlatformPolicies` method to retrieve the next page of results.
505 &quot;platformPolicies&quot;: [ # The list of platform policies.
506 { # A Binary Authorization platform policy for deployments on various platforms.
507 &quot;description&quot;: &quot;A String&quot;, # Optional. A description comment about the policy.
508 &quot;etag&quot;: &quot;A String&quot;, # Optional. Used to prevent updating the policy when another request has updated it since it was retrieved.
509 &quot;gkePolicy&quot;: { # A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a `PlatformPolicy`. # Optional. GKE platform-specific policy.
510 &quot;checkSets&quot;: [ # Optional. The `CheckSet` objects to apply, scoped by namespace or namespace and service account. Exactly one `CheckSet` will be evaluated for a given Pod (unless the list is empty, in which case the behavior is &quot;always allow&quot;). If multiple `CheckSet` objects have scopes that match the namespace and service account of the Pod being evaluated, only the `CheckSet` with the MOST SPECIFIC scope will match. `CheckSet` objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a `CheckSet` with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one `CheckSet` matches a given Pod, the `CheckSet` that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a `CheckSet` with no scope set, i.e. a catchall to handle any situation not caught by the preceding `CheckSet` objects.
511 { # A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a `CheckSet` to return &quot;allowed&quot; for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to &quot;allowed&quot;.
512 &quot;checks&quot;: [ # Optional. The checks to apply. The ultimate result of evaluating the check set will be &quot;allow&quot; if and only if every check in `checks` evaluates to &quot;allow&quot;. If `checks` is empty, the default behavior is &quot;always allow&quot;.
513 { # A single check to perform against a Pod. Checks are grouped into `CheckSet` objects, which are defined by the top-level policy.
514 &quot;alwaysDeny&quot;: True or False, # Optional. A special-case check that always denies. Note that this still only applies when the scope of the `CheckSet` applies and the image isn&#x27;t exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to &quot;deny&quot;.
515 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
516 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated.
517 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
518 &quot;A String&quot;,
519 ],
520 },
521 &quot;imageFreshnessCheck&quot;: { # An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories. # Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time.
522 &quot;maxUploadAgeDays&quot;: 42, # Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero.
523 },
524 &quot;sigstoreSignatureCheck&quot;: { # A Sigstore signature check, which verifies the Sigstore signature associated with an image. # Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry.
525 &quot;sigstoreAuthorities&quot;: [ # Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.
526 { # A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.
527 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
528 &quot;publicKeySet&quot;: { # A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it. # Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature.
529 &quot;publicKeys&quot;: [ # Required. `public_keys` must have at least one entry.
530 { # A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.
531 &quot;publicKeyPem&quot;: &quot;A String&quot;, # The public key material in PEM format.
532 },
533 ],
534 },
535 },
536 ],
537 },
538 &quot;simpleSigningAttestationCheck&quot;: { # Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning. # Optional. Require a SimpleSigning-type attestation for every image in the deployment.
539 &quot;attestationAuthenticators&quot;: [ # Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification. Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an &quot;OR&quot; of the authenticator results. At least one authenticator is required.
540 { # An attestation authenticator that will be used to verify attestations. Typically this is just a set of public keys. Conceptually, an authenticator can be treated as always returning either &quot;authenticated&quot; or &quot;not authenticated&quot; when presented with a signed attestation (almost always assumed to be a [DSSE](https://github.com/secure-systems-lab/dsse) attestation). The details of how an authenticator makes this decision are specific to the type of &#x27;authenticator&#x27; that this message wraps.
541 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `AttestationAuthenticator`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
542 &quot;pkixPublicKeySet&quot;: { # A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a `PkixPublicKeySet` if any of the public keys verify it (i.e. it is an &quot;OR&quot; of the keys). # Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate).
543 &quot;pkixPublicKeys&quot;: [ # Required. `pkix_public_keys` must have at least one entry.
544 { # A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.
545 &quot;keyId&quot;: &quot;A String&quot;, # Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the `key_id` field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.
546 &quot;publicKeyPem&quot;: &quot;A String&quot;, # A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
547 &quot;signatureAlgorithm&quot;: &quot;A String&quot;, # The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in `public_key_pem` (i.e. this algorithm must match that of the public key).
548 },
549 ],
550 },
551 },
552 ],
553 &quot;containerAnalysisAttestationProjects&quot;: [ # Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. A project ID must be used, not a project number. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.
554 &quot;A String&quot;,
555 ],
556 },
557 &quot;slsaCheck&quot;: { # A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only. # Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory.
558 &quot;rules&quot;: [ # Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied.
559 { # Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.
560 &quot;attestationSource&quot;: { # Specifies the locations for fetching the provenance attestations. # Specifies where to fetch the provenances attestations generated by the builder (group).
561 &quot;containerAnalysisAttestationProjects&quot;: [ # The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.
562 &quot;A String&quot;,
563 ],
564 },
565 &quot;configBasedBuildRequired&quot;: True or False, # If true, require the image to be built from a top-level configuration. `trusted_source_repo_patterns` specifies the repositories containing this configuration.
566 &quot;customConstraints&quot;: &quot;A String&quot;, # Optional. A CEL expression for specifying custom constraints on the provenance payload. This can be used when users want to specify expectations on provenance fields that are not covered by the general check. For example, users can use this field to require that certain parameters should never be used during the build process.
567 &quot;trustedBuilder&quot;: &quot;A String&quot;, # Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don&#x27;t need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group).
568 &quot;trustedSourceRepoPatterns&quot;: [ # List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. `https://`). The patterns must not include schemes. For example, the pattern `source.cloud.google.com/my-project/my-repo-name` matches the following URLs: - `source.cloud.google.com/my-project/my-repo-name` - `git+ssh://source.cloud.google.com/my-project/my-repo-name` - `https://source.cloud.google.com/my-project/my-repo-name` A pattern matches a URL either exactly or with `*` wildcards. `*` can be used in only two ways: 1. trailing `*` after hosturi/ to match varying endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` and `**` can only be used as wildcards and can only occur at the end of the pattern after a `/`. (So it&#x27;s not possible to match a URL that contains literal `*`.) For example: - `github.com/my-project/my-repo` is valid to match a single repo - `github.com/my-project/*` will match all direct repos in `my-project` - `github.com/**` matches all repos in GitHub
569 &quot;A String&quot;,
570 ],
571 },
572 ],
573 },
574 &quot;trustedDirectoryCheck&quot;: { # A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories. # Optional. Require that an image lives in a trusted directory.
575 &quot;trustedDirPatterns&quot;: [ # Required. List of trusted directory patterns. A pattern is in the form &quot;registry/path/to/directory&quot;. The registry domain part is defined as two or more dot-separated words, e.g., `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three ways as wildcards: 1. leading `*` to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing `*` after registry/ to match varying endings; 3. trailing `**` after registry/ to match &quot;/&quot; as well. For example: -- `gcr.io/my-project/my-repo` is valid to match a single directory -- `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are valid to match varying prefixes -- `gcr.io/my-project/*` will match all direct directories in `my-project` -- `gcr.io/my-project/**` would match all directories in `my-project` -- `gcr.i*` is not allowed since the registry is not completely specified -- `sub*domain.gcr.io/nginx` is not valid because only leading `*` or trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not valid because leading `*` can only match subdomain -- `**-docker.pkg.dev` is not valid because one leading `*` is allowed, and that it cannot match `/`
576 &quot;A String&quot;,
577 ],
578 },
579 &quot;vulnerabilityCheck&quot;: { # An image vulnerability check, which rejects images that violate the configured vulnerability rules. # Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels.
580 &quot;allowedCves&quot;: [ # Optional. A list of specific CVEs to ignore even if the vulnerability level violates `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
581 &quot;A String&quot;,
582 ],
583 &quot;blockedCves&quot;: [ # Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
584 &quot;A String&quot;,
585 ],
586 &quot;containerAnalysisVulnerabilityProjects&quot;: [ # Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check. Maximum number of `container_analysis_vulnerability_projects` allowed in each `VulnerabilityCheck` is 10.
587 &quot;A String&quot;,
588 ],
589 &quot;maximumFixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix is currently available. This field is required and must be set.
590 &quot;maximumUnfixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix isn&#x27;t currently available. This field is required and must be set.
591 },
592 },
593 ],
594 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `CheckSet`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
595 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this `CheckSet`. If any of the patterns match the image being evaluated, no checks in the `CheckSet` will be evaluated.
596 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
597 &quot;A String&quot;,
598 ],
599 },
600 &quot;scope&quot;: { # A scope specifier for `CheckSet` objects. # Optional. The scope to which this `CheckSet` applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the `Scope` message documentation for details on scoping rules.
601 &quot;kubernetesNamespace&quot;: &quot;A String&quot;, # Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific `kubernetes_service_account` scope already matched.
602 &quot;kubernetesServiceAccount&quot;: &quot;A String&quot;, # Optional. Matches a single Kubernetes service account, e.g. `my-namespace:my-service-account`. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.
603 },
604 },
605 ],
606 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated.
607 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
608 &quot;A String&quot;,
609 ],
610 },
611 },
612 &quot;name&quot;: &quot;A String&quot;, # Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.
613 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the policy was last updated.
614 },
615 ],
616 }</pre>
617 </div>
618
619 <div class="method">
620 <code class="details" id="list_next">list_next()</code>
621 <pre>Retrieves the next page of results.
622
623 Args:
624 previous_request: The request for the previous page. (required)
625 previous_response: The response from the request for the previous page. (required)
626
627 Returns:
628 A request object that you can call &#x27;execute()&#x27; on to request the next
629 page. Returns None if there are no more items in the collection.
630 </pre>
631 </div>
632
633 <div class="method">
634 <code class="details" id="replacePlatformPolicy">replacePlatformPolicy(name, body=None, x__xgafv=None)</code>
635 <pre>Replaces a platform policy. Returns `NOT_FOUND` if the policy doesn&#x27;t exist.
636
637 Args:
638 name: string, Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`. (required)
639 body: object, The request body.
640 The object takes the form of:
641
642 { # A Binary Authorization platform policy for deployments on various platforms.
643 &quot;description&quot;: &quot;A String&quot;, # Optional. A description comment about the policy.
644 &quot;etag&quot;: &quot;A String&quot;, # Optional. Used to prevent updating the policy when another request has updated it since it was retrieved.
645 &quot;gkePolicy&quot;: { # A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a `PlatformPolicy`. # Optional. GKE platform-specific policy.
646 &quot;checkSets&quot;: [ # Optional. The `CheckSet` objects to apply, scoped by namespace or namespace and service account. Exactly one `CheckSet` will be evaluated for a given Pod (unless the list is empty, in which case the behavior is &quot;always allow&quot;). If multiple `CheckSet` objects have scopes that match the namespace and service account of the Pod being evaluated, only the `CheckSet` with the MOST SPECIFIC scope will match. `CheckSet` objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a `CheckSet` with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one `CheckSet` matches a given Pod, the `CheckSet` that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a `CheckSet` with no scope set, i.e. a catchall to handle any situation not caught by the preceding `CheckSet` objects.
647 { # A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a `CheckSet` to return &quot;allowed&quot; for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to &quot;allowed&quot;.
648 &quot;checks&quot;: [ # Optional. The checks to apply. The ultimate result of evaluating the check set will be &quot;allow&quot; if and only if every check in `checks` evaluates to &quot;allow&quot;. If `checks` is empty, the default behavior is &quot;always allow&quot;.
649 { # A single check to perform against a Pod. Checks are grouped into `CheckSet` objects, which are defined by the top-level policy.
650 &quot;alwaysDeny&quot;: True or False, # Optional. A special-case check that always denies. Note that this still only applies when the scope of the `CheckSet` applies and the image isn&#x27;t exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to &quot;deny&quot;.
651 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
652 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated.
653 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
654 &quot;A String&quot;,
655 ],
656 },
657 &quot;imageFreshnessCheck&quot;: { # An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories. # Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time.
658 &quot;maxUploadAgeDays&quot;: 42, # Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero.
659 },
660 &quot;sigstoreSignatureCheck&quot;: { # A Sigstore signature check, which verifies the Sigstore signature associated with an image. # Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry.
661 &quot;sigstoreAuthorities&quot;: [ # Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.
662 { # A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.
663 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
664 &quot;publicKeySet&quot;: { # A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it. # Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature.
665 &quot;publicKeys&quot;: [ # Required. `public_keys` must have at least one entry.
666 { # A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.
667 &quot;publicKeyPem&quot;: &quot;A String&quot;, # The public key material in PEM format.
668 },
669 ],
670 },
671 },
672 ],
673 },
674 &quot;simpleSigningAttestationCheck&quot;: { # Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning. # Optional. Require a SimpleSigning-type attestation for every image in the deployment.
675 &quot;attestationAuthenticators&quot;: [ # Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification. Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an &quot;OR&quot; of the authenticator results. At least one authenticator is required.
676 { # An attestation authenticator that will be used to verify attestations. Typically this is just a set of public keys. Conceptually, an authenticator can be treated as always returning either &quot;authenticated&quot; or &quot;not authenticated&quot; when presented with a signed attestation (almost always assumed to be a [DSSE](https://github.com/secure-systems-lab/dsse) attestation). The details of how an authenticator makes this decision are specific to the type of &#x27;authenticator&#x27; that this message wraps.
677 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `AttestationAuthenticator`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
678 &quot;pkixPublicKeySet&quot;: { # A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a `PkixPublicKeySet` if any of the public keys verify it (i.e. it is an &quot;OR&quot; of the keys). # Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate).
679 &quot;pkixPublicKeys&quot;: [ # Required. `pkix_public_keys` must have at least one entry.
680 { # A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.
681 &quot;keyId&quot;: &quot;A String&quot;, # Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the `key_id` field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.
682 &quot;publicKeyPem&quot;: &quot;A String&quot;, # A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
683 &quot;signatureAlgorithm&quot;: &quot;A String&quot;, # The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in `public_key_pem` (i.e. this algorithm must match that of the public key).
684 },
685 ],
686 },
687 },
688 ],
689 &quot;containerAnalysisAttestationProjects&quot;: [ # Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. A project ID must be used, not a project number. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.
690 &quot;A String&quot;,
691 ],
692 },
693 &quot;slsaCheck&quot;: { # A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only. # Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory.
694 &quot;rules&quot;: [ # Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied.
695 { # Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.
696 &quot;attestationSource&quot;: { # Specifies the locations for fetching the provenance attestations. # Specifies where to fetch the provenances attestations generated by the builder (group).
697 &quot;containerAnalysisAttestationProjects&quot;: [ # The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.
698 &quot;A String&quot;,
699 ],
700 },
701 &quot;configBasedBuildRequired&quot;: True or False, # If true, require the image to be built from a top-level configuration. `trusted_source_repo_patterns` specifies the repositories containing this configuration.
702 &quot;customConstraints&quot;: &quot;A String&quot;, # Optional. A CEL expression for specifying custom constraints on the provenance payload. This can be used when users want to specify expectations on provenance fields that are not covered by the general check. For example, users can use this field to require that certain parameters should never be used during the build process.
703 &quot;trustedBuilder&quot;: &quot;A String&quot;, # Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don&#x27;t need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group).
704 &quot;trustedSourceRepoPatterns&quot;: [ # List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. `https://`). The patterns must not include schemes. For example, the pattern `source.cloud.google.com/my-project/my-repo-name` matches the following URLs: - `source.cloud.google.com/my-project/my-repo-name` - `git+ssh://source.cloud.google.com/my-project/my-repo-name` - `https://source.cloud.google.com/my-project/my-repo-name` A pattern matches a URL either exactly or with `*` wildcards. `*` can be used in only two ways: 1. trailing `*` after hosturi/ to match varying endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` and `**` can only be used as wildcards and can only occur at the end of the pattern after a `/`. (So it&#x27;s not possible to match a URL that contains literal `*`.) For example: - `github.com/my-project/my-repo` is valid to match a single repo - `github.com/my-project/*` will match all direct repos in `my-project` - `github.com/**` matches all repos in GitHub
705 &quot;A String&quot;,
706 ],
707 },
708 ],
709 },
710 &quot;trustedDirectoryCheck&quot;: { # A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories. # Optional. Require that an image lives in a trusted directory.
711 &quot;trustedDirPatterns&quot;: [ # Required. List of trusted directory patterns. A pattern is in the form &quot;registry/path/to/directory&quot;. The registry domain part is defined as two or more dot-separated words, e.g., `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three ways as wildcards: 1. leading `*` to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing `*` after registry/ to match varying endings; 3. trailing `**` after registry/ to match &quot;/&quot; as well. For example: -- `gcr.io/my-project/my-repo` is valid to match a single directory -- `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are valid to match varying prefixes -- `gcr.io/my-project/*` will match all direct directories in `my-project` -- `gcr.io/my-project/**` would match all directories in `my-project` -- `gcr.i*` is not allowed since the registry is not completely specified -- `sub*domain.gcr.io/nginx` is not valid because only leading `*` or trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not valid because leading `*` can only match subdomain -- `**-docker.pkg.dev` is not valid because one leading `*` is allowed, and that it cannot match `/`
712 &quot;A String&quot;,
713 ],
714 },
715 &quot;vulnerabilityCheck&quot;: { # An image vulnerability check, which rejects images that violate the configured vulnerability rules. # Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels.
716 &quot;allowedCves&quot;: [ # Optional. A list of specific CVEs to ignore even if the vulnerability level violates `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
717 &quot;A String&quot;,
718 ],
719 &quot;blockedCves&quot;: [ # Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
720 &quot;A String&quot;,
721 ],
722 &quot;containerAnalysisVulnerabilityProjects&quot;: [ # Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check. Maximum number of `container_analysis_vulnerability_projects` allowed in each `VulnerabilityCheck` is 10.
723 &quot;A String&quot;,
724 ],
725 &quot;maximumFixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix is currently available. This field is required and must be set.
726 &quot;maximumUnfixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix isn&#x27;t currently available. This field is required and must be set.
727 },
728 },
729 ],
730 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `CheckSet`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
731 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this `CheckSet`. If any of the patterns match the image being evaluated, no checks in the `CheckSet` will be evaluated.
732 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
733 &quot;A String&quot;,
734 ],
735 },
736 &quot;scope&quot;: { # A scope specifier for `CheckSet` objects. # Optional. The scope to which this `CheckSet` applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the `Scope` message documentation for details on scoping rules.
737 &quot;kubernetesNamespace&quot;: &quot;A String&quot;, # Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific `kubernetes_service_account` scope already matched.
738 &quot;kubernetesServiceAccount&quot;: &quot;A String&quot;, # Optional. Matches a single Kubernetes service account, e.g. `my-namespace:my-service-account`. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.
739 },
740 },
741 ],
742 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated.
743 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
744 &quot;A String&quot;,
745 ],
746 },
747 },
748 &quot;name&quot;: &quot;A String&quot;, # Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.
749 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the policy was last updated.
750 }
751
752 x__xgafv: string, V1 error format.
753 Allowed values
754 1 - v1 error format
755 2 - v2 error format
756
757 Returns:
758 An object of the form:
759
760 { # A Binary Authorization platform policy for deployments on various platforms.
761 &quot;description&quot;: &quot;A String&quot;, # Optional. A description comment about the policy.
762 &quot;etag&quot;: &quot;A String&quot;, # Optional. Used to prevent updating the policy when another request has updated it since it was retrieved.
763 &quot;gkePolicy&quot;: { # A Binary Authorization policy for a GKE cluster. This is one type of policy that can occur as a `PlatformPolicy`. # Optional. GKE platform-specific policy.
764 &quot;checkSets&quot;: [ # Optional. The `CheckSet` objects to apply, scoped by namespace or namespace and service account. Exactly one `CheckSet` will be evaluated for a given Pod (unless the list is empty, in which case the behavior is &quot;always allow&quot;). If multiple `CheckSet` objects have scopes that match the namespace and service account of the Pod being evaluated, only the `CheckSet` with the MOST SPECIFIC scope will match. `CheckSet` objects must be listed in order of decreasing specificity, i.e. if a scope matches a given service account (which must include the namespace), it must come before a `CheckSet` with a scope matching just that namespace. This property is enforced by server-side validation. The purpose of this restriction is to ensure that if more than one `CheckSet` matches a given Pod, the `CheckSet` that will be evaluated will always be the first in the list to match (because if any other matches, it must be less specific). If `check_sets` is empty, the default behavior is to allow all images. If `check_sets` is non-empty, the last `check_sets` entry must always be a `CheckSet` with no scope set, i.e. a catchall to handle any situation not caught by the preceding `CheckSet` objects.
765 { # A conjunction of policy checks, scoped to a particular namespace or Kubernetes service account. In order for evaluation of a `CheckSet` to return &quot;allowed&quot; for a given image in a given Pod, one of the following conditions must be satisfied: * The image is explicitly exempted by an entry in `image_allowlist`, OR * ALL of the `checks` evaluate to &quot;allowed&quot;.
766 &quot;checks&quot;: [ # Optional. The checks to apply. The ultimate result of evaluating the check set will be &quot;allow&quot; if and only if every check in `checks` evaluates to &quot;allow&quot;. If `checks` is empty, the default behavior is &quot;always allow&quot;.
767 { # A single check to perform against a Pod. Checks are grouped into `CheckSet` objects, which are defined by the top-level policy.
768 &quot;alwaysDeny&quot;: True or False, # Optional. A special-case check that always denies. Note that this still only applies when the scope of the `CheckSet` applies and the image isn&#x27;t exempted by an image allowlist. This check is primarily useful for testing, or to set the default behavior for all unmatched scopes to &quot;deny&quot;.
769 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this check. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
770 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this check. If any of the patterns match the image url, the check will not be evaluated.
771 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
772 &quot;A String&quot;,
773 ],
774 },
775 &quot;imageFreshnessCheck&quot;: { # An image freshness check, which rejects images that were uploaded before the set number of days ago to the supported repositories. # Optional. Require that an image is no older than a configured expiration time. Image age is determined by its upload time.
776 &quot;maxUploadAgeDays&quot;: 42, # Required. The max number of days that is allowed since the image was uploaded. Must be greater than zero.
777 },
778 &quot;sigstoreSignatureCheck&quot;: { # A Sigstore signature check, which verifies the Sigstore signature associated with an image. # Optional. Require that an image was signed by Cosign with a trusted key. This check requires that both the image and signature are stored in Artifact Registry.
779 &quot;sigstoreAuthorities&quot;: [ # Required. The authorities required by this check to verify the signature. A signature only needs to be verified by one authority to pass the check.
780 { # A Sigstore authority, used to verify signatures that are created by Sigstore. An authority is analogous to an attestation authenticator, verifying that a signature is valid or invalid.
781 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `SigstoreAuthority`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
782 &quot;publicKeySet&quot;: { # A bundle of Sigstore public keys, used to verify Sigstore signatures. A signature is authenticated by a `SigstorePublicKeySet` if any of the keys verify it. # Required. A simple set of public keys. A signature is considered valid if any keys in the set validate the signature.
783 &quot;publicKeys&quot;: [ # Required. `public_keys` must have at least one entry.
784 { # A Sigstore public key. `SigstorePublicKey` is the public key material used to authenticate Sigstore signatures.
785 &quot;publicKeyPem&quot;: &quot;A String&quot;, # The public key material in PEM format.
786 },
787 ],
788 },
789 },
790 ],
791 },
792 &quot;simpleSigningAttestationCheck&quot;: { # Require a signed [DSSE](https://github.com/secure-systems-lab/dsse) attestation with type SimpleSigning. # Optional. Require a SimpleSigning-type attestation for every image in the deployment.
793 &quot;attestationAuthenticators&quot;: [ # Required. The authenticators required by this check to verify an attestation. Typically this is one or more PKIX public keys for signature verification. Only one authenticator needs to consider an attestation verified in order for an attestation to be considered fully authenticated. In otherwords, this list of authenticators is an &quot;OR&quot; of the authenticator results. At least one authenticator is required.
794 { # An attestation authenticator that will be used to verify attestations. Typically this is just a set of public keys. Conceptually, an authenticator can be treated as always returning either &quot;authenticated&quot; or &quot;not authenticated&quot; when presented with a signed attestation (almost always assumed to be a [DSSE](https://github.com/secure-systems-lab/dsse) attestation). The details of how an authenticator makes this decision are specific to the type of &#x27;authenticator&#x27; that this message wraps.
795 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `AttestationAuthenticator`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
796 &quot;pkixPublicKeySet&quot;: { # A bundle of PKIX public keys, used to authenticate attestation signatures. Generally, a signature is considered to be authenticated by a `PkixPublicKeySet` if any of the public keys verify it (i.e. it is an &quot;OR&quot; of the keys). # Optional. A set of raw PKIX SubjectPublicKeyInfo format public keys. If any public key in the set validates the attestation signature, then the signature is considered authenticated (i.e. any one key is sufficient to authenticate).
797 &quot;pkixPublicKeys&quot;: [ # Required. `pkix_public_keys` must have at least one entry.
798 { # A public key in the PkixPublicKey [format](https://tools.ietf.org/html/rfc5280#section-4.1.2.7). Public keys of this type are typically textually encoded using the PEM format.
799 &quot;keyId&quot;: &quot;A String&quot;, # Optional. The ID of this public key. Signatures verified by Binary Authorization must include the ID of the public key that can be used to verify them. The ID must match exactly contents of the `key_id` field exactly. The ID may be explicitly provided by the caller, but it MUST be a valid RFC3986 URI. If `key_id` is left blank and this `PkixPublicKey` is not used in the context of a wrapper (see next paragraph), a default key ID will be computed based on the digest of the DER encoding of the public key. If this `PkixPublicKey` is used in the context of a wrapper that has its own notion of key ID (e.g. `AttestorPublicKey`), then this field can either match that value exactly, or be left blank, in which case it behaves exactly as though it is equal to that wrapper value.
800 &quot;publicKeyPem&quot;: &quot;A String&quot;, # A PEM-encoded public key, as described in https://tools.ietf.org/html/rfc7468#section-13
801 &quot;signatureAlgorithm&quot;: &quot;A String&quot;, # The signature algorithm used to verify a message against a signature using this key. These signature algorithm must match the structure and any object identifiers encoded in `public_key_pem` (i.e. this algorithm must match that of the public key).
802 },
803 ],
804 },
805 },
806 ],
807 &quot;containerAnalysisAttestationProjects&quot;: [ # Optional. The projects where attestations are stored as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Only one attestation needs to successfully verify an image for this check to pass, so a single verified attestation found in any of `container_analysis_attestation_projects` is sufficient for the check to pass. A project ID must be used, not a project number. When fetching Occurrences from Container Analysis, only `AttestationOccurrence` kinds are considered. In the future, additional Occurrence kinds may be added to the query. Maximum number of `container_analysis_attestation_projects` allowed in each `SimpleSigningAttestationCheck` is 10.
808 &quot;A String&quot;,
809 ],
810 },
811 &quot;slsaCheck&quot;: { # A SLSA provenance attestation check, which ensures that images are built by a trusted builder using source code from its trusted repositories only. # Optional. Require that an image was built by a trusted builder (such as Google Cloud Build), meets requirements for Supply chain Levels for Software Artifacts (SLSA), and was built from a trusted source code repostitory.
812 &quot;rules&quot;: [ # Specifies a list of verification rules for the SLSA attestations. An image is considered compliant with the SlsaCheck if any of the rules are satisfied.
813 { # Specifies verification rules for evaluating the SLSA attestations including: which builders to trust, where to fetch the SLSA attestations generated by those builders, and other builder-specific evaluation rules such as which source repositories are trusted. An image is considered verified by the rule if any of the fetched SLSA attestations is verified.
814 &quot;attestationSource&quot;: { # Specifies the locations for fetching the provenance attestations. # Specifies where to fetch the provenances attestations generated by the builder (group).
815 &quot;containerAnalysisAttestationProjects&quot;: [ # The IDs of the Google Cloud projects that store the SLSA attestations as Container Analysis Occurrences, in the format `projects/[PROJECT_ID]`. Maximum number of `container_analysis_attestation_projects` allowed in each `AttestationSource` is 10.
816 &quot;A String&quot;,
817 ],
818 },
819 &quot;configBasedBuildRequired&quot;: True or False, # If true, require the image to be built from a top-level configuration. `trusted_source_repo_patterns` specifies the repositories containing this configuration.
820 &quot;customConstraints&quot;: &quot;A String&quot;, # Optional. A CEL expression for specifying custom constraints on the provenance payload. This can be used when users want to specify expectations on provenance fields that are not covered by the general check. For example, users can use this field to require that certain parameters should never be used during the build process.
821 &quot;trustedBuilder&quot;: &quot;A String&quot;, # Each verification rule is used for evaluation against provenances generated by a specific builder (group). For some of the builders, such as the Google Cloud Build, users don&#x27;t need to explicitly specify their roots of trust in the policy since the evaluation service can automatically fetch them based on the builder (group).
822 &quot;trustedSourceRepoPatterns&quot;: [ # List of trusted source code repository URL patterns. These patterns match the full repository URL without its scheme (e.g. `https://`). The patterns must not include schemes. For example, the pattern `source.cloud.google.com/my-project/my-repo-name` matches the following URLs: - `source.cloud.google.com/my-project/my-repo-name` - `git+ssh://source.cloud.google.com/my-project/my-repo-name` - `https://source.cloud.google.com/my-project/my-repo-name` A pattern matches a URL either exactly or with `*` wildcards. `*` can be used in only two ways: 1. trailing `*` after hosturi/ to match varying endings; 2. trailing `**` after hosturi/ to match `/` as well. `*` and `**` can only be used as wildcards and can only occur at the end of the pattern after a `/`. (So it&#x27;s not possible to match a URL that contains literal `*`.) For example: - `github.com/my-project/my-repo` is valid to match a single repo - `github.com/my-project/*` will match all direct repos in `my-project` - `github.com/**` matches all repos in GitHub
823 &quot;A String&quot;,
824 ],
825 },
826 ],
827 },
828 &quot;trustedDirectoryCheck&quot;: { # A trusted directory check, which rejects images that do not come from the set of user-configured trusted directories. # Optional. Require that an image lives in a trusted directory.
829 &quot;trustedDirPatterns&quot;: [ # Required. List of trusted directory patterns. A pattern is in the form &quot;registry/path/to/directory&quot;. The registry domain part is defined as two or more dot-separated words, e.g., `us.pkg.dev`, or `gcr.io`. Additionally, `*` can be used in three ways as wildcards: 1. leading `*` to match varying prefixes in registry subdomain (useful for location prefixes); 2. trailing `*` after registry/ to match varying endings; 3. trailing `**` after registry/ to match &quot;/&quot; as well. For example: -- `gcr.io/my-project/my-repo` is valid to match a single directory -- `*-docker.pkg.dev/my-project/my-repo` or `*.gcr.io/my-project` are valid to match varying prefixes -- `gcr.io/my-project/*` will match all direct directories in `my-project` -- `gcr.io/my-project/**` would match all directories in `my-project` -- `gcr.i*` is not allowed since the registry is not completely specified -- `sub*domain.gcr.io/nginx` is not valid because only leading `*` or trailing `*` are allowed. -- `*pkg.dev/my-project/my-repo` is not valid because leading `*` can only match subdomain -- `**-docker.pkg.dev` is not valid because one leading `*` is allowed, and that it cannot match `/`
830 &quot;A String&quot;,
831 ],
832 },
833 &quot;vulnerabilityCheck&quot;: { # An image vulnerability check, which rejects images that violate the configured vulnerability rules. # Optional. Require that an image does not contain vulnerabilities that violate the configured rules, such as based on severity levels.
834 &quot;allowedCves&quot;: [ # Optional. A list of specific CVEs to ignore even if the vulnerability level violates `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will allow vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
835 &quot;A String&quot;,
836 ],
837 &quot;blockedCves&quot;: [ # Optional. A list of specific CVEs to always raise warnings about even if the vulnerability level meets `maximumUnfixableSeverity` or `maximumFixableSeverity`. CVEs are listed in the format of Container Analysis note id. For example: - CVE-2021-20305 - CVE-2020-10543 The CVEs are applicable regardless of note provider project, e.g., an entry of `CVE-2021-20305` will block vulnerabilities with a note name of either `projects/goog-vulnz/notes/CVE-2021-20305` or `projects/CUSTOM-PROJECT/notes/CVE-2021-20305`.
838 &quot;A String&quot;,
839 ],
840 &quot;containerAnalysisVulnerabilityProjects&quot;: [ # Optional. The projects where vulnerabilities are stored as Container Analysis Occurrences. Each project is expressed in the resource format of `projects/[PROJECT_ID]`, e.g., `projects/my-gcp-project`. An attempt will be made for each project to fetch vulnerabilities, and all valid vulnerabilities will be used to check against the vulnerability policy. If no valid scan is found in all projects configured here, an error will be returned for the check. Maximum number of `container_analysis_vulnerability_projects` allowed in each `VulnerabilityCheck` is 10.
841 &quot;A String&quot;,
842 ],
843 &quot;maximumFixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix is currently available. This field is required and must be set.
844 &quot;maximumUnfixableSeverity&quot;: &quot;A String&quot;, # Required. The threshold for severity for which a fix isn&#x27;t currently available. This field is required and must be set.
845 },
846 },
847 ],
848 &quot;displayName&quot;: &quot;A String&quot;, # Optional. A user-provided name for this `CheckSet`. This field has no effect on the policy evaluation behavior except to improve readability of messages in evaluation results.
849 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this `CheckSet`. If any of the patterns match the image being evaluated, no checks in the `CheckSet` will be evaluated.
850 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
851 &quot;A String&quot;,
852 ],
853 },
854 &quot;scope&quot;: { # A scope specifier for `CheckSet` objects. # Optional. The scope to which this `CheckSet` applies. If unset or an empty string (the default), applies to all namespaces and service accounts. See the `Scope` message documentation for details on scoping rules.
855 &quot;kubernetesNamespace&quot;: &quot;A String&quot;, # Optional. Matches all Kubernetes service accounts in the provided namespace, unless a more specific `kubernetes_service_account` scope already matched.
856 &quot;kubernetesServiceAccount&quot;: &quot;A String&quot;, # Optional. Matches a single Kubernetes service account, e.g. `my-namespace:my-service-account`. `kubernetes_service_account` scope is always more specific than `kubernetes_namespace` scope for the same namespace.
857 },
858 },
859 ],
860 &quot;imageAllowlist&quot;: { # Images that are exempted from normal checks based on name pattern only. # Optional. Images exempted from this policy. If any of the patterns match the image being evaluated, the rest of the policy will not be evaluated.
861 &quot;allowPattern&quot;: [ # Required. A disjunction of image patterns to allow. If any of these patterns match, then the image is considered exempted by this allowlist.
862 &quot;A String&quot;,
863 ],
864 },
865 },
866 &quot;name&quot;: &quot;A String&quot;, # Output only. The relative resource name of the Binary Authorization platform policy, in the form of `projects/*/platforms/*/policies/*`.
867 &quot;updateTime&quot;: &quot;A String&quot;, # Output only. Time when the policy was last updated.
868 }</pre>
869 </div>
870
871 </body></html>