@google-cloud/containeranalysis 5.5.0 → 6.0.0
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/CHANGELOG.md +28 -0
- package/build/protos/google/devtools/containeranalysis/v1/containeranalysis.proto +2 -2
- package/build/protos/google/devtools/containeranalysis/v1beta1/containeranalysis.proto +1 -1
- package/build/protos/grafeas/v1/compliance.proto +2 -0
- package/build/protos/grafeas/v1/discovery.proto +25 -0
- package/build/protos/grafeas/v1/grafeas.proto +30 -0
- package/build/protos/protos.d.ts +132 -1
- package/build/protos/protos.js +354 -2
- package/build/protos/protos.json +86 -9
- package/build/src/index.js +1 -1
- package/build/src/v1/container_analysis_client.d.ts +2 -1
- package/build/src/v1/container_analysis_client.js +94 -31
- package/build/src/v1/container_analysis_proto_list.json +24 -0
- package/build/src/v1/gapic_metadata.json +229 -0
- package/build/src/v1/grafeas_proto_list.json +24 -0
- package/build/src/v1beta1/container_analysis_v1_beta1_client.d.ts +2 -1
- package/build/src/v1beta1/container_analysis_v1_beta1_client.js +107 -34
- package/build/src/v1beta1/container_analysis_v1_beta1_proto_list.json +15 -0
- package/build/src/v1beta1/gapic_metadata.json +249 -0
- package/build/src/v1beta1/grafeas_v1_beta1_client.d.ts +5 -5
- package/build/src/v1beta1/grafeas_v1_beta1_client.js +262 -79
- package/build/src/v1beta1/grafeas_v1_beta1_proto_list.json +15 -0
- package/package.json +17 -17
package/build/protos/protos.json
CHANGED
|
@@ -1114,6 +1114,10 @@
|
|
|
1114
1114
|
"nonComplianceReason": {
|
|
1115
1115
|
"type": "string",
|
|
1116
1116
|
"id": 3
|
|
1117
|
+
},
|
|
1118
|
+
"version": {
|
|
1119
|
+
"type": "grafeas.v1.ComplianceVersion",
|
|
1120
|
+
"id": 4
|
|
1117
1121
|
}
|
|
1118
1122
|
}
|
|
1119
1123
|
},
|
|
@@ -1448,6 +1452,10 @@
|
|
|
1448
1452
|
"sbomStatus": {
|
|
1449
1453
|
"type": "SBOMStatus",
|
|
1450
1454
|
"id": 9
|
|
1455
|
+
},
|
|
1456
|
+
"vulnerabilityAttestation": {
|
|
1457
|
+
"type": "VulnerabilityAttestation",
|
|
1458
|
+
"id": 10
|
|
1451
1459
|
}
|
|
1452
1460
|
},
|
|
1453
1461
|
"nested": {
|
|
@@ -1501,6 +1509,31 @@
|
|
|
1501
1509
|
}
|
|
1502
1510
|
}
|
|
1503
1511
|
}
|
|
1512
|
+
},
|
|
1513
|
+
"VulnerabilityAttestation": {
|
|
1514
|
+
"fields": {
|
|
1515
|
+
"lastAttemptTime": {
|
|
1516
|
+
"type": "google.protobuf.Timestamp",
|
|
1517
|
+
"id": 1
|
|
1518
|
+
},
|
|
1519
|
+
"state": {
|
|
1520
|
+
"type": "VulnerabilityAttestationState",
|
|
1521
|
+
"id": 2
|
|
1522
|
+
},
|
|
1523
|
+
"error": {
|
|
1524
|
+
"type": "string",
|
|
1525
|
+
"id": 3
|
|
1526
|
+
}
|
|
1527
|
+
},
|
|
1528
|
+
"nested": {
|
|
1529
|
+
"VulnerabilityAttestationState": {
|
|
1530
|
+
"values": {
|
|
1531
|
+
"VULNERABILITY_ATTESTATION_STATE_UNSPECIFIED": 0,
|
|
1532
|
+
"SUCCESS": 1,
|
|
1533
|
+
"FAILURE": 2
|
|
1534
|
+
}
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1504
1537
|
}
|
|
1505
1538
|
}
|
|
1506
1539
|
},
|
|
@@ -1595,12 +1628,16 @@
|
|
|
1595
1628
|
"responseType": "google.protobuf.Empty",
|
|
1596
1629
|
"options": {
|
|
1597
1630
|
"(google.api.http).delete": "/v1/{name=projects/*/occurrences/*}",
|
|
1631
|
+
"(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/occurrences/*}",
|
|
1598
1632
|
"(google.api.method_signature)": "name"
|
|
1599
1633
|
},
|
|
1600
1634
|
"parsedOptions": [
|
|
1601
1635
|
{
|
|
1602
1636
|
"(google.api.http)": {
|
|
1603
|
-
"delete": "/v1/{name=projects/*/occurrences/*}"
|
|
1637
|
+
"delete": "/v1/{name=projects/*/occurrences/*}",
|
|
1638
|
+
"additional_bindings": {
|
|
1639
|
+
"delete": "/v1/{name=projects/*/locations/*/occurrences/*}"
|
|
1640
|
+
}
|
|
1604
1641
|
}
|
|
1605
1642
|
},
|
|
1606
1643
|
{
|
|
@@ -1614,13 +1651,19 @@
|
|
|
1614
1651
|
"options": {
|
|
1615
1652
|
"(google.api.http).post": "/v1/{parent=projects/*}/occurrences",
|
|
1616
1653
|
"(google.api.http).body": "occurrence",
|
|
1654
|
+
"(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/occurrences",
|
|
1655
|
+
"(google.api.http).additional_bindings.body": "occurrence",
|
|
1617
1656
|
"(google.api.method_signature)": "parent,occurrence"
|
|
1618
1657
|
},
|
|
1619
1658
|
"parsedOptions": [
|
|
1620
1659
|
{
|
|
1621
1660
|
"(google.api.http)": {
|
|
1622
1661
|
"post": "/v1/{parent=projects/*}/occurrences",
|
|
1623
|
-
"body": "occurrence"
|
|
1662
|
+
"body": "occurrence",
|
|
1663
|
+
"additional_bindings": {
|
|
1664
|
+
"post": "/v1/{parent=projects/*/locations/*}/occurrences",
|
|
1665
|
+
"body": "occurrence"
|
|
1666
|
+
}
|
|
1624
1667
|
}
|
|
1625
1668
|
},
|
|
1626
1669
|
{
|
|
@@ -1634,13 +1677,19 @@
|
|
|
1634
1677
|
"options": {
|
|
1635
1678
|
"(google.api.http).post": "/v1/{parent=projects/*}/occurrences:batchCreate",
|
|
1636
1679
|
"(google.api.http).body": "*",
|
|
1680
|
+
"(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/occurrences:batchCreate",
|
|
1681
|
+
"(google.api.http).additional_bindings.body": "*",
|
|
1637
1682
|
"(google.api.method_signature)": "parent,occurrences"
|
|
1638
1683
|
},
|
|
1639
1684
|
"parsedOptions": [
|
|
1640
1685
|
{
|
|
1641
1686
|
"(google.api.http)": {
|
|
1642
1687
|
"post": "/v1/{parent=projects/*}/occurrences:batchCreate",
|
|
1643
|
-
"body": "*"
|
|
1688
|
+
"body": "*",
|
|
1689
|
+
"additional_bindings": {
|
|
1690
|
+
"post": "/v1/{parent=projects/*/locations/*}/occurrences:batchCreate",
|
|
1691
|
+
"body": "*"
|
|
1692
|
+
}
|
|
1644
1693
|
}
|
|
1645
1694
|
},
|
|
1646
1695
|
{
|
|
@@ -1654,13 +1703,19 @@
|
|
|
1654
1703
|
"options": {
|
|
1655
1704
|
"(google.api.http).patch": "/v1/{name=projects/*/occurrences/*}",
|
|
1656
1705
|
"(google.api.http).body": "occurrence",
|
|
1706
|
+
"(google.api.http).additional_bindings.patch": "/v1/{name=projects/*/locations/*/occurrences/*}",
|
|
1707
|
+
"(google.api.http).additional_bindings.body": "occurrence",
|
|
1657
1708
|
"(google.api.method_signature)": "name,occurrence,update_mask"
|
|
1658
1709
|
},
|
|
1659
1710
|
"parsedOptions": [
|
|
1660
1711
|
{
|
|
1661
1712
|
"(google.api.http)": {
|
|
1662
1713
|
"patch": "/v1/{name=projects/*/occurrences/*}",
|
|
1663
|
-
"body": "occurrence"
|
|
1714
|
+
"body": "occurrence",
|
|
1715
|
+
"additional_bindings": {
|
|
1716
|
+
"patch": "/v1/{name=projects/*/locations/*/occurrences/*}",
|
|
1717
|
+
"body": "occurrence"
|
|
1718
|
+
}
|
|
1664
1719
|
}
|
|
1665
1720
|
},
|
|
1666
1721
|
{
|
|
@@ -1739,12 +1794,16 @@
|
|
|
1739
1794
|
"responseType": "google.protobuf.Empty",
|
|
1740
1795
|
"options": {
|
|
1741
1796
|
"(google.api.http).delete": "/v1/{name=projects/*/notes/*}",
|
|
1797
|
+
"(google.api.http).additional_bindings.delete": "/v1/{name=projects/*/locations/*/notes/*}",
|
|
1742
1798
|
"(google.api.method_signature)": "name"
|
|
1743
1799
|
},
|
|
1744
1800
|
"parsedOptions": [
|
|
1745
1801
|
{
|
|
1746
1802
|
"(google.api.http)": {
|
|
1747
|
-
"delete": "/v1/{name=projects/*/notes/*}"
|
|
1803
|
+
"delete": "/v1/{name=projects/*/notes/*}",
|
|
1804
|
+
"additional_bindings": {
|
|
1805
|
+
"delete": "/v1/{name=projects/*/locations/*/notes/*}"
|
|
1806
|
+
}
|
|
1748
1807
|
}
|
|
1749
1808
|
},
|
|
1750
1809
|
{
|
|
@@ -1758,13 +1817,19 @@
|
|
|
1758
1817
|
"options": {
|
|
1759
1818
|
"(google.api.http).post": "/v1/{parent=projects/*}/notes",
|
|
1760
1819
|
"(google.api.http).body": "note",
|
|
1820
|
+
"(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/notes",
|
|
1821
|
+
"(google.api.http).additional_bindings.body": "note",
|
|
1761
1822
|
"(google.api.method_signature)": "parent,note_id,note"
|
|
1762
1823
|
},
|
|
1763
1824
|
"parsedOptions": [
|
|
1764
1825
|
{
|
|
1765
1826
|
"(google.api.http)": {
|
|
1766
1827
|
"post": "/v1/{parent=projects/*}/notes",
|
|
1767
|
-
"body": "note"
|
|
1828
|
+
"body": "note",
|
|
1829
|
+
"additional_bindings": {
|
|
1830
|
+
"post": "/v1/{parent=projects/*/locations/*}/notes",
|
|
1831
|
+
"body": "note"
|
|
1832
|
+
}
|
|
1768
1833
|
}
|
|
1769
1834
|
},
|
|
1770
1835
|
{
|
|
@@ -1778,13 +1843,19 @@
|
|
|
1778
1843
|
"options": {
|
|
1779
1844
|
"(google.api.http).post": "/v1/{parent=projects/*}/notes:batchCreate",
|
|
1780
1845
|
"(google.api.http).body": "*",
|
|
1846
|
+
"(google.api.http).additional_bindings.post": "/v1/{parent=projects/*/locations/*}/notes:batchCreate",
|
|
1847
|
+
"(google.api.http).additional_bindings.body": "*",
|
|
1781
1848
|
"(google.api.method_signature)": "parent,notes"
|
|
1782
1849
|
},
|
|
1783
1850
|
"parsedOptions": [
|
|
1784
1851
|
{
|
|
1785
1852
|
"(google.api.http)": {
|
|
1786
1853
|
"post": "/v1/{parent=projects/*}/notes:batchCreate",
|
|
1787
|
-
"body": "*"
|
|
1854
|
+
"body": "*",
|
|
1855
|
+
"additional_bindings": {
|
|
1856
|
+
"post": "/v1/{parent=projects/*/locations/*}/notes:batchCreate",
|
|
1857
|
+
"body": "*"
|
|
1858
|
+
}
|
|
1788
1859
|
}
|
|
1789
1860
|
},
|
|
1790
1861
|
{
|
|
@@ -1798,13 +1869,19 @@
|
|
|
1798
1869
|
"options": {
|
|
1799
1870
|
"(google.api.http).patch": "/v1/{name=projects/*/notes/*}",
|
|
1800
1871
|
"(google.api.http).body": "note",
|
|
1872
|
+
"(google.api.http).additional_bindings.patch": "/v1/{name=projects/*/locations/*/notes/*}",
|
|
1873
|
+
"(google.api.http).additional_bindings.body": "note",
|
|
1801
1874
|
"(google.api.method_signature)": "name,note,update_mask"
|
|
1802
1875
|
},
|
|
1803
1876
|
"parsedOptions": [
|
|
1804
1877
|
{
|
|
1805
1878
|
"(google.api.http)": {
|
|
1806
1879
|
"patch": "/v1/{name=projects/*/notes/*}",
|
|
1807
|
-
"body": "note"
|
|
1880
|
+
"body": "note",
|
|
1881
|
+
"additional_bindings": {
|
|
1882
|
+
"patch": "/v1/{name=projects/*/locations/*/notes/*}",
|
|
1883
|
+
"body": "note"
|
|
1884
|
+
}
|
|
1808
1885
|
}
|
|
1809
1886
|
},
|
|
1810
1887
|
{
|
|
@@ -5200,7 +5277,7 @@
|
|
|
5200
5277
|
"v1": {
|
|
5201
5278
|
"options": {
|
|
5202
5279
|
"csharp_namespace": "Google.Cloud.DevTools.ContainerAnalysis.V1",
|
|
5203
|
-
"go_package": "google.
|
|
5280
|
+
"go_package": "cloud.google.com/go/containeranalysis/apiv1/containeranalysispb;containeranalysispb",
|
|
5204
5281
|
"java_multiple_files": true,
|
|
5205
5282
|
"java_package": "com.google.containeranalysis.v1",
|
|
5206
5283
|
"objc_class_prefix": "GCA",
|
package/build/src/index.js
CHANGED
|
@@ -28,6 +28,7 @@ export declare class ContainerAnalysisClient {
|
|
|
28
28
|
private _defaults;
|
|
29
29
|
private _universeDomain;
|
|
30
30
|
private _servicePath;
|
|
31
|
+
private _log;
|
|
31
32
|
auth: gax.GoogleAuth;
|
|
32
33
|
descriptors: Descriptors;
|
|
33
34
|
warn: (code: string, message: string, warnType?: string) => void;
|
|
@@ -62,7 +63,7 @@ export declare class ContainerAnalysisClient {
|
|
|
62
63
|
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
63
64
|
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
64
65
|
* app is running in an environment which supports
|
|
65
|
-
* {@link https://
|
|
66
|
+
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
|
|
66
67
|
* your project ID will be detected automatically.
|
|
67
68
|
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
68
69
|
* API remote host.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Copyright
|
|
2
|
+
// Copyright 2025 Google LLC
|
|
3
3
|
//
|
|
4
4
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
// you may not use this file except in compliance with the License.
|
|
@@ -20,6 +20,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
20
20
|
exports.ContainerAnalysisClient = void 0;
|
|
21
21
|
const grafeas_1 = require("@google-cloud/grafeas");
|
|
22
22
|
const jsonProtos = require("../../protos/protos.json");
|
|
23
|
+
const google_gax_1 = require("google-gax");
|
|
23
24
|
/**
|
|
24
25
|
* Client JSON configuration object, loaded from
|
|
25
26
|
* `src/v1/container_analysis_client_config.json`.
|
|
@@ -45,6 +46,27 @@ const version = require('../../../package.json').version;
|
|
|
45
46
|
* @memberof v1
|
|
46
47
|
*/
|
|
47
48
|
class ContainerAnalysisClient {
|
|
49
|
+
_terminated = false;
|
|
50
|
+
_opts;
|
|
51
|
+
_providedCustomServicePath;
|
|
52
|
+
_gaxModule;
|
|
53
|
+
_gaxGrpc;
|
|
54
|
+
_protos;
|
|
55
|
+
_defaults;
|
|
56
|
+
_universeDomain;
|
|
57
|
+
_servicePath;
|
|
58
|
+
_log = google_gax_1.loggingUtils.log('containeranalysis');
|
|
59
|
+
auth;
|
|
60
|
+
descriptors = {
|
|
61
|
+
page: {},
|
|
62
|
+
stream: {},
|
|
63
|
+
longrunning: {},
|
|
64
|
+
batching: {},
|
|
65
|
+
};
|
|
66
|
+
warn;
|
|
67
|
+
innerApiCalls;
|
|
68
|
+
pathTemplates;
|
|
69
|
+
containerAnalysisStub;
|
|
48
70
|
/**
|
|
49
71
|
* Construct an instance of ContainerAnalysisClient.
|
|
50
72
|
*
|
|
@@ -67,7 +89,7 @@ class ContainerAnalysisClient {
|
|
|
67
89
|
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
|
|
68
90
|
* the environment variable GCLOUD_PROJECT for your project ID. If your
|
|
69
91
|
* app is running in an environment which supports
|
|
70
|
-
* {@link https://
|
|
92
|
+
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
|
|
71
93
|
* your project ID will be detected automatically.
|
|
72
94
|
* @param {string} [options.apiEndpoint] - The domain name of the
|
|
73
95
|
* API remote host.
|
|
@@ -85,32 +107,28 @@ class ContainerAnalysisClient {
|
|
|
85
107
|
* ```
|
|
86
108
|
*/
|
|
87
109
|
constructor(opts, gaxInstance) {
|
|
88
|
-
var _a, _b, _c, _d, _e;
|
|
89
|
-
this._terminated = false;
|
|
90
|
-
this.descriptors = {
|
|
91
|
-
page: {},
|
|
92
|
-
stream: {},
|
|
93
|
-
longrunning: {},
|
|
94
|
-
batching: {},
|
|
95
|
-
};
|
|
96
110
|
// Ensure that options include all the required fields.
|
|
97
111
|
const staticMembers = this.constructor;
|
|
98
|
-
if (
|
|
99
|
-
|
|
100
|
-
|
|
112
|
+
if (opts?.universe_domain &&
|
|
113
|
+
opts?.universeDomain &&
|
|
114
|
+
opts?.universe_domain !== opts?.universeDomain) {
|
|
101
115
|
throw new Error('Please set either universe_domain or universeDomain, but not both.');
|
|
102
116
|
}
|
|
103
117
|
const universeDomainEnvVar = typeof process === 'object' && typeof process.env === 'object'
|
|
104
118
|
? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']
|
|
105
119
|
: undefined;
|
|
106
120
|
this._universeDomain =
|
|
107
|
-
|
|
121
|
+
opts?.universeDomain ??
|
|
122
|
+
opts?.universe_domain ??
|
|
123
|
+
universeDomainEnvVar ??
|
|
124
|
+
'googleapis.com';
|
|
108
125
|
this._servicePath = 'containeranalysis.' + this._universeDomain;
|
|
109
|
-
const servicePath =
|
|
110
|
-
this._providedCustomServicePath = !!(
|
|
111
|
-
const port =
|
|
112
|
-
const clientConfig =
|
|
113
|
-
const fallback =
|
|
126
|
+
const servicePath = opts?.servicePath || opts?.apiEndpoint || this._servicePath;
|
|
127
|
+
this._providedCustomServicePath = !!(opts?.servicePath || opts?.apiEndpoint);
|
|
128
|
+
const port = opts?.port || staticMembers.port;
|
|
129
|
+
const clientConfig = opts?.clientConfig ?? {};
|
|
130
|
+
const fallback = opts?.fallback ??
|
|
131
|
+
(typeof window !== 'undefined' && typeof window?.fetch === 'function');
|
|
114
132
|
opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts);
|
|
115
133
|
// Request numeric enum values if REST transport is used.
|
|
116
134
|
opts.numericEnums = true;
|
|
@@ -282,7 +300,6 @@ class ContainerAnalysisClient {
|
|
|
282
300
|
return this.auth.getProjectId();
|
|
283
301
|
}
|
|
284
302
|
setIamPolicy(request, optionsOrCallback, callback) {
|
|
285
|
-
var _a;
|
|
286
303
|
request = request || {};
|
|
287
304
|
let options;
|
|
288
305
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -297,13 +314,24 @@ class ContainerAnalysisClient {
|
|
|
297
314
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
298
315
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
299
316
|
this._gaxModule.routingHeader.fromParams({
|
|
300
|
-
resource:
|
|
317
|
+
resource: request.resource ?? '',
|
|
301
318
|
});
|
|
302
319
|
this.initialize();
|
|
303
|
-
|
|
320
|
+
this._log.info('setIamPolicy request %j', request);
|
|
321
|
+
const wrappedCallback = callback
|
|
322
|
+
? (error, response, options, rawResponse) => {
|
|
323
|
+
this._log.info('setIamPolicy response %j', response);
|
|
324
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
325
|
+
}
|
|
326
|
+
: undefined;
|
|
327
|
+
return this.innerApiCalls
|
|
328
|
+
.setIamPolicy(request, options, wrappedCallback)
|
|
329
|
+
?.then(([response, options, rawResponse]) => {
|
|
330
|
+
this._log.info('setIamPolicy response %j', response);
|
|
331
|
+
return [response, options, rawResponse];
|
|
332
|
+
});
|
|
304
333
|
}
|
|
305
334
|
getIamPolicy(request, optionsOrCallback, callback) {
|
|
306
|
-
var _a;
|
|
307
335
|
request = request || {};
|
|
308
336
|
let options;
|
|
309
337
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -318,13 +346,24 @@ class ContainerAnalysisClient {
|
|
|
318
346
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
319
347
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
320
348
|
this._gaxModule.routingHeader.fromParams({
|
|
321
|
-
resource:
|
|
349
|
+
resource: request.resource ?? '',
|
|
322
350
|
});
|
|
323
351
|
this.initialize();
|
|
324
|
-
|
|
352
|
+
this._log.info('getIamPolicy request %j', request);
|
|
353
|
+
const wrappedCallback = callback
|
|
354
|
+
? (error, response, options, rawResponse) => {
|
|
355
|
+
this._log.info('getIamPolicy response %j', response);
|
|
356
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
357
|
+
}
|
|
358
|
+
: undefined;
|
|
359
|
+
return this.innerApiCalls
|
|
360
|
+
.getIamPolicy(request, options, wrappedCallback)
|
|
361
|
+
?.then(([response, options, rawResponse]) => {
|
|
362
|
+
this._log.info('getIamPolicy response %j', response);
|
|
363
|
+
return [response, options, rawResponse];
|
|
364
|
+
});
|
|
325
365
|
}
|
|
326
366
|
testIamPermissions(request, optionsOrCallback, callback) {
|
|
327
|
-
var _a;
|
|
328
367
|
request = request || {};
|
|
329
368
|
let options;
|
|
330
369
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -339,13 +378,24 @@ class ContainerAnalysisClient {
|
|
|
339
378
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
340
379
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
341
380
|
this._gaxModule.routingHeader.fromParams({
|
|
342
|
-
resource:
|
|
381
|
+
resource: request.resource ?? '',
|
|
343
382
|
});
|
|
344
383
|
this.initialize();
|
|
345
|
-
|
|
384
|
+
this._log.info('testIamPermissions request %j', request);
|
|
385
|
+
const wrappedCallback = callback
|
|
386
|
+
? (error, response, options, rawResponse) => {
|
|
387
|
+
this._log.info('testIamPermissions response %j', response);
|
|
388
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
389
|
+
}
|
|
390
|
+
: undefined;
|
|
391
|
+
return this.innerApiCalls
|
|
392
|
+
.testIamPermissions(request, options, wrappedCallback)
|
|
393
|
+
?.then(([response, options, rawResponse]) => {
|
|
394
|
+
this._log.info('testIamPermissions response %j', response);
|
|
395
|
+
return [response, options, rawResponse];
|
|
396
|
+
});
|
|
346
397
|
}
|
|
347
398
|
getVulnerabilityOccurrencesSummary(request, optionsOrCallback, callback) {
|
|
348
|
-
var _a;
|
|
349
399
|
request = request || {};
|
|
350
400
|
let options;
|
|
351
401
|
if (typeof optionsOrCallback === 'function' && callback === undefined) {
|
|
@@ -360,10 +410,22 @@ class ContainerAnalysisClient {
|
|
|
360
410
|
options.otherArgs.headers = options.otherArgs.headers || {};
|
|
361
411
|
options.otherArgs.headers['x-goog-request-params'] =
|
|
362
412
|
this._gaxModule.routingHeader.fromParams({
|
|
363
|
-
parent:
|
|
413
|
+
parent: request.parent ?? '',
|
|
364
414
|
});
|
|
365
415
|
this.initialize();
|
|
366
|
-
|
|
416
|
+
this._log.info('getVulnerabilityOccurrencesSummary request %j', request);
|
|
417
|
+
const wrappedCallback = callback
|
|
418
|
+
? (error, response, options, rawResponse) => {
|
|
419
|
+
this._log.info('getVulnerabilityOccurrencesSummary response %j', response);
|
|
420
|
+
callback(error, response, options, rawResponse); // We verified callback above.
|
|
421
|
+
}
|
|
422
|
+
: undefined;
|
|
423
|
+
return this.innerApiCalls
|
|
424
|
+
.getVulnerabilityOccurrencesSummary(request, options, wrappedCallback)
|
|
425
|
+
?.then(([response, options, rawResponse]) => {
|
|
426
|
+
this._log.info('getVulnerabilityOccurrencesSummary response %j', response);
|
|
427
|
+
return [response, options, rawResponse];
|
|
428
|
+
});
|
|
367
429
|
}
|
|
368
430
|
// --------------------
|
|
369
431
|
// -- Path templates --
|
|
@@ -466,6 +528,7 @@ class ContainerAnalysisClient {
|
|
|
466
528
|
close() {
|
|
467
529
|
if (this.containerAnalysisStub && !this._terminated) {
|
|
468
530
|
return this.containerAnalysisStub.then(stub => {
|
|
531
|
+
this._log.info('ending gRPC channel');
|
|
469
532
|
this._terminated = true;
|
|
470
533
|
stub.close();
|
|
471
534
|
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
[
|
|
2
|
+
"../../protos/google/devtools/containeranalysis/v1/containeranalysis.proto",
|
|
3
|
+
"../../protos/grafeas/v1/attestation.proto",
|
|
4
|
+
"../../protos/grafeas/v1/build.proto",
|
|
5
|
+
"../../protos/grafeas/v1/common.proto",
|
|
6
|
+
"../../protos/grafeas/v1/compliance.proto",
|
|
7
|
+
"../../protos/grafeas/v1/cvss.proto",
|
|
8
|
+
"../../protos/grafeas/v1/deployment.proto",
|
|
9
|
+
"../../protos/grafeas/v1/discovery.proto",
|
|
10
|
+
"../../protos/grafeas/v1/dsse_attestation.proto",
|
|
11
|
+
"../../protos/grafeas/v1/grafeas.proto",
|
|
12
|
+
"../../protos/grafeas/v1/image.proto",
|
|
13
|
+
"../../protos/grafeas/v1/intoto_provenance.proto",
|
|
14
|
+
"../../protos/grafeas/v1/intoto_statement.proto",
|
|
15
|
+
"../../protos/grafeas/v1/package.proto",
|
|
16
|
+
"../../protos/grafeas/v1/provenance.proto",
|
|
17
|
+
"../../protos/grafeas/v1/sbom.proto",
|
|
18
|
+
"../../protos/grafeas/v1/severity.proto",
|
|
19
|
+
"../../protos/grafeas/v1/slsa_provenance.proto",
|
|
20
|
+
"../../protos/grafeas/v1/slsa_provenance_zero_two.proto",
|
|
21
|
+
"../../protos/grafeas/v1/upgrade.proto",
|
|
22
|
+
"../../protos/grafeas/v1/vex.proto",
|
|
23
|
+
"../../protos/grafeas/v1/vulnerability.proto"
|
|
24
|
+
]
|