@maxim_mazurok/gapi.client.containeranalysis-v1beta1 0.0.20220805
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +2454 -0
- package/package.json +20 -0
- package/readme.md +68 -0
- package/tests.ts +2182 -0
- package/tsconfig.json +18 -0
- package/tslint.json +6 -0
package/tests.ts
ADDED
|
@@ -0,0 +1,2182 @@
|
|
|
1
|
+
/* This is stub file for gapi.client.containeranalysis-v1beta1 definition tests */
|
|
2
|
+
// IMPORTANT
|
|
3
|
+
// This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
|
|
4
|
+
// In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
|
|
5
|
+
|
|
6
|
+
// Revision: 20220805
|
|
7
|
+
|
|
8
|
+
gapi.load('client', async () => {
|
|
9
|
+
/** now we can use gapi.client */
|
|
10
|
+
|
|
11
|
+
await gapi.client.load('https://containeranalysis.googleapis.com/$discovery/rest?version=v1beta1');
|
|
12
|
+
/** now we can use gapi.client.containeranalysis */
|
|
13
|
+
|
|
14
|
+
/** don't forget to authenticate your client before sending any request to resources: */
|
|
15
|
+
/** declare client_id registered in Google Developers Console */
|
|
16
|
+
const client_id = '<<PUT YOUR CLIENT ID HERE>>';
|
|
17
|
+
const scope = [
|
|
18
|
+
/** See, edit, configure, and delete your Google Cloud data and see the email address for your Google Account. */
|
|
19
|
+
'https://www.googleapis.com/auth/cloud-platform',
|
|
20
|
+
];
|
|
21
|
+
const immediate = false;
|
|
22
|
+
gapi.auth.authorize({ client_id, scope, immediate }, authResult => {
|
|
23
|
+
if (authResult && !authResult.error) {
|
|
24
|
+
/** handle successful authorization */
|
|
25
|
+
run();
|
|
26
|
+
} else {
|
|
27
|
+
/** handle authorization error */
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
async function run() {
|
|
32
|
+
/** Creates new notes in batch. */
|
|
33
|
+
await gapi.client.containeranalysis.projects.notes.batchCreate({
|
|
34
|
+
parent: "Test string",
|
|
35
|
+
}, {
|
|
36
|
+
notes: {
|
|
37
|
+
A: {
|
|
38
|
+
attestationAuthority: {
|
|
39
|
+
hint: {
|
|
40
|
+
humanReadableName: "Test string",
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
baseImage: {
|
|
44
|
+
fingerprint: {
|
|
45
|
+
v1Name: "Test string",
|
|
46
|
+
v2Blob: [
|
|
47
|
+
"Test string"
|
|
48
|
+
],
|
|
49
|
+
v2Name: "Test string",
|
|
50
|
+
},
|
|
51
|
+
resourceUrl: "Test string",
|
|
52
|
+
},
|
|
53
|
+
build: {
|
|
54
|
+
builderVersion: "Test string",
|
|
55
|
+
signature: {
|
|
56
|
+
keyId: "Test string",
|
|
57
|
+
keyType: "Test string",
|
|
58
|
+
publicKey: "Test string",
|
|
59
|
+
signature: "Test string",
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
createTime: "Test string",
|
|
63
|
+
deployable: {
|
|
64
|
+
resourceUri: [
|
|
65
|
+
"Test string"
|
|
66
|
+
],
|
|
67
|
+
},
|
|
68
|
+
discovery: {
|
|
69
|
+
analysisKind: "Test string",
|
|
70
|
+
},
|
|
71
|
+
expirationTime: "Test string",
|
|
72
|
+
intoto: {
|
|
73
|
+
expectedCommand: [
|
|
74
|
+
"Test string"
|
|
75
|
+
],
|
|
76
|
+
expectedMaterials: [
|
|
77
|
+
{
|
|
78
|
+
artifactRule: [
|
|
79
|
+
"Test string"
|
|
80
|
+
],
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
expectedProducts: [
|
|
84
|
+
{
|
|
85
|
+
artifactRule: [
|
|
86
|
+
"Test string"
|
|
87
|
+
],
|
|
88
|
+
}
|
|
89
|
+
],
|
|
90
|
+
signingKeys: [
|
|
91
|
+
{
|
|
92
|
+
keyId: "Test string",
|
|
93
|
+
keyScheme: "Test string",
|
|
94
|
+
keyType: "Test string",
|
|
95
|
+
publicKeyValue: "Test string",
|
|
96
|
+
}
|
|
97
|
+
],
|
|
98
|
+
stepName: "Test string",
|
|
99
|
+
threshold: "Test string",
|
|
100
|
+
},
|
|
101
|
+
kind: "Test string",
|
|
102
|
+
longDescription: "Test string",
|
|
103
|
+
name: "Test string",
|
|
104
|
+
package: {
|
|
105
|
+
architecture: "Test string",
|
|
106
|
+
cpeUri: "Test string",
|
|
107
|
+
description: "Test string",
|
|
108
|
+
digest: [
|
|
109
|
+
{
|
|
110
|
+
algo: "Test string",
|
|
111
|
+
digestBytes: "Test string",
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
distribution: [
|
|
115
|
+
{
|
|
116
|
+
architecture: "Test string",
|
|
117
|
+
cpeUri: "Test string",
|
|
118
|
+
description: "Test string",
|
|
119
|
+
latestVersion: {
|
|
120
|
+
epoch: 42,
|
|
121
|
+
inclusive: true,
|
|
122
|
+
kind: "Test string",
|
|
123
|
+
name: "Test string",
|
|
124
|
+
revision: "Test string",
|
|
125
|
+
},
|
|
126
|
+
maintainer: "Test string",
|
|
127
|
+
url: "Test string",
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
license: {
|
|
131
|
+
comments: "Test string",
|
|
132
|
+
expression: "Test string",
|
|
133
|
+
},
|
|
134
|
+
maintainer: "Test string",
|
|
135
|
+
name: "Test string",
|
|
136
|
+
packageType: "Test string",
|
|
137
|
+
url: "Test string",
|
|
138
|
+
version: {
|
|
139
|
+
epoch: 42,
|
|
140
|
+
inclusive: true,
|
|
141
|
+
kind: "Test string",
|
|
142
|
+
name: "Test string",
|
|
143
|
+
revision: "Test string",
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
relatedNoteNames: [
|
|
147
|
+
"Test string"
|
|
148
|
+
],
|
|
149
|
+
relatedUrl: [
|
|
150
|
+
{
|
|
151
|
+
label: "Test string",
|
|
152
|
+
url: "Test string",
|
|
153
|
+
}
|
|
154
|
+
],
|
|
155
|
+
sbom: {
|
|
156
|
+
dataLicence: "Test string",
|
|
157
|
+
spdxVersion: "Test string",
|
|
158
|
+
},
|
|
159
|
+
shortDescription: "Test string",
|
|
160
|
+
spdxFile: {
|
|
161
|
+
checksum: [
|
|
162
|
+
"Test string"
|
|
163
|
+
],
|
|
164
|
+
fileType: "Test string",
|
|
165
|
+
title: "Test string",
|
|
166
|
+
},
|
|
167
|
+
spdxPackage: {
|
|
168
|
+
analyzed: true,
|
|
169
|
+
attribution: "Test string",
|
|
170
|
+
checksum: "Test string",
|
|
171
|
+
copyright: "Test string",
|
|
172
|
+
detailedDescription: "Test string",
|
|
173
|
+
downloadLocation: "Test string",
|
|
174
|
+
externalRefs: [
|
|
175
|
+
{
|
|
176
|
+
category: "Test string",
|
|
177
|
+
comment: "Test string",
|
|
178
|
+
locator: "Test string",
|
|
179
|
+
type: "Test string",
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
filesLicenseInfo: [
|
|
183
|
+
"Test string"
|
|
184
|
+
],
|
|
185
|
+
homePage: "Test string",
|
|
186
|
+
licenseDeclared: {
|
|
187
|
+
comments: "Test string",
|
|
188
|
+
expression: "Test string",
|
|
189
|
+
},
|
|
190
|
+
originator: "Test string",
|
|
191
|
+
packageType: "Test string",
|
|
192
|
+
summaryDescription: "Test string",
|
|
193
|
+
supplier: "Test string",
|
|
194
|
+
title: "Test string",
|
|
195
|
+
verificationCode: "Test string",
|
|
196
|
+
version: "Test string",
|
|
197
|
+
},
|
|
198
|
+
spdxRelationship: {
|
|
199
|
+
type: "Test string",
|
|
200
|
+
},
|
|
201
|
+
updateTime: "Test string",
|
|
202
|
+
vulnerability: {
|
|
203
|
+
cvssScore: 42,
|
|
204
|
+
cvssV2: {
|
|
205
|
+
attackComplexity: "Test string",
|
|
206
|
+
attackVector: "Test string",
|
|
207
|
+
authentication: "Test string",
|
|
208
|
+
availabilityImpact: "Test string",
|
|
209
|
+
baseScore: 42,
|
|
210
|
+
confidentialityImpact: "Test string",
|
|
211
|
+
exploitabilityScore: 42,
|
|
212
|
+
impactScore: 42,
|
|
213
|
+
integrityImpact: "Test string",
|
|
214
|
+
privilegesRequired: "Test string",
|
|
215
|
+
scope: "Test string",
|
|
216
|
+
userInteraction: "Test string",
|
|
217
|
+
},
|
|
218
|
+
cvssV3: {
|
|
219
|
+
attackComplexity: "Test string",
|
|
220
|
+
attackVector: "Test string",
|
|
221
|
+
availabilityImpact: "Test string",
|
|
222
|
+
baseScore: 42,
|
|
223
|
+
confidentialityImpact: "Test string",
|
|
224
|
+
exploitabilityScore: 42,
|
|
225
|
+
impactScore: 42,
|
|
226
|
+
integrityImpact: "Test string",
|
|
227
|
+
privilegesRequired: "Test string",
|
|
228
|
+
scope: "Test string",
|
|
229
|
+
userInteraction: "Test string",
|
|
230
|
+
},
|
|
231
|
+
cwe: [
|
|
232
|
+
"Test string"
|
|
233
|
+
],
|
|
234
|
+
details: [
|
|
235
|
+
{
|
|
236
|
+
cpeUri: "Test string",
|
|
237
|
+
description: "Test string",
|
|
238
|
+
fixedLocation: {
|
|
239
|
+
cpeUri: "Test string",
|
|
240
|
+
package: "Test string",
|
|
241
|
+
version: {
|
|
242
|
+
epoch: 42,
|
|
243
|
+
inclusive: true,
|
|
244
|
+
kind: "Test string",
|
|
245
|
+
name: "Test string",
|
|
246
|
+
revision: "Test string",
|
|
247
|
+
},
|
|
248
|
+
},
|
|
249
|
+
isObsolete: true,
|
|
250
|
+
maxAffectedVersion: {
|
|
251
|
+
epoch: 42,
|
|
252
|
+
inclusive: true,
|
|
253
|
+
kind: "Test string",
|
|
254
|
+
name: "Test string",
|
|
255
|
+
revision: "Test string",
|
|
256
|
+
},
|
|
257
|
+
minAffectedVersion: {
|
|
258
|
+
epoch: 42,
|
|
259
|
+
inclusive: true,
|
|
260
|
+
kind: "Test string",
|
|
261
|
+
name: "Test string",
|
|
262
|
+
revision: "Test string",
|
|
263
|
+
},
|
|
264
|
+
package: "Test string",
|
|
265
|
+
packageType: "Test string",
|
|
266
|
+
severityName: "Test string",
|
|
267
|
+
source: "Test string",
|
|
268
|
+
sourceUpdateTime: "Test string",
|
|
269
|
+
vendor: "Test string",
|
|
270
|
+
}
|
|
271
|
+
],
|
|
272
|
+
severity: "Test string",
|
|
273
|
+
sourceUpdateTime: "Test string",
|
|
274
|
+
windowsDetails: [
|
|
275
|
+
{
|
|
276
|
+
cpeUri: "Test string",
|
|
277
|
+
description: "Test string",
|
|
278
|
+
fixingKbs: [
|
|
279
|
+
{
|
|
280
|
+
name: "Test string",
|
|
281
|
+
url: "Test string",
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
name: "Test string",
|
|
285
|
+
}
|
|
286
|
+
],
|
|
287
|
+
},
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
});
|
|
291
|
+
/** Creates a new note. */
|
|
292
|
+
await gapi.client.containeranalysis.projects.notes.create({
|
|
293
|
+
noteId: "Test string",
|
|
294
|
+
parent: "Test string",
|
|
295
|
+
}, {
|
|
296
|
+
attestationAuthority: {
|
|
297
|
+
hint: {
|
|
298
|
+
humanReadableName: "Test string",
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
baseImage: {
|
|
302
|
+
fingerprint: {
|
|
303
|
+
v1Name: "Test string",
|
|
304
|
+
v2Blob: [
|
|
305
|
+
"Test string"
|
|
306
|
+
],
|
|
307
|
+
v2Name: "Test string",
|
|
308
|
+
},
|
|
309
|
+
resourceUrl: "Test string",
|
|
310
|
+
},
|
|
311
|
+
build: {
|
|
312
|
+
builderVersion: "Test string",
|
|
313
|
+
signature: {
|
|
314
|
+
keyId: "Test string",
|
|
315
|
+
keyType: "Test string",
|
|
316
|
+
publicKey: "Test string",
|
|
317
|
+
signature: "Test string",
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
createTime: "Test string",
|
|
321
|
+
deployable: {
|
|
322
|
+
resourceUri: [
|
|
323
|
+
"Test string"
|
|
324
|
+
],
|
|
325
|
+
},
|
|
326
|
+
discovery: {
|
|
327
|
+
analysisKind: "Test string",
|
|
328
|
+
},
|
|
329
|
+
expirationTime: "Test string",
|
|
330
|
+
intoto: {
|
|
331
|
+
expectedCommand: [
|
|
332
|
+
"Test string"
|
|
333
|
+
],
|
|
334
|
+
expectedMaterials: [
|
|
335
|
+
{
|
|
336
|
+
artifactRule: [
|
|
337
|
+
"Test string"
|
|
338
|
+
],
|
|
339
|
+
}
|
|
340
|
+
],
|
|
341
|
+
expectedProducts: [
|
|
342
|
+
{
|
|
343
|
+
artifactRule: [
|
|
344
|
+
"Test string"
|
|
345
|
+
],
|
|
346
|
+
}
|
|
347
|
+
],
|
|
348
|
+
signingKeys: [
|
|
349
|
+
{
|
|
350
|
+
keyId: "Test string",
|
|
351
|
+
keyScheme: "Test string",
|
|
352
|
+
keyType: "Test string",
|
|
353
|
+
publicKeyValue: "Test string",
|
|
354
|
+
}
|
|
355
|
+
],
|
|
356
|
+
stepName: "Test string",
|
|
357
|
+
threshold: "Test string",
|
|
358
|
+
},
|
|
359
|
+
kind: "Test string",
|
|
360
|
+
longDescription: "Test string",
|
|
361
|
+
name: "Test string",
|
|
362
|
+
package: {
|
|
363
|
+
architecture: "Test string",
|
|
364
|
+
cpeUri: "Test string",
|
|
365
|
+
description: "Test string",
|
|
366
|
+
digest: [
|
|
367
|
+
{
|
|
368
|
+
algo: "Test string",
|
|
369
|
+
digestBytes: "Test string",
|
|
370
|
+
}
|
|
371
|
+
],
|
|
372
|
+
distribution: [
|
|
373
|
+
{
|
|
374
|
+
architecture: "Test string",
|
|
375
|
+
cpeUri: "Test string",
|
|
376
|
+
description: "Test string",
|
|
377
|
+
latestVersion: {
|
|
378
|
+
epoch: 42,
|
|
379
|
+
inclusive: true,
|
|
380
|
+
kind: "Test string",
|
|
381
|
+
name: "Test string",
|
|
382
|
+
revision: "Test string",
|
|
383
|
+
},
|
|
384
|
+
maintainer: "Test string",
|
|
385
|
+
url: "Test string",
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
license: {
|
|
389
|
+
comments: "Test string",
|
|
390
|
+
expression: "Test string",
|
|
391
|
+
},
|
|
392
|
+
maintainer: "Test string",
|
|
393
|
+
name: "Test string",
|
|
394
|
+
packageType: "Test string",
|
|
395
|
+
url: "Test string",
|
|
396
|
+
version: {
|
|
397
|
+
epoch: 42,
|
|
398
|
+
inclusive: true,
|
|
399
|
+
kind: "Test string",
|
|
400
|
+
name: "Test string",
|
|
401
|
+
revision: "Test string",
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
relatedNoteNames: [
|
|
405
|
+
"Test string"
|
|
406
|
+
],
|
|
407
|
+
relatedUrl: [
|
|
408
|
+
{
|
|
409
|
+
label: "Test string",
|
|
410
|
+
url: "Test string",
|
|
411
|
+
}
|
|
412
|
+
],
|
|
413
|
+
sbom: {
|
|
414
|
+
dataLicence: "Test string",
|
|
415
|
+
spdxVersion: "Test string",
|
|
416
|
+
},
|
|
417
|
+
shortDescription: "Test string",
|
|
418
|
+
spdxFile: {
|
|
419
|
+
checksum: [
|
|
420
|
+
"Test string"
|
|
421
|
+
],
|
|
422
|
+
fileType: "Test string",
|
|
423
|
+
title: "Test string",
|
|
424
|
+
},
|
|
425
|
+
spdxPackage: {
|
|
426
|
+
analyzed: true,
|
|
427
|
+
attribution: "Test string",
|
|
428
|
+
checksum: "Test string",
|
|
429
|
+
copyright: "Test string",
|
|
430
|
+
detailedDescription: "Test string",
|
|
431
|
+
downloadLocation: "Test string",
|
|
432
|
+
externalRefs: [
|
|
433
|
+
{
|
|
434
|
+
category: "Test string",
|
|
435
|
+
comment: "Test string",
|
|
436
|
+
locator: "Test string",
|
|
437
|
+
type: "Test string",
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
filesLicenseInfo: [
|
|
441
|
+
"Test string"
|
|
442
|
+
],
|
|
443
|
+
homePage: "Test string",
|
|
444
|
+
licenseDeclared: {
|
|
445
|
+
comments: "Test string",
|
|
446
|
+
expression: "Test string",
|
|
447
|
+
},
|
|
448
|
+
originator: "Test string",
|
|
449
|
+
packageType: "Test string",
|
|
450
|
+
summaryDescription: "Test string",
|
|
451
|
+
supplier: "Test string",
|
|
452
|
+
title: "Test string",
|
|
453
|
+
verificationCode: "Test string",
|
|
454
|
+
version: "Test string",
|
|
455
|
+
},
|
|
456
|
+
spdxRelationship: {
|
|
457
|
+
type: "Test string",
|
|
458
|
+
},
|
|
459
|
+
updateTime: "Test string",
|
|
460
|
+
vulnerability: {
|
|
461
|
+
cvssScore: 42,
|
|
462
|
+
cvssV2: {
|
|
463
|
+
attackComplexity: "Test string",
|
|
464
|
+
attackVector: "Test string",
|
|
465
|
+
authentication: "Test string",
|
|
466
|
+
availabilityImpact: "Test string",
|
|
467
|
+
baseScore: 42,
|
|
468
|
+
confidentialityImpact: "Test string",
|
|
469
|
+
exploitabilityScore: 42,
|
|
470
|
+
impactScore: 42,
|
|
471
|
+
integrityImpact: "Test string",
|
|
472
|
+
privilegesRequired: "Test string",
|
|
473
|
+
scope: "Test string",
|
|
474
|
+
userInteraction: "Test string",
|
|
475
|
+
},
|
|
476
|
+
cvssV3: {
|
|
477
|
+
attackComplexity: "Test string",
|
|
478
|
+
attackVector: "Test string",
|
|
479
|
+
availabilityImpact: "Test string",
|
|
480
|
+
baseScore: 42,
|
|
481
|
+
confidentialityImpact: "Test string",
|
|
482
|
+
exploitabilityScore: 42,
|
|
483
|
+
impactScore: 42,
|
|
484
|
+
integrityImpact: "Test string",
|
|
485
|
+
privilegesRequired: "Test string",
|
|
486
|
+
scope: "Test string",
|
|
487
|
+
userInteraction: "Test string",
|
|
488
|
+
},
|
|
489
|
+
cwe: [
|
|
490
|
+
"Test string"
|
|
491
|
+
],
|
|
492
|
+
details: [
|
|
493
|
+
{
|
|
494
|
+
cpeUri: "Test string",
|
|
495
|
+
description: "Test string",
|
|
496
|
+
fixedLocation: {
|
|
497
|
+
cpeUri: "Test string",
|
|
498
|
+
package: "Test string",
|
|
499
|
+
version: {
|
|
500
|
+
epoch: 42,
|
|
501
|
+
inclusive: true,
|
|
502
|
+
kind: "Test string",
|
|
503
|
+
name: "Test string",
|
|
504
|
+
revision: "Test string",
|
|
505
|
+
},
|
|
506
|
+
},
|
|
507
|
+
isObsolete: true,
|
|
508
|
+
maxAffectedVersion: {
|
|
509
|
+
epoch: 42,
|
|
510
|
+
inclusive: true,
|
|
511
|
+
kind: "Test string",
|
|
512
|
+
name: "Test string",
|
|
513
|
+
revision: "Test string",
|
|
514
|
+
},
|
|
515
|
+
minAffectedVersion: {
|
|
516
|
+
epoch: 42,
|
|
517
|
+
inclusive: true,
|
|
518
|
+
kind: "Test string",
|
|
519
|
+
name: "Test string",
|
|
520
|
+
revision: "Test string",
|
|
521
|
+
},
|
|
522
|
+
package: "Test string",
|
|
523
|
+
packageType: "Test string",
|
|
524
|
+
severityName: "Test string",
|
|
525
|
+
source: "Test string",
|
|
526
|
+
sourceUpdateTime: "Test string",
|
|
527
|
+
vendor: "Test string",
|
|
528
|
+
}
|
|
529
|
+
],
|
|
530
|
+
severity: "Test string",
|
|
531
|
+
sourceUpdateTime: "Test string",
|
|
532
|
+
windowsDetails: [
|
|
533
|
+
{
|
|
534
|
+
cpeUri: "Test string",
|
|
535
|
+
description: "Test string",
|
|
536
|
+
fixingKbs: [
|
|
537
|
+
{
|
|
538
|
+
name: "Test string",
|
|
539
|
+
url: "Test string",
|
|
540
|
+
}
|
|
541
|
+
],
|
|
542
|
+
name: "Test string",
|
|
543
|
+
}
|
|
544
|
+
],
|
|
545
|
+
},
|
|
546
|
+
});
|
|
547
|
+
/** Deletes the specified note. */
|
|
548
|
+
await gapi.client.containeranalysis.projects.notes.delete({
|
|
549
|
+
name: "Test string",
|
|
550
|
+
});
|
|
551
|
+
/** Gets the specified note. */
|
|
552
|
+
await gapi.client.containeranalysis.projects.notes.get({
|
|
553
|
+
name: "Test string",
|
|
554
|
+
});
|
|
555
|
+
/**
|
|
556
|
+
* Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the
|
|
557
|
+
* resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`
|
|
558
|
+
* for occurrences.
|
|
559
|
+
*/
|
|
560
|
+
await gapi.client.containeranalysis.projects.notes.getIamPolicy({
|
|
561
|
+
resource: "Test string",
|
|
562
|
+
}, {
|
|
563
|
+
options: {
|
|
564
|
+
requestedPolicyVersion: 42,
|
|
565
|
+
},
|
|
566
|
+
});
|
|
567
|
+
/** Lists notes for the specified project. */
|
|
568
|
+
await gapi.client.containeranalysis.projects.notes.list({
|
|
569
|
+
filter: "Test string",
|
|
570
|
+
pageSize: 42,
|
|
571
|
+
pageToken: "Test string",
|
|
572
|
+
parent: "Test string",
|
|
573
|
+
});
|
|
574
|
+
/** Updates the specified note. */
|
|
575
|
+
await gapi.client.containeranalysis.projects.notes.patch({
|
|
576
|
+
name: "Test string",
|
|
577
|
+
updateMask: "Test string",
|
|
578
|
+
}, {
|
|
579
|
+
attestationAuthority: {
|
|
580
|
+
hint: {
|
|
581
|
+
humanReadableName: "Test string",
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
baseImage: {
|
|
585
|
+
fingerprint: {
|
|
586
|
+
v1Name: "Test string",
|
|
587
|
+
v2Blob: [
|
|
588
|
+
"Test string"
|
|
589
|
+
],
|
|
590
|
+
v2Name: "Test string",
|
|
591
|
+
},
|
|
592
|
+
resourceUrl: "Test string",
|
|
593
|
+
},
|
|
594
|
+
build: {
|
|
595
|
+
builderVersion: "Test string",
|
|
596
|
+
signature: {
|
|
597
|
+
keyId: "Test string",
|
|
598
|
+
keyType: "Test string",
|
|
599
|
+
publicKey: "Test string",
|
|
600
|
+
signature: "Test string",
|
|
601
|
+
},
|
|
602
|
+
},
|
|
603
|
+
createTime: "Test string",
|
|
604
|
+
deployable: {
|
|
605
|
+
resourceUri: [
|
|
606
|
+
"Test string"
|
|
607
|
+
],
|
|
608
|
+
},
|
|
609
|
+
discovery: {
|
|
610
|
+
analysisKind: "Test string",
|
|
611
|
+
},
|
|
612
|
+
expirationTime: "Test string",
|
|
613
|
+
intoto: {
|
|
614
|
+
expectedCommand: [
|
|
615
|
+
"Test string"
|
|
616
|
+
],
|
|
617
|
+
expectedMaterials: [
|
|
618
|
+
{
|
|
619
|
+
artifactRule: [
|
|
620
|
+
"Test string"
|
|
621
|
+
],
|
|
622
|
+
}
|
|
623
|
+
],
|
|
624
|
+
expectedProducts: [
|
|
625
|
+
{
|
|
626
|
+
artifactRule: [
|
|
627
|
+
"Test string"
|
|
628
|
+
],
|
|
629
|
+
}
|
|
630
|
+
],
|
|
631
|
+
signingKeys: [
|
|
632
|
+
{
|
|
633
|
+
keyId: "Test string",
|
|
634
|
+
keyScheme: "Test string",
|
|
635
|
+
keyType: "Test string",
|
|
636
|
+
publicKeyValue: "Test string",
|
|
637
|
+
}
|
|
638
|
+
],
|
|
639
|
+
stepName: "Test string",
|
|
640
|
+
threshold: "Test string",
|
|
641
|
+
},
|
|
642
|
+
kind: "Test string",
|
|
643
|
+
longDescription: "Test string",
|
|
644
|
+
name: "Test string",
|
|
645
|
+
package: {
|
|
646
|
+
architecture: "Test string",
|
|
647
|
+
cpeUri: "Test string",
|
|
648
|
+
description: "Test string",
|
|
649
|
+
digest: [
|
|
650
|
+
{
|
|
651
|
+
algo: "Test string",
|
|
652
|
+
digestBytes: "Test string",
|
|
653
|
+
}
|
|
654
|
+
],
|
|
655
|
+
distribution: [
|
|
656
|
+
{
|
|
657
|
+
architecture: "Test string",
|
|
658
|
+
cpeUri: "Test string",
|
|
659
|
+
description: "Test string",
|
|
660
|
+
latestVersion: {
|
|
661
|
+
epoch: 42,
|
|
662
|
+
inclusive: true,
|
|
663
|
+
kind: "Test string",
|
|
664
|
+
name: "Test string",
|
|
665
|
+
revision: "Test string",
|
|
666
|
+
},
|
|
667
|
+
maintainer: "Test string",
|
|
668
|
+
url: "Test string",
|
|
669
|
+
}
|
|
670
|
+
],
|
|
671
|
+
license: {
|
|
672
|
+
comments: "Test string",
|
|
673
|
+
expression: "Test string",
|
|
674
|
+
},
|
|
675
|
+
maintainer: "Test string",
|
|
676
|
+
name: "Test string",
|
|
677
|
+
packageType: "Test string",
|
|
678
|
+
url: "Test string",
|
|
679
|
+
version: {
|
|
680
|
+
epoch: 42,
|
|
681
|
+
inclusive: true,
|
|
682
|
+
kind: "Test string",
|
|
683
|
+
name: "Test string",
|
|
684
|
+
revision: "Test string",
|
|
685
|
+
},
|
|
686
|
+
},
|
|
687
|
+
relatedNoteNames: [
|
|
688
|
+
"Test string"
|
|
689
|
+
],
|
|
690
|
+
relatedUrl: [
|
|
691
|
+
{
|
|
692
|
+
label: "Test string",
|
|
693
|
+
url: "Test string",
|
|
694
|
+
}
|
|
695
|
+
],
|
|
696
|
+
sbom: {
|
|
697
|
+
dataLicence: "Test string",
|
|
698
|
+
spdxVersion: "Test string",
|
|
699
|
+
},
|
|
700
|
+
shortDescription: "Test string",
|
|
701
|
+
spdxFile: {
|
|
702
|
+
checksum: [
|
|
703
|
+
"Test string"
|
|
704
|
+
],
|
|
705
|
+
fileType: "Test string",
|
|
706
|
+
title: "Test string",
|
|
707
|
+
},
|
|
708
|
+
spdxPackage: {
|
|
709
|
+
analyzed: true,
|
|
710
|
+
attribution: "Test string",
|
|
711
|
+
checksum: "Test string",
|
|
712
|
+
copyright: "Test string",
|
|
713
|
+
detailedDescription: "Test string",
|
|
714
|
+
downloadLocation: "Test string",
|
|
715
|
+
externalRefs: [
|
|
716
|
+
{
|
|
717
|
+
category: "Test string",
|
|
718
|
+
comment: "Test string",
|
|
719
|
+
locator: "Test string",
|
|
720
|
+
type: "Test string",
|
|
721
|
+
}
|
|
722
|
+
],
|
|
723
|
+
filesLicenseInfo: [
|
|
724
|
+
"Test string"
|
|
725
|
+
],
|
|
726
|
+
homePage: "Test string",
|
|
727
|
+
licenseDeclared: {
|
|
728
|
+
comments: "Test string",
|
|
729
|
+
expression: "Test string",
|
|
730
|
+
},
|
|
731
|
+
originator: "Test string",
|
|
732
|
+
packageType: "Test string",
|
|
733
|
+
summaryDescription: "Test string",
|
|
734
|
+
supplier: "Test string",
|
|
735
|
+
title: "Test string",
|
|
736
|
+
verificationCode: "Test string",
|
|
737
|
+
version: "Test string",
|
|
738
|
+
},
|
|
739
|
+
spdxRelationship: {
|
|
740
|
+
type: "Test string",
|
|
741
|
+
},
|
|
742
|
+
updateTime: "Test string",
|
|
743
|
+
vulnerability: {
|
|
744
|
+
cvssScore: 42,
|
|
745
|
+
cvssV2: {
|
|
746
|
+
attackComplexity: "Test string",
|
|
747
|
+
attackVector: "Test string",
|
|
748
|
+
authentication: "Test string",
|
|
749
|
+
availabilityImpact: "Test string",
|
|
750
|
+
baseScore: 42,
|
|
751
|
+
confidentialityImpact: "Test string",
|
|
752
|
+
exploitabilityScore: 42,
|
|
753
|
+
impactScore: 42,
|
|
754
|
+
integrityImpact: "Test string",
|
|
755
|
+
privilegesRequired: "Test string",
|
|
756
|
+
scope: "Test string",
|
|
757
|
+
userInteraction: "Test string",
|
|
758
|
+
},
|
|
759
|
+
cvssV3: {
|
|
760
|
+
attackComplexity: "Test string",
|
|
761
|
+
attackVector: "Test string",
|
|
762
|
+
availabilityImpact: "Test string",
|
|
763
|
+
baseScore: 42,
|
|
764
|
+
confidentialityImpact: "Test string",
|
|
765
|
+
exploitabilityScore: 42,
|
|
766
|
+
impactScore: 42,
|
|
767
|
+
integrityImpact: "Test string",
|
|
768
|
+
privilegesRequired: "Test string",
|
|
769
|
+
scope: "Test string",
|
|
770
|
+
userInteraction: "Test string",
|
|
771
|
+
},
|
|
772
|
+
cwe: [
|
|
773
|
+
"Test string"
|
|
774
|
+
],
|
|
775
|
+
details: [
|
|
776
|
+
{
|
|
777
|
+
cpeUri: "Test string",
|
|
778
|
+
description: "Test string",
|
|
779
|
+
fixedLocation: {
|
|
780
|
+
cpeUri: "Test string",
|
|
781
|
+
package: "Test string",
|
|
782
|
+
version: {
|
|
783
|
+
epoch: 42,
|
|
784
|
+
inclusive: true,
|
|
785
|
+
kind: "Test string",
|
|
786
|
+
name: "Test string",
|
|
787
|
+
revision: "Test string",
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
isObsolete: true,
|
|
791
|
+
maxAffectedVersion: {
|
|
792
|
+
epoch: 42,
|
|
793
|
+
inclusive: true,
|
|
794
|
+
kind: "Test string",
|
|
795
|
+
name: "Test string",
|
|
796
|
+
revision: "Test string",
|
|
797
|
+
},
|
|
798
|
+
minAffectedVersion: {
|
|
799
|
+
epoch: 42,
|
|
800
|
+
inclusive: true,
|
|
801
|
+
kind: "Test string",
|
|
802
|
+
name: "Test string",
|
|
803
|
+
revision: "Test string",
|
|
804
|
+
},
|
|
805
|
+
package: "Test string",
|
|
806
|
+
packageType: "Test string",
|
|
807
|
+
severityName: "Test string",
|
|
808
|
+
source: "Test string",
|
|
809
|
+
sourceUpdateTime: "Test string",
|
|
810
|
+
vendor: "Test string",
|
|
811
|
+
}
|
|
812
|
+
],
|
|
813
|
+
severity: "Test string",
|
|
814
|
+
sourceUpdateTime: "Test string",
|
|
815
|
+
windowsDetails: [
|
|
816
|
+
{
|
|
817
|
+
cpeUri: "Test string",
|
|
818
|
+
description: "Test string",
|
|
819
|
+
fixingKbs: [
|
|
820
|
+
{
|
|
821
|
+
name: "Test string",
|
|
822
|
+
url: "Test string",
|
|
823
|
+
}
|
|
824
|
+
],
|
|
825
|
+
name: "Test string",
|
|
826
|
+
}
|
|
827
|
+
],
|
|
828
|
+
},
|
|
829
|
+
});
|
|
830
|
+
/**
|
|
831
|
+
* Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the
|
|
832
|
+
* resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and
|
|
833
|
+
* `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
|
|
834
|
+
*/
|
|
835
|
+
await gapi.client.containeranalysis.projects.notes.setIamPolicy({
|
|
836
|
+
resource: "Test string",
|
|
837
|
+
}, {
|
|
838
|
+
policy: {
|
|
839
|
+
bindings: [
|
|
840
|
+
{
|
|
841
|
+
condition: {
|
|
842
|
+
description: "Test string",
|
|
843
|
+
expression: "Test string",
|
|
844
|
+
location: "Test string",
|
|
845
|
+
title: "Test string",
|
|
846
|
+
},
|
|
847
|
+
members: [
|
|
848
|
+
"Test string"
|
|
849
|
+
],
|
|
850
|
+
role: "Test string",
|
|
851
|
+
}
|
|
852
|
+
],
|
|
853
|
+
etag: "Test string",
|
|
854
|
+
version: 42,
|
|
855
|
+
},
|
|
856
|
+
});
|
|
857
|
+
/**
|
|
858
|
+
* Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes
|
|
859
|
+
* the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
|
|
860
|
+
*/
|
|
861
|
+
await gapi.client.containeranalysis.projects.notes.testIamPermissions({
|
|
862
|
+
resource: "Test string",
|
|
863
|
+
}, {
|
|
864
|
+
permissions: [
|
|
865
|
+
"Test string"
|
|
866
|
+
],
|
|
867
|
+
});
|
|
868
|
+
/** Lists occurrences referencing the specified note. Provider projects can use this method to get all occurrences across consumer projects referencing the specified note. */
|
|
869
|
+
await gapi.client.containeranalysis.projects.notes.occurrences.list({
|
|
870
|
+
filter: "Test string",
|
|
871
|
+
name: "Test string",
|
|
872
|
+
pageSize: 42,
|
|
873
|
+
pageToken: "Test string",
|
|
874
|
+
});
|
|
875
|
+
/** Creates new occurrences in batch. */
|
|
876
|
+
await gapi.client.containeranalysis.projects.occurrences.batchCreate({
|
|
877
|
+
parent: "Test string",
|
|
878
|
+
}, {
|
|
879
|
+
occurrences: [
|
|
880
|
+
{
|
|
881
|
+
attestation: {
|
|
882
|
+
attestation: {
|
|
883
|
+
genericSignedAttestation: {
|
|
884
|
+
contentType: "Test string",
|
|
885
|
+
serializedPayload: "Test string",
|
|
886
|
+
signatures: [
|
|
887
|
+
{
|
|
888
|
+
publicKeyId: "Test string",
|
|
889
|
+
signature: "Test string",
|
|
890
|
+
}
|
|
891
|
+
],
|
|
892
|
+
},
|
|
893
|
+
pgpSignedAttestation: {
|
|
894
|
+
contentType: "Test string",
|
|
895
|
+
pgpKeyId: "Test string",
|
|
896
|
+
signature: "Test string",
|
|
897
|
+
},
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
build: {
|
|
901
|
+
provenance: {
|
|
902
|
+
builderVersion: "Test string",
|
|
903
|
+
buildOptions: {
|
|
904
|
+
A: "Test string"
|
|
905
|
+
},
|
|
906
|
+
builtArtifacts: [
|
|
907
|
+
{
|
|
908
|
+
checksum: "Test string",
|
|
909
|
+
id: "Test string",
|
|
910
|
+
names: [
|
|
911
|
+
"Test string"
|
|
912
|
+
],
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
commands: [
|
|
916
|
+
{
|
|
917
|
+
args: [
|
|
918
|
+
"Test string"
|
|
919
|
+
],
|
|
920
|
+
dir: "Test string",
|
|
921
|
+
env: [
|
|
922
|
+
"Test string"
|
|
923
|
+
],
|
|
924
|
+
id: "Test string",
|
|
925
|
+
name: "Test string",
|
|
926
|
+
waitFor: [
|
|
927
|
+
"Test string"
|
|
928
|
+
],
|
|
929
|
+
}
|
|
930
|
+
],
|
|
931
|
+
createTime: "Test string",
|
|
932
|
+
creator: "Test string",
|
|
933
|
+
endTime: "Test string",
|
|
934
|
+
id: "Test string",
|
|
935
|
+
logsUri: "Test string",
|
|
936
|
+
projectId: "Test string",
|
|
937
|
+
sourceProvenance: {
|
|
938
|
+
additionalContexts: [
|
|
939
|
+
{
|
|
940
|
+
cloudRepo: {
|
|
941
|
+
aliasContext: {
|
|
942
|
+
kind: "Test string",
|
|
943
|
+
name: "Test string",
|
|
944
|
+
},
|
|
945
|
+
repoId: {
|
|
946
|
+
projectRepoId: {
|
|
947
|
+
projectId: "Test string",
|
|
948
|
+
repoName: "Test string",
|
|
949
|
+
},
|
|
950
|
+
uid: "Test string",
|
|
951
|
+
},
|
|
952
|
+
revisionId: "Test string",
|
|
953
|
+
},
|
|
954
|
+
gerrit: {
|
|
955
|
+
aliasContext: {
|
|
956
|
+
kind: "Test string",
|
|
957
|
+
name: "Test string",
|
|
958
|
+
},
|
|
959
|
+
gerritProject: "Test string",
|
|
960
|
+
hostUri: "Test string",
|
|
961
|
+
revisionId: "Test string",
|
|
962
|
+
},
|
|
963
|
+
git: {
|
|
964
|
+
revisionId: "Test string",
|
|
965
|
+
url: "Test string",
|
|
966
|
+
},
|
|
967
|
+
labels: {
|
|
968
|
+
A: "Test string"
|
|
969
|
+
},
|
|
970
|
+
}
|
|
971
|
+
],
|
|
972
|
+
artifactStorageSourceUri: "Test string",
|
|
973
|
+
context: {
|
|
974
|
+
cloudRepo: {
|
|
975
|
+
aliasContext: {
|
|
976
|
+
kind: "Test string",
|
|
977
|
+
name: "Test string",
|
|
978
|
+
},
|
|
979
|
+
repoId: {
|
|
980
|
+
projectRepoId: {
|
|
981
|
+
projectId: "Test string",
|
|
982
|
+
repoName: "Test string",
|
|
983
|
+
},
|
|
984
|
+
uid: "Test string",
|
|
985
|
+
},
|
|
986
|
+
revisionId: "Test string",
|
|
987
|
+
},
|
|
988
|
+
gerrit: {
|
|
989
|
+
aliasContext: {
|
|
990
|
+
kind: "Test string",
|
|
991
|
+
name: "Test string",
|
|
992
|
+
},
|
|
993
|
+
gerritProject: "Test string",
|
|
994
|
+
hostUri: "Test string",
|
|
995
|
+
revisionId: "Test string",
|
|
996
|
+
},
|
|
997
|
+
git: {
|
|
998
|
+
revisionId: "Test string",
|
|
999
|
+
url: "Test string",
|
|
1000
|
+
},
|
|
1001
|
+
labels: {
|
|
1002
|
+
A: "Test string"
|
|
1003
|
+
},
|
|
1004
|
+
},
|
|
1005
|
+
fileHashes: {
|
|
1006
|
+
A: {
|
|
1007
|
+
fileHash: [
|
|
1008
|
+
{
|
|
1009
|
+
type: "Test string",
|
|
1010
|
+
value: "Test string",
|
|
1011
|
+
}
|
|
1012
|
+
],
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
},
|
|
1016
|
+
startTime: "Test string",
|
|
1017
|
+
triggerId: "Test string",
|
|
1018
|
+
},
|
|
1019
|
+
provenanceBytes: "Test string",
|
|
1020
|
+
},
|
|
1021
|
+
createTime: "Test string",
|
|
1022
|
+
deployment: {
|
|
1023
|
+
deployment: {
|
|
1024
|
+
address: "Test string",
|
|
1025
|
+
config: "Test string",
|
|
1026
|
+
deployTime: "Test string",
|
|
1027
|
+
platform: "Test string",
|
|
1028
|
+
resourceUri: [
|
|
1029
|
+
"Test string"
|
|
1030
|
+
],
|
|
1031
|
+
undeployTime: "Test string",
|
|
1032
|
+
userEmail: "Test string",
|
|
1033
|
+
},
|
|
1034
|
+
},
|
|
1035
|
+
derivedImage: {
|
|
1036
|
+
derivedImage: {
|
|
1037
|
+
baseResourceUrl: "Test string",
|
|
1038
|
+
distance: 42,
|
|
1039
|
+
fingerprint: {
|
|
1040
|
+
v1Name: "Test string",
|
|
1041
|
+
v2Blob: [
|
|
1042
|
+
"Test string"
|
|
1043
|
+
],
|
|
1044
|
+
v2Name: "Test string",
|
|
1045
|
+
},
|
|
1046
|
+
layerInfo: [
|
|
1047
|
+
{
|
|
1048
|
+
arguments: "Test string",
|
|
1049
|
+
directive: "Test string",
|
|
1050
|
+
}
|
|
1051
|
+
],
|
|
1052
|
+
},
|
|
1053
|
+
},
|
|
1054
|
+
discovered: {
|
|
1055
|
+
discovered: {
|
|
1056
|
+
analysisCompleted: {
|
|
1057
|
+
analysisType: [
|
|
1058
|
+
"Test string"
|
|
1059
|
+
],
|
|
1060
|
+
},
|
|
1061
|
+
analysisError: [
|
|
1062
|
+
{
|
|
1063
|
+
code: 42,
|
|
1064
|
+
details: [
|
|
1065
|
+
{
|
|
1066
|
+
A: 42
|
|
1067
|
+
}
|
|
1068
|
+
],
|
|
1069
|
+
message: "Test string",
|
|
1070
|
+
}
|
|
1071
|
+
],
|
|
1072
|
+
analysisStatus: "Test string",
|
|
1073
|
+
analysisStatusError: {
|
|
1074
|
+
code: 42,
|
|
1075
|
+
details: [
|
|
1076
|
+
{
|
|
1077
|
+
A: 42
|
|
1078
|
+
}
|
|
1079
|
+
],
|
|
1080
|
+
message: "Test string",
|
|
1081
|
+
},
|
|
1082
|
+
continuousAnalysis: "Test string",
|
|
1083
|
+
lastAnalysisTime: "Test string",
|
|
1084
|
+
},
|
|
1085
|
+
},
|
|
1086
|
+
envelope: {
|
|
1087
|
+
payload: "Test string",
|
|
1088
|
+
payloadType: "Test string",
|
|
1089
|
+
signatures: [
|
|
1090
|
+
{
|
|
1091
|
+
keyid: "Test string",
|
|
1092
|
+
sig: "Test string",
|
|
1093
|
+
}
|
|
1094
|
+
],
|
|
1095
|
+
},
|
|
1096
|
+
installation: {
|
|
1097
|
+
installation: {
|
|
1098
|
+
architecture: "Test string",
|
|
1099
|
+
cpeUri: "Test string",
|
|
1100
|
+
license: {
|
|
1101
|
+
comments: "Test string",
|
|
1102
|
+
expression: "Test string",
|
|
1103
|
+
},
|
|
1104
|
+
location: [
|
|
1105
|
+
{
|
|
1106
|
+
cpeUri: "Test string",
|
|
1107
|
+
path: "Test string",
|
|
1108
|
+
version: {
|
|
1109
|
+
epoch: 42,
|
|
1110
|
+
inclusive: true,
|
|
1111
|
+
kind: "Test string",
|
|
1112
|
+
name: "Test string",
|
|
1113
|
+
revision: "Test string",
|
|
1114
|
+
},
|
|
1115
|
+
}
|
|
1116
|
+
],
|
|
1117
|
+
name: "Test string",
|
|
1118
|
+
packageType: "Test string",
|
|
1119
|
+
version: {
|
|
1120
|
+
epoch: 42,
|
|
1121
|
+
inclusive: true,
|
|
1122
|
+
kind: "Test string",
|
|
1123
|
+
name: "Test string",
|
|
1124
|
+
revision: "Test string",
|
|
1125
|
+
},
|
|
1126
|
+
},
|
|
1127
|
+
},
|
|
1128
|
+
intoto: {
|
|
1129
|
+
signatures: [
|
|
1130
|
+
{
|
|
1131
|
+
keyid: "Test string",
|
|
1132
|
+
sig: "Test string",
|
|
1133
|
+
}
|
|
1134
|
+
],
|
|
1135
|
+
signed: {
|
|
1136
|
+
byproducts: {
|
|
1137
|
+
customValues: {
|
|
1138
|
+
A: "Test string"
|
|
1139
|
+
},
|
|
1140
|
+
},
|
|
1141
|
+
command: [
|
|
1142
|
+
"Test string"
|
|
1143
|
+
],
|
|
1144
|
+
environment: {
|
|
1145
|
+
customValues: {
|
|
1146
|
+
A: "Test string"
|
|
1147
|
+
},
|
|
1148
|
+
},
|
|
1149
|
+
materials: [
|
|
1150
|
+
{
|
|
1151
|
+
hashes: {
|
|
1152
|
+
sha256: "Test string",
|
|
1153
|
+
},
|
|
1154
|
+
resourceUri: "Test string",
|
|
1155
|
+
}
|
|
1156
|
+
],
|
|
1157
|
+
products: [
|
|
1158
|
+
{
|
|
1159
|
+
hashes: {
|
|
1160
|
+
sha256: "Test string",
|
|
1161
|
+
},
|
|
1162
|
+
resourceUri: "Test string",
|
|
1163
|
+
}
|
|
1164
|
+
],
|
|
1165
|
+
},
|
|
1166
|
+
},
|
|
1167
|
+
kind: "Test string",
|
|
1168
|
+
name: "Test string",
|
|
1169
|
+
noteName: "Test string",
|
|
1170
|
+
remediation: "Test string",
|
|
1171
|
+
resource: {
|
|
1172
|
+
contentHash: {
|
|
1173
|
+
type: "Test string",
|
|
1174
|
+
value: "Test string",
|
|
1175
|
+
},
|
|
1176
|
+
name: "Test string",
|
|
1177
|
+
uri: "Test string",
|
|
1178
|
+
},
|
|
1179
|
+
sbom: {
|
|
1180
|
+
createTime: "Test string",
|
|
1181
|
+
creatorComment: "Test string",
|
|
1182
|
+
creators: [
|
|
1183
|
+
"Test string"
|
|
1184
|
+
],
|
|
1185
|
+
documentComment: "Test string",
|
|
1186
|
+
externalDocumentRefs: [
|
|
1187
|
+
"Test string"
|
|
1188
|
+
],
|
|
1189
|
+
id: "Test string",
|
|
1190
|
+
licenseListVersion: "Test string",
|
|
1191
|
+
namespace: "Test string",
|
|
1192
|
+
title: "Test string",
|
|
1193
|
+
},
|
|
1194
|
+
spdxFile: {
|
|
1195
|
+
attributions: [
|
|
1196
|
+
"Test string"
|
|
1197
|
+
],
|
|
1198
|
+
comment: "Test string",
|
|
1199
|
+
contributors: [
|
|
1200
|
+
"Test string"
|
|
1201
|
+
],
|
|
1202
|
+
copyright: "Test string",
|
|
1203
|
+
filesLicenseInfo: [
|
|
1204
|
+
"Test string"
|
|
1205
|
+
],
|
|
1206
|
+
id: "Test string",
|
|
1207
|
+
licenseConcluded: {
|
|
1208
|
+
comments: "Test string",
|
|
1209
|
+
expression: "Test string",
|
|
1210
|
+
},
|
|
1211
|
+
notice: "Test string",
|
|
1212
|
+
},
|
|
1213
|
+
spdxPackage: {
|
|
1214
|
+
comment: "Test string",
|
|
1215
|
+
filename: "Test string",
|
|
1216
|
+
homePage: "Test string",
|
|
1217
|
+
id: "Test string",
|
|
1218
|
+
licenseConcluded: {
|
|
1219
|
+
comments: "Test string",
|
|
1220
|
+
expression: "Test string",
|
|
1221
|
+
},
|
|
1222
|
+
packageType: "Test string",
|
|
1223
|
+
sourceInfo: "Test string",
|
|
1224
|
+
summaryDescription: "Test string",
|
|
1225
|
+
title: "Test string",
|
|
1226
|
+
version: "Test string",
|
|
1227
|
+
},
|
|
1228
|
+
spdxRelationship: {
|
|
1229
|
+
comment: "Test string",
|
|
1230
|
+
source: "Test string",
|
|
1231
|
+
target: "Test string",
|
|
1232
|
+
type: "Test string",
|
|
1233
|
+
},
|
|
1234
|
+
updateTime: "Test string",
|
|
1235
|
+
vulnerability: {
|
|
1236
|
+
cvssScore: 42,
|
|
1237
|
+
effectiveSeverity: "Test string",
|
|
1238
|
+
longDescription: "Test string",
|
|
1239
|
+
packageIssue: [
|
|
1240
|
+
{
|
|
1241
|
+
affectedLocation: {
|
|
1242
|
+
cpeUri: "Test string",
|
|
1243
|
+
package: "Test string",
|
|
1244
|
+
version: {
|
|
1245
|
+
epoch: 42,
|
|
1246
|
+
inclusive: true,
|
|
1247
|
+
kind: "Test string",
|
|
1248
|
+
name: "Test string",
|
|
1249
|
+
revision: "Test string",
|
|
1250
|
+
},
|
|
1251
|
+
},
|
|
1252
|
+
effectiveSeverity: "Test string",
|
|
1253
|
+
fixedLocation: {
|
|
1254
|
+
cpeUri: "Test string",
|
|
1255
|
+
package: "Test string",
|
|
1256
|
+
version: {
|
|
1257
|
+
epoch: 42,
|
|
1258
|
+
inclusive: true,
|
|
1259
|
+
kind: "Test string",
|
|
1260
|
+
name: "Test string",
|
|
1261
|
+
revision: "Test string",
|
|
1262
|
+
},
|
|
1263
|
+
},
|
|
1264
|
+
packageType: "Test string",
|
|
1265
|
+
severityName: "Test string",
|
|
1266
|
+
}
|
|
1267
|
+
],
|
|
1268
|
+
relatedUrls: [
|
|
1269
|
+
{
|
|
1270
|
+
label: "Test string",
|
|
1271
|
+
url: "Test string",
|
|
1272
|
+
}
|
|
1273
|
+
],
|
|
1274
|
+
severity: "Test string",
|
|
1275
|
+
shortDescription: "Test string",
|
|
1276
|
+
type: "Test string",
|
|
1277
|
+
},
|
|
1278
|
+
}
|
|
1279
|
+
],
|
|
1280
|
+
});
|
|
1281
|
+
/** Creates a new occurrence. */
|
|
1282
|
+
await gapi.client.containeranalysis.projects.occurrences.create({
|
|
1283
|
+
parent: "Test string",
|
|
1284
|
+
}, {
|
|
1285
|
+
attestation: {
|
|
1286
|
+
attestation: {
|
|
1287
|
+
genericSignedAttestation: {
|
|
1288
|
+
contentType: "Test string",
|
|
1289
|
+
serializedPayload: "Test string",
|
|
1290
|
+
signatures: [
|
|
1291
|
+
{
|
|
1292
|
+
publicKeyId: "Test string",
|
|
1293
|
+
signature: "Test string",
|
|
1294
|
+
}
|
|
1295
|
+
],
|
|
1296
|
+
},
|
|
1297
|
+
pgpSignedAttestation: {
|
|
1298
|
+
contentType: "Test string",
|
|
1299
|
+
pgpKeyId: "Test string",
|
|
1300
|
+
signature: "Test string",
|
|
1301
|
+
},
|
|
1302
|
+
},
|
|
1303
|
+
},
|
|
1304
|
+
build: {
|
|
1305
|
+
provenance: {
|
|
1306
|
+
builderVersion: "Test string",
|
|
1307
|
+
buildOptions: {
|
|
1308
|
+
A: "Test string"
|
|
1309
|
+
},
|
|
1310
|
+
builtArtifacts: [
|
|
1311
|
+
{
|
|
1312
|
+
checksum: "Test string",
|
|
1313
|
+
id: "Test string",
|
|
1314
|
+
names: [
|
|
1315
|
+
"Test string"
|
|
1316
|
+
],
|
|
1317
|
+
}
|
|
1318
|
+
],
|
|
1319
|
+
commands: [
|
|
1320
|
+
{
|
|
1321
|
+
args: [
|
|
1322
|
+
"Test string"
|
|
1323
|
+
],
|
|
1324
|
+
dir: "Test string",
|
|
1325
|
+
env: [
|
|
1326
|
+
"Test string"
|
|
1327
|
+
],
|
|
1328
|
+
id: "Test string",
|
|
1329
|
+
name: "Test string",
|
|
1330
|
+
waitFor: [
|
|
1331
|
+
"Test string"
|
|
1332
|
+
],
|
|
1333
|
+
}
|
|
1334
|
+
],
|
|
1335
|
+
createTime: "Test string",
|
|
1336
|
+
creator: "Test string",
|
|
1337
|
+
endTime: "Test string",
|
|
1338
|
+
id: "Test string",
|
|
1339
|
+
logsUri: "Test string",
|
|
1340
|
+
projectId: "Test string",
|
|
1341
|
+
sourceProvenance: {
|
|
1342
|
+
additionalContexts: [
|
|
1343
|
+
{
|
|
1344
|
+
cloudRepo: {
|
|
1345
|
+
aliasContext: {
|
|
1346
|
+
kind: "Test string",
|
|
1347
|
+
name: "Test string",
|
|
1348
|
+
},
|
|
1349
|
+
repoId: {
|
|
1350
|
+
projectRepoId: {
|
|
1351
|
+
projectId: "Test string",
|
|
1352
|
+
repoName: "Test string",
|
|
1353
|
+
},
|
|
1354
|
+
uid: "Test string",
|
|
1355
|
+
},
|
|
1356
|
+
revisionId: "Test string",
|
|
1357
|
+
},
|
|
1358
|
+
gerrit: {
|
|
1359
|
+
aliasContext: {
|
|
1360
|
+
kind: "Test string",
|
|
1361
|
+
name: "Test string",
|
|
1362
|
+
},
|
|
1363
|
+
gerritProject: "Test string",
|
|
1364
|
+
hostUri: "Test string",
|
|
1365
|
+
revisionId: "Test string",
|
|
1366
|
+
},
|
|
1367
|
+
git: {
|
|
1368
|
+
revisionId: "Test string",
|
|
1369
|
+
url: "Test string",
|
|
1370
|
+
},
|
|
1371
|
+
labels: {
|
|
1372
|
+
A: "Test string"
|
|
1373
|
+
},
|
|
1374
|
+
}
|
|
1375
|
+
],
|
|
1376
|
+
artifactStorageSourceUri: "Test string",
|
|
1377
|
+
context: {
|
|
1378
|
+
cloudRepo: {
|
|
1379
|
+
aliasContext: {
|
|
1380
|
+
kind: "Test string",
|
|
1381
|
+
name: "Test string",
|
|
1382
|
+
},
|
|
1383
|
+
repoId: {
|
|
1384
|
+
projectRepoId: {
|
|
1385
|
+
projectId: "Test string",
|
|
1386
|
+
repoName: "Test string",
|
|
1387
|
+
},
|
|
1388
|
+
uid: "Test string",
|
|
1389
|
+
},
|
|
1390
|
+
revisionId: "Test string",
|
|
1391
|
+
},
|
|
1392
|
+
gerrit: {
|
|
1393
|
+
aliasContext: {
|
|
1394
|
+
kind: "Test string",
|
|
1395
|
+
name: "Test string",
|
|
1396
|
+
},
|
|
1397
|
+
gerritProject: "Test string",
|
|
1398
|
+
hostUri: "Test string",
|
|
1399
|
+
revisionId: "Test string",
|
|
1400
|
+
},
|
|
1401
|
+
git: {
|
|
1402
|
+
revisionId: "Test string",
|
|
1403
|
+
url: "Test string",
|
|
1404
|
+
},
|
|
1405
|
+
labels: {
|
|
1406
|
+
A: "Test string"
|
|
1407
|
+
},
|
|
1408
|
+
},
|
|
1409
|
+
fileHashes: {
|
|
1410
|
+
A: {
|
|
1411
|
+
fileHash: [
|
|
1412
|
+
{
|
|
1413
|
+
type: "Test string",
|
|
1414
|
+
value: "Test string",
|
|
1415
|
+
}
|
|
1416
|
+
],
|
|
1417
|
+
}
|
|
1418
|
+
},
|
|
1419
|
+
},
|
|
1420
|
+
startTime: "Test string",
|
|
1421
|
+
triggerId: "Test string",
|
|
1422
|
+
},
|
|
1423
|
+
provenanceBytes: "Test string",
|
|
1424
|
+
},
|
|
1425
|
+
createTime: "Test string",
|
|
1426
|
+
deployment: {
|
|
1427
|
+
deployment: {
|
|
1428
|
+
address: "Test string",
|
|
1429
|
+
config: "Test string",
|
|
1430
|
+
deployTime: "Test string",
|
|
1431
|
+
platform: "Test string",
|
|
1432
|
+
resourceUri: [
|
|
1433
|
+
"Test string"
|
|
1434
|
+
],
|
|
1435
|
+
undeployTime: "Test string",
|
|
1436
|
+
userEmail: "Test string",
|
|
1437
|
+
},
|
|
1438
|
+
},
|
|
1439
|
+
derivedImage: {
|
|
1440
|
+
derivedImage: {
|
|
1441
|
+
baseResourceUrl: "Test string",
|
|
1442
|
+
distance: 42,
|
|
1443
|
+
fingerprint: {
|
|
1444
|
+
v1Name: "Test string",
|
|
1445
|
+
v2Blob: [
|
|
1446
|
+
"Test string"
|
|
1447
|
+
],
|
|
1448
|
+
v2Name: "Test string",
|
|
1449
|
+
},
|
|
1450
|
+
layerInfo: [
|
|
1451
|
+
{
|
|
1452
|
+
arguments: "Test string",
|
|
1453
|
+
directive: "Test string",
|
|
1454
|
+
}
|
|
1455
|
+
],
|
|
1456
|
+
},
|
|
1457
|
+
},
|
|
1458
|
+
discovered: {
|
|
1459
|
+
discovered: {
|
|
1460
|
+
analysisCompleted: {
|
|
1461
|
+
analysisType: [
|
|
1462
|
+
"Test string"
|
|
1463
|
+
],
|
|
1464
|
+
},
|
|
1465
|
+
analysisError: [
|
|
1466
|
+
{
|
|
1467
|
+
code: 42,
|
|
1468
|
+
details: [
|
|
1469
|
+
{
|
|
1470
|
+
A: 42
|
|
1471
|
+
}
|
|
1472
|
+
],
|
|
1473
|
+
message: "Test string",
|
|
1474
|
+
}
|
|
1475
|
+
],
|
|
1476
|
+
analysisStatus: "Test string",
|
|
1477
|
+
analysisStatusError: {
|
|
1478
|
+
code: 42,
|
|
1479
|
+
details: [
|
|
1480
|
+
{
|
|
1481
|
+
A: 42
|
|
1482
|
+
}
|
|
1483
|
+
],
|
|
1484
|
+
message: "Test string",
|
|
1485
|
+
},
|
|
1486
|
+
continuousAnalysis: "Test string",
|
|
1487
|
+
lastAnalysisTime: "Test string",
|
|
1488
|
+
},
|
|
1489
|
+
},
|
|
1490
|
+
envelope: {
|
|
1491
|
+
payload: "Test string",
|
|
1492
|
+
payloadType: "Test string",
|
|
1493
|
+
signatures: [
|
|
1494
|
+
{
|
|
1495
|
+
keyid: "Test string",
|
|
1496
|
+
sig: "Test string",
|
|
1497
|
+
}
|
|
1498
|
+
],
|
|
1499
|
+
},
|
|
1500
|
+
installation: {
|
|
1501
|
+
installation: {
|
|
1502
|
+
architecture: "Test string",
|
|
1503
|
+
cpeUri: "Test string",
|
|
1504
|
+
license: {
|
|
1505
|
+
comments: "Test string",
|
|
1506
|
+
expression: "Test string",
|
|
1507
|
+
},
|
|
1508
|
+
location: [
|
|
1509
|
+
{
|
|
1510
|
+
cpeUri: "Test string",
|
|
1511
|
+
path: "Test string",
|
|
1512
|
+
version: {
|
|
1513
|
+
epoch: 42,
|
|
1514
|
+
inclusive: true,
|
|
1515
|
+
kind: "Test string",
|
|
1516
|
+
name: "Test string",
|
|
1517
|
+
revision: "Test string",
|
|
1518
|
+
},
|
|
1519
|
+
}
|
|
1520
|
+
],
|
|
1521
|
+
name: "Test string",
|
|
1522
|
+
packageType: "Test string",
|
|
1523
|
+
version: {
|
|
1524
|
+
epoch: 42,
|
|
1525
|
+
inclusive: true,
|
|
1526
|
+
kind: "Test string",
|
|
1527
|
+
name: "Test string",
|
|
1528
|
+
revision: "Test string",
|
|
1529
|
+
},
|
|
1530
|
+
},
|
|
1531
|
+
},
|
|
1532
|
+
intoto: {
|
|
1533
|
+
signatures: [
|
|
1534
|
+
{
|
|
1535
|
+
keyid: "Test string",
|
|
1536
|
+
sig: "Test string",
|
|
1537
|
+
}
|
|
1538
|
+
],
|
|
1539
|
+
signed: {
|
|
1540
|
+
byproducts: {
|
|
1541
|
+
customValues: {
|
|
1542
|
+
A: "Test string"
|
|
1543
|
+
},
|
|
1544
|
+
},
|
|
1545
|
+
command: [
|
|
1546
|
+
"Test string"
|
|
1547
|
+
],
|
|
1548
|
+
environment: {
|
|
1549
|
+
customValues: {
|
|
1550
|
+
A: "Test string"
|
|
1551
|
+
},
|
|
1552
|
+
},
|
|
1553
|
+
materials: [
|
|
1554
|
+
{
|
|
1555
|
+
hashes: {
|
|
1556
|
+
sha256: "Test string",
|
|
1557
|
+
},
|
|
1558
|
+
resourceUri: "Test string",
|
|
1559
|
+
}
|
|
1560
|
+
],
|
|
1561
|
+
products: [
|
|
1562
|
+
{
|
|
1563
|
+
hashes: {
|
|
1564
|
+
sha256: "Test string",
|
|
1565
|
+
},
|
|
1566
|
+
resourceUri: "Test string",
|
|
1567
|
+
}
|
|
1568
|
+
],
|
|
1569
|
+
},
|
|
1570
|
+
},
|
|
1571
|
+
kind: "Test string",
|
|
1572
|
+
name: "Test string",
|
|
1573
|
+
noteName: "Test string",
|
|
1574
|
+
remediation: "Test string",
|
|
1575
|
+
resource: {
|
|
1576
|
+
contentHash: {
|
|
1577
|
+
type: "Test string",
|
|
1578
|
+
value: "Test string",
|
|
1579
|
+
},
|
|
1580
|
+
name: "Test string",
|
|
1581
|
+
uri: "Test string",
|
|
1582
|
+
},
|
|
1583
|
+
sbom: {
|
|
1584
|
+
createTime: "Test string",
|
|
1585
|
+
creatorComment: "Test string",
|
|
1586
|
+
creators: [
|
|
1587
|
+
"Test string"
|
|
1588
|
+
],
|
|
1589
|
+
documentComment: "Test string",
|
|
1590
|
+
externalDocumentRefs: [
|
|
1591
|
+
"Test string"
|
|
1592
|
+
],
|
|
1593
|
+
id: "Test string",
|
|
1594
|
+
licenseListVersion: "Test string",
|
|
1595
|
+
namespace: "Test string",
|
|
1596
|
+
title: "Test string",
|
|
1597
|
+
},
|
|
1598
|
+
spdxFile: {
|
|
1599
|
+
attributions: [
|
|
1600
|
+
"Test string"
|
|
1601
|
+
],
|
|
1602
|
+
comment: "Test string",
|
|
1603
|
+
contributors: [
|
|
1604
|
+
"Test string"
|
|
1605
|
+
],
|
|
1606
|
+
copyright: "Test string",
|
|
1607
|
+
filesLicenseInfo: [
|
|
1608
|
+
"Test string"
|
|
1609
|
+
],
|
|
1610
|
+
id: "Test string",
|
|
1611
|
+
licenseConcluded: {
|
|
1612
|
+
comments: "Test string",
|
|
1613
|
+
expression: "Test string",
|
|
1614
|
+
},
|
|
1615
|
+
notice: "Test string",
|
|
1616
|
+
},
|
|
1617
|
+
spdxPackage: {
|
|
1618
|
+
comment: "Test string",
|
|
1619
|
+
filename: "Test string",
|
|
1620
|
+
homePage: "Test string",
|
|
1621
|
+
id: "Test string",
|
|
1622
|
+
licenseConcluded: {
|
|
1623
|
+
comments: "Test string",
|
|
1624
|
+
expression: "Test string",
|
|
1625
|
+
},
|
|
1626
|
+
packageType: "Test string",
|
|
1627
|
+
sourceInfo: "Test string",
|
|
1628
|
+
summaryDescription: "Test string",
|
|
1629
|
+
title: "Test string",
|
|
1630
|
+
version: "Test string",
|
|
1631
|
+
},
|
|
1632
|
+
spdxRelationship: {
|
|
1633
|
+
comment: "Test string",
|
|
1634
|
+
source: "Test string",
|
|
1635
|
+
target: "Test string",
|
|
1636
|
+
type: "Test string",
|
|
1637
|
+
},
|
|
1638
|
+
updateTime: "Test string",
|
|
1639
|
+
vulnerability: {
|
|
1640
|
+
cvssScore: 42,
|
|
1641
|
+
effectiveSeverity: "Test string",
|
|
1642
|
+
longDescription: "Test string",
|
|
1643
|
+
packageIssue: [
|
|
1644
|
+
{
|
|
1645
|
+
affectedLocation: {
|
|
1646
|
+
cpeUri: "Test string",
|
|
1647
|
+
package: "Test string",
|
|
1648
|
+
version: {
|
|
1649
|
+
epoch: 42,
|
|
1650
|
+
inclusive: true,
|
|
1651
|
+
kind: "Test string",
|
|
1652
|
+
name: "Test string",
|
|
1653
|
+
revision: "Test string",
|
|
1654
|
+
},
|
|
1655
|
+
},
|
|
1656
|
+
effectiveSeverity: "Test string",
|
|
1657
|
+
fixedLocation: {
|
|
1658
|
+
cpeUri: "Test string",
|
|
1659
|
+
package: "Test string",
|
|
1660
|
+
version: {
|
|
1661
|
+
epoch: 42,
|
|
1662
|
+
inclusive: true,
|
|
1663
|
+
kind: "Test string",
|
|
1664
|
+
name: "Test string",
|
|
1665
|
+
revision: "Test string",
|
|
1666
|
+
},
|
|
1667
|
+
},
|
|
1668
|
+
packageType: "Test string",
|
|
1669
|
+
severityName: "Test string",
|
|
1670
|
+
}
|
|
1671
|
+
],
|
|
1672
|
+
relatedUrls: [
|
|
1673
|
+
{
|
|
1674
|
+
label: "Test string",
|
|
1675
|
+
url: "Test string",
|
|
1676
|
+
}
|
|
1677
|
+
],
|
|
1678
|
+
severity: "Test string",
|
|
1679
|
+
shortDescription: "Test string",
|
|
1680
|
+
type: "Test string",
|
|
1681
|
+
},
|
|
1682
|
+
});
|
|
1683
|
+
/** Deletes the specified occurrence. For example, use this method to delete an occurrence when the occurrence is no longer applicable for the given resource. */
|
|
1684
|
+
await gapi.client.containeranalysis.projects.occurrences.delete({
|
|
1685
|
+
name: "Test string",
|
|
1686
|
+
});
|
|
1687
|
+
/** Gets the specified occurrence. */
|
|
1688
|
+
await gapi.client.containeranalysis.projects.occurrences.get({
|
|
1689
|
+
name: "Test string",
|
|
1690
|
+
});
|
|
1691
|
+
/**
|
|
1692
|
+
* Gets the access control policy for a note or an occurrence resource. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the
|
|
1693
|
+
* resource is a note or occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]`
|
|
1694
|
+
* for occurrences.
|
|
1695
|
+
*/
|
|
1696
|
+
await gapi.client.containeranalysis.projects.occurrences.getIamPolicy({
|
|
1697
|
+
resource: "Test string",
|
|
1698
|
+
}, {
|
|
1699
|
+
options: {
|
|
1700
|
+
requestedPolicyVersion: 42,
|
|
1701
|
+
},
|
|
1702
|
+
});
|
|
1703
|
+
/** Gets the note attached to the specified occurrence. Consumer projects can use this method to get a note that belongs to a provider project. */
|
|
1704
|
+
await gapi.client.containeranalysis.projects.occurrences.getNotes({
|
|
1705
|
+
name: "Test string",
|
|
1706
|
+
});
|
|
1707
|
+
/** Gets a summary of the number and severity of occurrences. */
|
|
1708
|
+
await gapi.client.containeranalysis.projects.occurrences.getVulnerabilitySummary({
|
|
1709
|
+
filter: "Test string",
|
|
1710
|
+
parent: "Test string",
|
|
1711
|
+
});
|
|
1712
|
+
/** Lists occurrences for the specified project. */
|
|
1713
|
+
await gapi.client.containeranalysis.projects.occurrences.list({
|
|
1714
|
+
filter: "Test string",
|
|
1715
|
+
pageSize: 42,
|
|
1716
|
+
pageToken: "Test string",
|
|
1717
|
+
parent: "Test string",
|
|
1718
|
+
});
|
|
1719
|
+
/** Updates the specified occurrence. */
|
|
1720
|
+
await gapi.client.containeranalysis.projects.occurrences.patch({
|
|
1721
|
+
name: "Test string",
|
|
1722
|
+
updateMask: "Test string",
|
|
1723
|
+
}, {
|
|
1724
|
+
attestation: {
|
|
1725
|
+
attestation: {
|
|
1726
|
+
genericSignedAttestation: {
|
|
1727
|
+
contentType: "Test string",
|
|
1728
|
+
serializedPayload: "Test string",
|
|
1729
|
+
signatures: [
|
|
1730
|
+
{
|
|
1731
|
+
publicKeyId: "Test string",
|
|
1732
|
+
signature: "Test string",
|
|
1733
|
+
}
|
|
1734
|
+
],
|
|
1735
|
+
},
|
|
1736
|
+
pgpSignedAttestation: {
|
|
1737
|
+
contentType: "Test string",
|
|
1738
|
+
pgpKeyId: "Test string",
|
|
1739
|
+
signature: "Test string",
|
|
1740
|
+
},
|
|
1741
|
+
},
|
|
1742
|
+
},
|
|
1743
|
+
build: {
|
|
1744
|
+
provenance: {
|
|
1745
|
+
builderVersion: "Test string",
|
|
1746
|
+
buildOptions: {
|
|
1747
|
+
A: "Test string"
|
|
1748
|
+
},
|
|
1749
|
+
builtArtifacts: [
|
|
1750
|
+
{
|
|
1751
|
+
checksum: "Test string",
|
|
1752
|
+
id: "Test string",
|
|
1753
|
+
names: [
|
|
1754
|
+
"Test string"
|
|
1755
|
+
],
|
|
1756
|
+
}
|
|
1757
|
+
],
|
|
1758
|
+
commands: [
|
|
1759
|
+
{
|
|
1760
|
+
args: [
|
|
1761
|
+
"Test string"
|
|
1762
|
+
],
|
|
1763
|
+
dir: "Test string",
|
|
1764
|
+
env: [
|
|
1765
|
+
"Test string"
|
|
1766
|
+
],
|
|
1767
|
+
id: "Test string",
|
|
1768
|
+
name: "Test string",
|
|
1769
|
+
waitFor: [
|
|
1770
|
+
"Test string"
|
|
1771
|
+
],
|
|
1772
|
+
}
|
|
1773
|
+
],
|
|
1774
|
+
createTime: "Test string",
|
|
1775
|
+
creator: "Test string",
|
|
1776
|
+
endTime: "Test string",
|
|
1777
|
+
id: "Test string",
|
|
1778
|
+
logsUri: "Test string",
|
|
1779
|
+
projectId: "Test string",
|
|
1780
|
+
sourceProvenance: {
|
|
1781
|
+
additionalContexts: [
|
|
1782
|
+
{
|
|
1783
|
+
cloudRepo: {
|
|
1784
|
+
aliasContext: {
|
|
1785
|
+
kind: "Test string",
|
|
1786
|
+
name: "Test string",
|
|
1787
|
+
},
|
|
1788
|
+
repoId: {
|
|
1789
|
+
projectRepoId: {
|
|
1790
|
+
projectId: "Test string",
|
|
1791
|
+
repoName: "Test string",
|
|
1792
|
+
},
|
|
1793
|
+
uid: "Test string",
|
|
1794
|
+
},
|
|
1795
|
+
revisionId: "Test string",
|
|
1796
|
+
},
|
|
1797
|
+
gerrit: {
|
|
1798
|
+
aliasContext: {
|
|
1799
|
+
kind: "Test string",
|
|
1800
|
+
name: "Test string",
|
|
1801
|
+
},
|
|
1802
|
+
gerritProject: "Test string",
|
|
1803
|
+
hostUri: "Test string",
|
|
1804
|
+
revisionId: "Test string",
|
|
1805
|
+
},
|
|
1806
|
+
git: {
|
|
1807
|
+
revisionId: "Test string",
|
|
1808
|
+
url: "Test string",
|
|
1809
|
+
},
|
|
1810
|
+
labels: {
|
|
1811
|
+
A: "Test string"
|
|
1812
|
+
},
|
|
1813
|
+
}
|
|
1814
|
+
],
|
|
1815
|
+
artifactStorageSourceUri: "Test string",
|
|
1816
|
+
context: {
|
|
1817
|
+
cloudRepo: {
|
|
1818
|
+
aliasContext: {
|
|
1819
|
+
kind: "Test string",
|
|
1820
|
+
name: "Test string",
|
|
1821
|
+
},
|
|
1822
|
+
repoId: {
|
|
1823
|
+
projectRepoId: {
|
|
1824
|
+
projectId: "Test string",
|
|
1825
|
+
repoName: "Test string",
|
|
1826
|
+
},
|
|
1827
|
+
uid: "Test string",
|
|
1828
|
+
},
|
|
1829
|
+
revisionId: "Test string",
|
|
1830
|
+
},
|
|
1831
|
+
gerrit: {
|
|
1832
|
+
aliasContext: {
|
|
1833
|
+
kind: "Test string",
|
|
1834
|
+
name: "Test string",
|
|
1835
|
+
},
|
|
1836
|
+
gerritProject: "Test string",
|
|
1837
|
+
hostUri: "Test string",
|
|
1838
|
+
revisionId: "Test string",
|
|
1839
|
+
},
|
|
1840
|
+
git: {
|
|
1841
|
+
revisionId: "Test string",
|
|
1842
|
+
url: "Test string",
|
|
1843
|
+
},
|
|
1844
|
+
labels: {
|
|
1845
|
+
A: "Test string"
|
|
1846
|
+
},
|
|
1847
|
+
},
|
|
1848
|
+
fileHashes: {
|
|
1849
|
+
A: {
|
|
1850
|
+
fileHash: [
|
|
1851
|
+
{
|
|
1852
|
+
type: "Test string",
|
|
1853
|
+
value: "Test string",
|
|
1854
|
+
}
|
|
1855
|
+
],
|
|
1856
|
+
}
|
|
1857
|
+
},
|
|
1858
|
+
},
|
|
1859
|
+
startTime: "Test string",
|
|
1860
|
+
triggerId: "Test string",
|
|
1861
|
+
},
|
|
1862
|
+
provenanceBytes: "Test string",
|
|
1863
|
+
},
|
|
1864
|
+
createTime: "Test string",
|
|
1865
|
+
deployment: {
|
|
1866
|
+
deployment: {
|
|
1867
|
+
address: "Test string",
|
|
1868
|
+
config: "Test string",
|
|
1869
|
+
deployTime: "Test string",
|
|
1870
|
+
platform: "Test string",
|
|
1871
|
+
resourceUri: [
|
|
1872
|
+
"Test string"
|
|
1873
|
+
],
|
|
1874
|
+
undeployTime: "Test string",
|
|
1875
|
+
userEmail: "Test string",
|
|
1876
|
+
},
|
|
1877
|
+
},
|
|
1878
|
+
derivedImage: {
|
|
1879
|
+
derivedImage: {
|
|
1880
|
+
baseResourceUrl: "Test string",
|
|
1881
|
+
distance: 42,
|
|
1882
|
+
fingerprint: {
|
|
1883
|
+
v1Name: "Test string",
|
|
1884
|
+
v2Blob: [
|
|
1885
|
+
"Test string"
|
|
1886
|
+
],
|
|
1887
|
+
v2Name: "Test string",
|
|
1888
|
+
},
|
|
1889
|
+
layerInfo: [
|
|
1890
|
+
{
|
|
1891
|
+
arguments: "Test string",
|
|
1892
|
+
directive: "Test string",
|
|
1893
|
+
}
|
|
1894
|
+
],
|
|
1895
|
+
},
|
|
1896
|
+
},
|
|
1897
|
+
discovered: {
|
|
1898
|
+
discovered: {
|
|
1899
|
+
analysisCompleted: {
|
|
1900
|
+
analysisType: [
|
|
1901
|
+
"Test string"
|
|
1902
|
+
],
|
|
1903
|
+
},
|
|
1904
|
+
analysisError: [
|
|
1905
|
+
{
|
|
1906
|
+
code: 42,
|
|
1907
|
+
details: [
|
|
1908
|
+
{
|
|
1909
|
+
A: 42
|
|
1910
|
+
}
|
|
1911
|
+
],
|
|
1912
|
+
message: "Test string",
|
|
1913
|
+
}
|
|
1914
|
+
],
|
|
1915
|
+
analysisStatus: "Test string",
|
|
1916
|
+
analysisStatusError: {
|
|
1917
|
+
code: 42,
|
|
1918
|
+
details: [
|
|
1919
|
+
{
|
|
1920
|
+
A: 42
|
|
1921
|
+
}
|
|
1922
|
+
],
|
|
1923
|
+
message: "Test string",
|
|
1924
|
+
},
|
|
1925
|
+
continuousAnalysis: "Test string",
|
|
1926
|
+
lastAnalysisTime: "Test string",
|
|
1927
|
+
},
|
|
1928
|
+
},
|
|
1929
|
+
envelope: {
|
|
1930
|
+
payload: "Test string",
|
|
1931
|
+
payloadType: "Test string",
|
|
1932
|
+
signatures: [
|
|
1933
|
+
{
|
|
1934
|
+
keyid: "Test string",
|
|
1935
|
+
sig: "Test string",
|
|
1936
|
+
}
|
|
1937
|
+
],
|
|
1938
|
+
},
|
|
1939
|
+
installation: {
|
|
1940
|
+
installation: {
|
|
1941
|
+
architecture: "Test string",
|
|
1942
|
+
cpeUri: "Test string",
|
|
1943
|
+
license: {
|
|
1944
|
+
comments: "Test string",
|
|
1945
|
+
expression: "Test string",
|
|
1946
|
+
},
|
|
1947
|
+
location: [
|
|
1948
|
+
{
|
|
1949
|
+
cpeUri: "Test string",
|
|
1950
|
+
path: "Test string",
|
|
1951
|
+
version: {
|
|
1952
|
+
epoch: 42,
|
|
1953
|
+
inclusive: true,
|
|
1954
|
+
kind: "Test string",
|
|
1955
|
+
name: "Test string",
|
|
1956
|
+
revision: "Test string",
|
|
1957
|
+
},
|
|
1958
|
+
}
|
|
1959
|
+
],
|
|
1960
|
+
name: "Test string",
|
|
1961
|
+
packageType: "Test string",
|
|
1962
|
+
version: {
|
|
1963
|
+
epoch: 42,
|
|
1964
|
+
inclusive: true,
|
|
1965
|
+
kind: "Test string",
|
|
1966
|
+
name: "Test string",
|
|
1967
|
+
revision: "Test string",
|
|
1968
|
+
},
|
|
1969
|
+
},
|
|
1970
|
+
},
|
|
1971
|
+
intoto: {
|
|
1972
|
+
signatures: [
|
|
1973
|
+
{
|
|
1974
|
+
keyid: "Test string",
|
|
1975
|
+
sig: "Test string",
|
|
1976
|
+
}
|
|
1977
|
+
],
|
|
1978
|
+
signed: {
|
|
1979
|
+
byproducts: {
|
|
1980
|
+
customValues: {
|
|
1981
|
+
A: "Test string"
|
|
1982
|
+
},
|
|
1983
|
+
},
|
|
1984
|
+
command: [
|
|
1985
|
+
"Test string"
|
|
1986
|
+
],
|
|
1987
|
+
environment: {
|
|
1988
|
+
customValues: {
|
|
1989
|
+
A: "Test string"
|
|
1990
|
+
},
|
|
1991
|
+
},
|
|
1992
|
+
materials: [
|
|
1993
|
+
{
|
|
1994
|
+
hashes: {
|
|
1995
|
+
sha256: "Test string",
|
|
1996
|
+
},
|
|
1997
|
+
resourceUri: "Test string",
|
|
1998
|
+
}
|
|
1999
|
+
],
|
|
2000
|
+
products: [
|
|
2001
|
+
{
|
|
2002
|
+
hashes: {
|
|
2003
|
+
sha256: "Test string",
|
|
2004
|
+
},
|
|
2005
|
+
resourceUri: "Test string",
|
|
2006
|
+
}
|
|
2007
|
+
],
|
|
2008
|
+
},
|
|
2009
|
+
},
|
|
2010
|
+
kind: "Test string",
|
|
2011
|
+
name: "Test string",
|
|
2012
|
+
noteName: "Test string",
|
|
2013
|
+
remediation: "Test string",
|
|
2014
|
+
resource: {
|
|
2015
|
+
contentHash: {
|
|
2016
|
+
type: "Test string",
|
|
2017
|
+
value: "Test string",
|
|
2018
|
+
},
|
|
2019
|
+
name: "Test string",
|
|
2020
|
+
uri: "Test string",
|
|
2021
|
+
},
|
|
2022
|
+
sbom: {
|
|
2023
|
+
createTime: "Test string",
|
|
2024
|
+
creatorComment: "Test string",
|
|
2025
|
+
creators: [
|
|
2026
|
+
"Test string"
|
|
2027
|
+
],
|
|
2028
|
+
documentComment: "Test string",
|
|
2029
|
+
externalDocumentRefs: [
|
|
2030
|
+
"Test string"
|
|
2031
|
+
],
|
|
2032
|
+
id: "Test string",
|
|
2033
|
+
licenseListVersion: "Test string",
|
|
2034
|
+
namespace: "Test string",
|
|
2035
|
+
title: "Test string",
|
|
2036
|
+
},
|
|
2037
|
+
spdxFile: {
|
|
2038
|
+
attributions: [
|
|
2039
|
+
"Test string"
|
|
2040
|
+
],
|
|
2041
|
+
comment: "Test string",
|
|
2042
|
+
contributors: [
|
|
2043
|
+
"Test string"
|
|
2044
|
+
],
|
|
2045
|
+
copyright: "Test string",
|
|
2046
|
+
filesLicenseInfo: [
|
|
2047
|
+
"Test string"
|
|
2048
|
+
],
|
|
2049
|
+
id: "Test string",
|
|
2050
|
+
licenseConcluded: {
|
|
2051
|
+
comments: "Test string",
|
|
2052
|
+
expression: "Test string",
|
|
2053
|
+
},
|
|
2054
|
+
notice: "Test string",
|
|
2055
|
+
},
|
|
2056
|
+
spdxPackage: {
|
|
2057
|
+
comment: "Test string",
|
|
2058
|
+
filename: "Test string",
|
|
2059
|
+
homePage: "Test string",
|
|
2060
|
+
id: "Test string",
|
|
2061
|
+
licenseConcluded: {
|
|
2062
|
+
comments: "Test string",
|
|
2063
|
+
expression: "Test string",
|
|
2064
|
+
},
|
|
2065
|
+
packageType: "Test string",
|
|
2066
|
+
sourceInfo: "Test string",
|
|
2067
|
+
summaryDescription: "Test string",
|
|
2068
|
+
title: "Test string",
|
|
2069
|
+
version: "Test string",
|
|
2070
|
+
},
|
|
2071
|
+
spdxRelationship: {
|
|
2072
|
+
comment: "Test string",
|
|
2073
|
+
source: "Test string",
|
|
2074
|
+
target: "Test string",
|
|
2075
|
+
type: "Test string",
|
|
2076
|
+
},
|
|
2077
|
+
updateTime: "Test string",
|
|
2078
|
+
vulnerability: {
|
|
2079
|
+
cvssScore: 42,
|
|
2080
|
+
effectiveSeverity: "Test string",
|
|
2081
|
+
longDescription: "Test string",
|
|
2082
|
+
packageIssue: [
|
|
2083
|
+
{
|
|
2084
|
+
affectedLocation: {
|
|
2085
|
+
cpeUri: "Test string",
|
|
2086
|
+
package: "Test string",
|
|
2087
|
+
version: {
|
|
2088
|
+
epoch: 42,
|
|
2089
|
+
inclusive: true,
|
|
2090
|
+
kind: "Test string",
|
|
2091
|
+
name: "Test string",
|
|
2092
|
+
revision: "Test string",
|
|
2093
|
+
},
|
|
2094
|
+
},
|
|
2095
|
+
effectiveSeverity: "Test string",
|
|
2096
|
+
fixedLocation: {
|
|
2097
|
+
cpeUri: "Test string",
|
|
2098
|
+
package: "Test string",
|
|
2099
|
+
version: {
|
|
2100
|
+
epoch: 42,
|
|
2101
|
+
inclusive: true,
|
|
2102
|
+
kind: "Test string",
|
|
2103
|
+
name: "Test string",
|
|
2104
|
+
revision: "Test string",
|
|
2105
|
+
},
|
|
2106
|
+
},
|
|
2107
|
+
packageType: "Test string",
|
|
2108
|
+
severityName: "Test string",
|
|
2109
|
+
}
|
|
2110
|
+
],
|
|
2111
|
+
relatedUrls: [
|
|
2112
|
+
{
|
|
2113
|
+
label: "Test string",
|
|
2114
|
+
url: "Test string",
|
|
2115
|
+
}
|
|
2116
|
+
],
|
|
2117
|
+
severity: "Test string",
|
|
2118
|
+
shortDescription: "Test string",
|
|
2119
|
+
type: "Test string",
|
|
2120
|
+
},
|
|
2121
|
+
});
|
|
2122
|
+
/**
|
|
2123
|
+
* Sets the access control policy on the specified note or occurrence. Requires `containeranalysis.notes.setIamPolicy` or `containeranalysis.occurrences.setIamPolicy` permission if the
|
|
2124
|
+
* resource is a note or an occurrence, respectively. The resource takes the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and
|
|
2125
|
+
* `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
|
|
2126
|
+
*/
|
|
2127
|
+
await gapi.client.containeranalysis.projects.occurrences.setIamPolicy({
|
|
2128
|
+
resource: "Test string",
|
|
2129
|
+
}, {
|
|
2130
|
+
policy: {
|
|
2131
|
+
bindings: [
|
|
2132
|
+
{
|
|
2133
|
+
condition: {
|
|
2134
|
+
description: "Test string",
|
|
2135
|
+
expression: "Test string",
|
|
2136
|
+
location: "Test string",
|
|
2137
|
+
title: "Test string",
|
|
2138
|
+
},
|
|
2139
|
+
members: [
|
|
2140
|
+
"Test string"
|
|
2141
|
+
],
|
|
2142
|
+
role: "Test string",
|
|
2143
|
+
}
|
|
2144
|
+
],
|
|
2145
|
+
etag: "Test string",
|
|
2146
|
+
version: 42,
|
|
2147
|
+
},
|
|
2148
|
+
});
|
|
2149
|
+
/**
|
|
2150
|
+
* Returns the permissions that a caller has on the specified note or occurrence. Requires list permission on the project (for example, `containeranalysis.notes.list`). The resource takes
|
|
2151
|
+
* the format `projects/[PROJECT_ID]/notes/[NOTE_ID]` for notes and `projects/[PROJECT_ID]/occurrences/[OCCURRENCE_ID]` for occurrences.
|
|
2152
|
+
*/
|
|
2153
|
+
await gapi.client.containeranalysis.projects.occurrences.testIamPermissions({
|
|
2154
|
+
resource: "Test string",
|
|
2155
|
+
}, {
|
|
2156
|
+
permissions: [
|
|
2157
|
+
"Test string"
|
|
2158
|
+
],
|
|
2159
|
+
});
|
|
2160
|
+
/** Gets the specified scan configuration. */
|
|
2161
|
+
await gapi.client.containeranalysis.projects.scanConfigs.get({
|
|
2162
|
+
name: "Test string",
|
|
2163
|
+
});
|
|
2164
|
+
/** Lists scan configurations for the specified project. */
|
|
2165
|
+
await gapi.client.containeranalysis.projects.scanConfigs.list({
|
|
2166
|
+
filter: "Test string",
|
|
2167
|
+
pageSize: 42,
|
|
2168
|
+
pageToken: "Test string",
|
|
2169
|
+
parent: "Test string",
|
|
2170
|
+
});
|
|
2171
|
+
/** Updates the specified scan configuration. */
|
|
2172
|
+
await gapi.client.containeranalysis.projects.scanConfigs.update({
|
|
2173
|
+
name: "Test string",
|
|
2174
|
+
}, {
|
|
2175
|
+
createTime: "Test string",
|
|
2176
|
+
description: "Test string",
|
|
2177
|
+
enabled: true,
|
|
2178
|
+
name: "Test string",
|
|
2179
|
+
updateTime: "Test string",
|
|
2180
|
+
});
|
|
2181
|
+
}
|
|
2182
|
+
});
|