scanoss 1.27.1__py3-none-any.whl → 1.43.1__py3-none-any.whl

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.
Files changed (79) hide show
  1. protoc_gen_swagger/options/annotations_pb2.py +18 -12
  2. protoc_gen_swagger/options/annotations_pb2.pyi +48 -0
  3. protoc_gen_swagger/options/annotations_pb2_grpc.py +20 -0
  4. protoc_gen_swagger/options/openapiv2_pb2.py +110 -99
  5. protoc_gen_swagger/options/openapiv2_pb2.pyi +1317 -0
  6. protoc_gen_swagger/options/openapiv2_pb2_grpc.py +20 -0
  7. scanoss/__init__.py +1 -1
  8. scanoss/api/common/v2/scanoss_common_pb2.py +49 -22
  9. scanoss/api/common/v2/scanoss_common_pb2_grpc.py +25 -0
  10. scanoss/api/components/v2/scanoss_components_pb2.py +68 -43
  11. scanoss/api/components/v2/scanoss_components_pb2_grpc.py +83 -22
  12. scanoss/api/cryptography/v2/scanoss_cryptography_pb2.py +136 -47
  13. scanoss/api/cryptography/v2/scanoss_cryptography_pb2_grpc.py +650 -33
  14. scanoss/api/dependencies/v2/scanoss_dependencies_pb2.py +56 -37
  15. scanoss/api/dependencies/v2/scanoss_dependencies_pb2_grpc.py +64 -12
  16. scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2.py +74 -31
  17. scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2_grpc.py +252 -13
  18. scanoss/api/licenses/__init__.py +23 -0
  19. scanoss/api/licenses/v2/__init__.py +23 -0
  20. scanoss/api/licenses/v2/scanoss_licenses_pb2.py +84 -0
  21. scanoss/api/licenses/v2/scanoss_licenses_pb2_grpc.py +302 -0
  22. scanoss/api/scanning/v2/scanoss_scanning_pb2.py +32 -21
  23. scanoss/api/scanning/v2/scanoss_scanning_pb2_grpc.py +49 -8
  24. scanoss/api/semgrep/v2/scanoss_semgrep_pb2.py +50 -23
  25. scanoss/api/semgrep/v2/scanoss_semgrep_pb2_grpc.py +151 -16
  26. scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py +78 -31
  27. scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py +282 -18
  28. scanoss/cli.py +1000 -186
  29. scanoss/components.py +80 -50
  30. scanoss/constants.py +7 -1
  31. scanoss/cryptography.py +89 -55
  32. scanoss/csvoutput.py +13 -7
  33. scanoss/cyclonedx.py +141 -9
  34. scanoss/data/build_date.txt +1 -1
  35. scanoss/data/osadl-copyleft.json +133 -0
  36. scanoss/delta.py +197 -0
  37. scanoss/export/__init__.py +23 -0
  38. scanoss/export/dependency_track.py +227 -0
  39. scanoss/file_filters.py +2 -163
  40. scanoss/filecount.py +37 -38
  41. scanoss/gitlabqualityreport.py +214 -0
  42. scanoss/header_filter.py +563 -0
  43. scanoss/inspection/policy_check/__init__.py +0 -0
  44. scanoss/inspection/policy_check/dependency_track/__init__.py +0 -0
  45. scanoss/inspection/policy_check/dependency_track/project_violation.py +479 -0
  46. scanoss/inspection/{policy_check.py → policy_check/policy_check.py} +65 -72
  47. scanoss/inspection/policy_check/scanoss/__init__.py +0 -0
  48. scanoss/inspection/{copyleft.py → policy_check/scanoss/copyleft.py} +89 -73
  49. scanoss/inspection/{undeclared_component.py → policy_check/scanoss/undeclared_component.py} +52 -46
  50. scanoss/inspection/summary/__init__.py +0 -0
  51. scanoss/inspection/summary/component_summary.py +170 -0
  52. scanoss/inspection/{license_summary.py → summary/license_summary.py} +62 -12
  53. scanoss/inspection/summary/match_summary.py +341 -0
  54. scanoss/inspection/utils/file_utils.py +44 -0
  55. scanoss/inspection/utils/license_utils.py +57 -71
  56. scanoss/inspection/utils/markdown_utils.py +63 -0
  57. scanoss/inspection/{inspect_base.py → utils/scan_result_processor.py} +53 -67
  58. scanoss/osadl.py +125 -0
  59. scanoss/scanner.py +135 -253
  60. scanoss/scanners/folder_hasher.py +47 -32
  61. scanoss/scanners/scanner_hfh.py +50 -18
  62. scanoss/scanoss_settings.py +33 -3
  63. scanoss/scanossapi.py +23 -25
  64. scanoss/scanossbase.py +1 -1
  65. scanoss/scanossgrpc.py +543 -289
  66. scanoss/services/dependency_track_service.py +132 -0
  67. scanoss/spdxlite.py +11 -4
  68. scanoss/threadeddependencies.py +19 -18
  69. scanoss/threadedscanning.py +10 -0
  70. scanoss/utils/scanoss_scan_results_utils.py +41 -0
  71. scanoss/winnowing.py +71 -19
  72. {scanoss-1.27.1.dist-info → scanoss-1.43.1.dist-info}/METADATA +8 -5
  73. scanoss-1.43.1.dist-info/RECORD +110 -0
  74. scanoss/inspection/component_summary.py +0 -94
  75. scanoss-1.27.1.dist-info/RECORD +0 -87
  76. {scanoss-1.27.1.dist-info → scanoss-1.43.1.dist-info}/WHEEL +0 -0
  77. {scanoss-1.27.1.dist-info → scanoss-1.43.1.dist-info}/entry_points.txt +0 -0
  78. {scanoss-1.27.1.dist-info → scanoss-1.43.1.dist-info}/licenses/LICENSE +0 -0
  79. {scanoss-1.27.1.dist-info → scanoss-1.43.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,302 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+ from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
7
+ from scanoss.api.licenses.v2 import scanoss_licenses_pb2 as scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2
8
+
9
+ GRPC_GENERATED_VERSION = '1.73.1'
10
+ GRPC_VERSION = grpc.__version__
11
+ _version_not_supported = False
12
+
13
+ try:
14
+ from grpc._utilities import first_version_is_lower
15
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16
+ except ImportError:
17
+ _version_not_supported = True
18
+
19
+ if _version_not_supported:
20
+ raise RuntimeError(
21
+ f'The grpc package installed is at version {GRPC_VERSION},'
22
+ + f' but the generated code in scanoss/api/licenses/v2/scanoss_licenses_pb2_grpc.py depends on'
23
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
24
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26
+ )
27
+
28
+
29
+ class LicenseStub(object):
30
+ """
31
+ License Service Definition
32
+ """
33
+
34
+ def __init__(self, channel):
35
+ """Constructor.
36
+
37
+ Args:
38
+ channel: A grpc.Channel.
39
+ """
40
+ self.Echo = channel.unary_unary(
41
+ '/scanoss.api.licenses.v2.License/Echo',
42
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
43
+ response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
44
+ _registered_method=True)
45
+ self.GetComponentLicenses = channel.unary_unary(
46
+ '/scanoss.api.licenses.v2.License/GetComponentLicenses',
47
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
48
+ response_deserializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ComponentLicenseResponse.FromString,
49
+ _registered_method=True)
50
+ self.GetComponentsLicenses = channel.unary_unary(
51
+ '/scanoss.api.licenses.v2.License/GetComponentsLicenses',
52
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
53
+ response_deserializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ComponentsLicenseResponse.FromString,
54
+ _registered_method=True)
55
+ self.GetDetails = channel.unary_unary(
56
+ '/scanoss.api.licenses.v2.License/GetDetails',
57
+ request_serializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseRequest.SerializeToString,
58
+ response_deserializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseDetailsResponse.FromString,
59
+ _registered_method=True)
60
+ self.GetObligations = channel.unary_unary(
61
+ '/scanoss.api.licenses.v2.License/GetObligations',
62
+ request_serializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseRequest.SerializeToString,
63
+ response_deserializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ObligationsResponse.FromString,
64
+ _registered_method=True)
65
+
66
+
67
+ class LicenseServicer(object):
68
+ """
69
+ License Service Definition
70
+ """
71
+
72
+ def Echo(self, request, context):
73
+ """
74
+ Returns the same message that was sent, used for health checks and connectivity testing
75
+ """
76
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
77
+ context.set_details('Method not implemented!')
78
+ raise NotImplementedError('Method not implemented!')
79
+
80
+ def GetComponentLicenses(self, request, context):
81
+ """
82
+ Get license information for a single software component.
83
+
84
+ Examines source code, license files, and package metadata to determine which licenses apply to the component.
85
+ Returns license data in both individual SPDX license and SPDX expressions when determinable.
86
+
87
+ See: https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/licenses/v2/README.md?tab=readme-ov-file#getcomponentlicenses
88
+ """
89
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
90
+ context.set_details('Method not implemented!')
91
+ raise NotImplementedError('Method not implemented!')
92
+
93
+ def GetComponentsLicenses(self, request, context):
94
+ """
95
+ Get license information for multiple software components in a single request.
96
+
97
+ Examines source code, license files, and package metadata to determine which licenses apply to each component.
98
+ Returns license data in both individual SPDX license and SPDX expressions when determinable.
99
+
100
+ See https://github.com/scanoss/papi/blob/main/protobuf/scanoss/api/licenses/v2/README.md?tab=readme-ov-file#getcomponentslicenses
101
+ """
102
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
103
+ context.set_details('Method not implemented!')
104
+ raise NotImplementedError('Method not implemented!')
105
+
106
+ def GetDetails(self, request, context):
107
+ """
108
+ Get detailed metadata for a specific license by SPDX identifier.
109
+
110
+ Provides comprehensive license information including SPDX registry data,
111
+ OSADL compliance metadata, license type classification, and official references.
112
+ """
113
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
114
+ context.set_details('Method not implemented!')
115
+ raise NotImplementedError('Method not implemented!')
116
+
117
+ def GetObligations(self, request, context):
118
+ """
119
+ Get compliance obligations and usage requirements for a specific license.
120
+
121
+ Returns structured OSADL compliance data including use cases, obligations,
122
+ compatibility information, and patent hints for the specified license.
123
+ """
124
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
125
+ context.set_details('Method not implemented!')
126
+ raise NotImplementedError('Method not implemented!')
127
+
128
+
129
+ def add_LicenseServicer_to_server(servicer, server):
130
+ rpc_method_handlers = {
131
+ 'Echo': grpc.unary_unary_rpc_method_handler(
132
+ servicer.Echo,
133
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
134
+ response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
135
+ ),
136
+ 'GetComponentLicenses': grpc.unary_unary_rpc_method_handler(
137
+ servicer.GetComponentLicenses,
138
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.FromString,
139
+ response_serializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ComponentLicenseResponse.SerializeToString,
140
+ ),
141
+ 'GetComponentsLicenses': grpc.unary_unary_rpc_method_handler(
142
+ servicer.GetComponentsLicenses,
143
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.FromString,
144
+ response_serializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ComponentsLicenseResponse.SerializeToString,
145
+ ),
146
+ 'GetDetails': grpc.unary_unary_rpc_method_handler(
147
+ servicer.GetDetails,
148
+ request_deserializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseRequest.FromString,
149
+ response_serializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseDetailsResponse.SerializeToString,
150
+ ),
151
+ 'GetObligations': grpc.unary_unary_rpc_method_handler(
152
+ servicer.GetObligations,
153
+ request_deserializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseRequest.FromString,
154
+ response_serializer=scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ObligationsResponse.SerializeToString,
155
+ ),
156
+ }
157
+ generic_handler = grpc.method_handlers_generic_handler(
158
+ 'scanoss.api.licenses.v2.License', rpc_method_handlers)
159
+ server.add_generic_rpc_handlers((generic_handler,))
160
+ server.add_registered_method_handlers('scanoss.api.licenses.v2.License', rpc_method_handlers)
161
+
162
+
163
+ # This class is part of an EXPERIMENTAL API.
164
+ class License(object):
165
+ """
166
+ License Service Definition
167
+ """
168
+
169
+ @staticmethod
170
+ def Echo(request,
171
+ target,
172
+ options=(),
173
+ channel_credentials=None,
174
+ call_credentials=None,
175
+ insecure=False,
176
+ compression=None,
177
+ wait_for_ready=None,
178
+ timeout=None,
179
+ metadata=None):
180
+ return grpc.experimental.unary_unary(
181
+ request,
182
+ target,
183
+ '/scanoss.api.licenses.v2.License/Echo',
184
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
185
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
186
+ options,
187
+ channel_credentials,
188
+ insecure,
189
+ call_credentials,
190
+ compression,
191
+ wait_for_ready,
192
+ timeout,
193
+ metadata,
194
+ _registered_method=True)
195
+
196
+ @staticmethod
197
+ def GetComponentLicenses(request,
198
+ target,
199
+ options=(),
200
+ channel_credentials=None,
201
+ call_credentials=None,
202
+ insecure=False,
203
+ compression=None,
204
+ wait_for_ready=None,
205
+ timeout=None,
206
+ metadata=None):
207
+ return grpc.experimental.unary_unary(
208
+ request,
209
+ target,
210
+ '/scanoss.api.licenses.v2.License/GetComponentLicenses',
211
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
212
+ scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ComponentLicenseResponse.FromString,
213
+ options,
214
+ channel_credentials,
215
+ insecure,
216
+ call_credentials,
217
+ compression,
218
+ wait_for_ready,
219
+ timeout,
220
+ metadata,
221
+ _registered_method=True)
222
+
223
+ @staticmethod
224
+ def GetComponentsLicenses(request,
225
+ target,
226
+ options=(),
227
+ channel_credentials=None,
228
+ call_credentials=None,
229
+ insecure=False,
230
+ compression=None,
231
+ wait_for_ready=None,
232
+ timeout=None,
233
+ metadata=None):
234
+ return grpc.experimental.unary_unary(
235
+ request,
236
+ target,
237
+ '/scanoss.api.licenses.v2.License/GetComponentsLicenses',
238
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
239
+ scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ComponentsLicenseResponse.FromString,
240
+ options,
241
+ channel_credentials,
242
+ insecure,
243
+ call_credentials,
244
+ compression,
245
+ wait_for_ready,
246
+ timeout,
247
+ metadata,
248
+ _registered_method=True)
249
+
250
+ @staticmethod
251
+ def GetDetails(request,
252
+ target,
253
+ options=(),
254
+ channel_credentials=None,
255
+ call_credentials=None,
256
+ insecure=False,
257
+ compression=None,
258
+ wait_for_ready=None,
259
+ timeout=None,
260
+ metadata=None):
261
+ return grpc.experimental.unary_unary(
262
+ request,
263
+ target,
264
+ '/scanoss.api.licenses.v2.License/GetDetails',
265
+ scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseRequest.SerializeToString,
266
+ scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseDetailsResponse.FromString,
267
+ options,
268
+ channel_credentials,
269
+ insecure,
270
+ call_credentials,
271
+ compression,
272
+ wait_for_ready,
273
+ timeout,
274
+ metadata,
275
+ _registered_method=True)
276
+
277
+ @staticmethod
278
+ def GetObligations(request,
279
+ target,
280
+ options=(),
281
+ channel_credentials=None,
282
+ call_credentials=None,
283
+ insecure=False,
284
+ compression=None,
285
+ wait_for_ready=None,
286
+ timeout=None,
287
+ metadata=None):
288
+ return grpc.experimental.unary_unary(
289
+ request,
290
+ target,
291
+ '/scanoss.api.licenses.v2.License/GetObligations',
292
+ scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.LicenseRequest.SerializeToString,
293
+ scanoss_dot_api_dot_licenses_dot_v2_dot_scanoss__licenses__pb2.ObligationsResponse.FromString,
294
+ options,
295
+ channel_credentials,
296
+ insecure,
297
+ call_credentials,
298
+ compression,
299
+ wait_for_ready,
300
+ timeout,
301
+ metadata,
302
+ _registered_method=True)
@@ -1,11 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
3
4
  # source: scanoss/api/scanning/v2/scanoss-scanning.proto
5
+ # Protobuf Python Version: 6.31.0
4
6
  """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
7
  from google.protobuf import descriptor as _descriptor
7
8
  from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
8
10
  from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 0,
17
+ '',
18
+ 'scanoss/api/scanning/v2/scanoss-scanning.proto'
19
+ )
9
20
  # @@protoc_insertion_point(imports)
10
21
 
11
22
  _sym_db = _symbol_database.Default()
@@ -13,10 +24,10 @@ _sym_db = _symbol_database.Default()
13
24
 
14
25
  from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
15
26
  from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
16
- from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
27
+ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2
17
28
 
18
29
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.scanoss/api/scanning/v2/scanoss-scanning.proto\x12\x17scanoss.api.scanning.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"\xc5\x03\n\nHFHRequest\x12:\n\x04root\x18\x01 \x01(\x0b\x32,.scanoss.api.scanning.v2.HFHRequest.Children\x12\x16\n\x0erank_threshold\x18\x02 \x01(\x05\x12\x10\n\x08\x63\x61tegory\x18\x03 \x01(\t\x12\x13\n\x0bquery_limit\x18\x04 \x01(\x05\x1a\xbb\x02\n\x08\x43hildren\x12\x0f\n\x07path_id\x18\x01 \x01(\t\x12\x16\n\x0esim_hash_names\x18\x02 \x01(\t\x12\x18\n\x10sim_hash_content\x18\x03 \x01(\t\x12>\n\x08\x63hildren\x18\x04 \x03(\x0b\x32,.scanoss.api.scanning.v2.HFHRequest.Children\x12\x1a\n\x12sim_hash_dir_names\x18\x05 \x01(\t\x12Y\n\x0flang_extensions\x18\x06 \x03(\x0b\x32@.scanoss.api.scanning.v2.HFHRequest.Children.LangExtensionsEntry\x1a\x35\n\x13LangExtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"\xa3\x03\n\x0bHFHResponse\x12<\n\x07results\x18\x01 \x03(\x0b\x32+.scanoss.api.scanning.v2.HFHResponse.Result\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a)\n\x07Version\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\x94\x01\n\tComponent\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12>\n\x08versions\x18\x04 \x03(\x0b\x32,.scanoss.api.scanning.v2.HFHResponse.Version\x12\x0c\n\x04rank\x18\x05 \x01(\x05\x12\r\n\x05order\x18\x06 \x01(\x05\x1a]\n\x06Result\x12\x0f\n\x07path_id\x18\x01 \x01(\t\x12\x42\n\ncomponents\x18\x02 \x03(\x0b\x32..scanoss.api.scanning.v2.HFHResponse.Component2\x81\x02\n\x08Scanning\x12q\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/api/v2/scanning/echo:\x01*\x12\x81\x01\n\x0e\x46olderHashScan\x12#.scanoss.api.scanning.v2.HFHRequest\x1a$.scanoss.api.scanning.v2.HFHResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/api/v2/scanning/hfh/scan:\x01*B\x8a\x02Z1github.com/scanoss/papi/api/scanningv2;scanningv2\x92\x41\xd3\x01\x12m\n\x18SCANOSS Scanning Service\"L\n\x10scanoss-scanning\x12#https://github.com/scanoss/scanning\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.scanoss/api/scanning/v2/scanoss-scanning.proto\x12\x17scanoss.api.scanning.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xde\x04\n\nHFHRequest\x12:\n\x04root\x18\x01 \x01(\x0b\x32,.scanoss.api.scanning.v2.HFHRequest.Children\x12&\n\x0erank_threshold\x18\x02 \x01(\x05R\x0erank_threshold\x12\x10\n\x08\x63\x61tegory\x18\x03 \x01(\t\x12\x13\n\x0bquery_limit\x18\x04 \x01(\x05\x12\x1b\n\x13recursive_threshold\x18\x05 \x01(\x02\x12\x1a\n\x12min_accepted_score\x18\x06 \x01(\x02\x1a\x8b\x03\n\x08\x43hildren\x12\x18\n\x07path_id\x18\x01 \x01(\tR\x07path_id\x12&\n\x0esim_hash_names\x18\x02 \x01(\tR\x0esim_hash_names\x12*\n\x10sim_hash_content\x18\x03 \x01(\tR\x10sim_hash_content\x12>\n\x08\x63hildren\x18\x04 \x03(\x0b\x32,.scanoss.api.scanning.v2.HFHRequest.Children\x12.\n\x12sim_hash_dir_names\x18\x05 \x01(\tR\x12sim_hash_dir_names\x12j\n\x0flang_extensions\x18\x06 \x03(\x0b\x32@.scanoss.api.scanning.v2.HFHRequest.Children.LangExtensionsEntryR\x0flang_extensions\x1a\x35\n\x13LangExtensionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x05:\x02\x38\x01\"\xac\x03\n\x0bHFHResponse\x12<\n\x07results\x18\x01 \x03(\x0b\x32+.scanoss.api.scanning.v2.HFHResponse.Result\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a)\n\x07Version\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\r\n\x05score\x18\x02 \x01(\x02\x1a\x94\x01\n\tComponent\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0e\n\x06vendor\x18\x03 \x01(\t\x12>\n\x08versions\x18\x04 \x03(\x0b\x32,.scanoss.api.scanning.v2.HFHResponse.Version\x12\x0c\n\x04rank\x18\x05 \x01(\x05\x12\r\n\x05order\x18\x06 \x01(\x05\x1a\x66\n\x06Result\x12\x18\n\x07path_id\x18\x01 \x01(\tR\x07path_id\x12\x42\n\ncomponents\x18\x02 \x03(\x0b\x32..scanoss.api.scanning.v2.HFHResponse.Component2\xf8\x01\n\x08Scanning\x12m\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\"\x11/v2/scanning/echo:\x01*\x12}\n\x0e\x46olderHashScan\x12#.scanoss.api.scanning.v2.HFHRequest\x1a$.scanoss.api.scanning.v2.HFHResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/v2/scanning/hfh/scan:\x01*B\x8a\x02Z1github.com/scanoss/papi/api/scanningv2;scanningv2\x92\x41\xd3\x01\x12m\n\x18SCANOSS Scanning Service\"L\n\x10scanoss-scanning\x12#https://github.com/scanoss/scanning\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
20
31
 
21
32
  _globals = globals()
22
33
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
@@ -27,23 +38,23 @@ if not _descriptor._USE_C_DESCRIPTORS:
27
38
  _globals['_HFHREQUEST_CHILDREN_LANGEXTENSIONSENTRY']._loaded_options = None
28
39
  _globals['_HFHREQUEST_CHILDREN_LANGEXTENSIONSENTRY']._serialized_options = b'8\001'
29
40
  _globals['_SCANNING'].methods_by_name['Echo']._loaded_options = None
30
- _globals['_SCANNING'].methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\032\"\025/api/v2/scanning/echo:\001*'
41
+ _globals['_SCANNING'].methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\026\"\021/v2/scanning/echo:\001*'
31
42
  _globals['_SCANNING'].methods_by_name['FolderHashScan']._loaded_options = None
32
- _globals['_SCANNING'].methods_by_name['FolderHashScan']._serialized_options = b'\202\323\344\223\002\036\"\031/api/v2/scanning/hfh/scan:\001*'
33
- _globals['_HFHREQUEST']._serialized_start=196
34
- _globals['_HFHREQUEST']._serialized_end=649
35
- _globals['_HFHREQUEST_CHILDREN']._serialized_start=334
36
- _globals['_HFHREQUEST_CHILDREN']._serialized_end=649
37
- _globals['_HFHREQUEST_CHILDREN_LANGEXTENSIONSENTRY']._serialized_start=596
38
- _globals['_HFHREQUEST_CHILDREN_LANGEXTENSIONSENTRY']._serialized_end=649
39
- _globals['_HFHRESPONSE']._serialized_start=652
40
- _globals['_HFHRESPONSE']._serialized_end=1071
41
- _globals['_HFHRESPONSE_VERSION']._serialized_start=784
42
- _globals['_HFHRESPONSE_VERSION']._serialized_end=825
43
- _globals['_HFHRESPONSE_COMPONENT']._serialized_start=828
44
- _globals['_HFHRESPONSE_COMPONENT']._serialized_end=976
45
- _globals['_HFHRESPONSE_RESULT']._serialized_start=978
46
- _globals['_HFHRESPONSE_RESULT']._serialized_end=1071
47
- _globals['_SCANNING']._serialized_start=1074
48
- _globals['_SCANNING']._serialized_end=1331
43
+ _globals['_SCANNING'].methods_by_name['FolderHashScan']._serialized_options = b'\202\323\344\223\002\032\"\025/v2/scanning/hfh/scan:\001*'
44
+ _globals['_HFHREQUEST']._serialized_start=198
45
+ _globals['_HFHREQUEST']._serialized_end=804
46
+ _globals['_HFHREQUEST_CHILDREN']._serialized_start=409
47
+ _globals['_HFHREQUEST_CHILDREN']._serialized_end=804
48
+ _globals['_HFHREQUEST_CHILDREN_LANGEXTENSIONSENTRY']._serialized_start=751
49
+ _globals['_HFHREQUEST_CHILDREN_LANGEXTENSIONSENTRY']._serialized_end=804
50
+ _globals['_HFHRESPONSE']._serialized_start=807
51
+ _globals['_HFHRESPONSE']._serialized_end=1235
52
+ _globals['_HFHRESPONSE_VERSION']._serialized_start=939
53
+ _globals['_HFHRESPONSE_VERSION']._serialized_end=980
54
+ _globals['_HFHRESPONSE_COMPONENT']._serialized_start=983
55
+ _globals['_HFHRESPONSE_COMPONENT']._serialized_end=1131
56
+ _globals['_HFHRESPONSE_RESULT']._serialized_start=1133
57
+ _globals['_HFHRESPONSE_RESULT']._serialized_end=1235
58
+ _globals['_SCANNING']._serialized_start=1238
59
+ _globals['_SCANNING']._serialized_end=1486
49
60
  # @@protoc_insertion_point(module_scope)
@@ -1,10 +1,30 @@
1
1
  # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
2
  """Client and server classes corresponding to protobuf-defined services."""
3
3
  import grpc
4
+ import warnings
4
5
 
5
6
  from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
6
7
  from scanoss.api.scanning.v2 import scanoss_scanning_pb2 as scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2
7
8
 
9
+ GRPC_GENERATED_VERSION = '1.73.1'
10
+ GRPC_VERSION = grpc.__version__
11
+ _version_not_supported = False
12
+
13
+ try:
14
+ from grpc._utilities import first_version_is_lower
15
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
16
+ except ImportError:
17
+ _version_not_supported = True
18
+
19
+ if _version_not_supported:
20
+ raise RuntimeError(
21
+ f'The grpc package installed is at version {GRPC_VERSION},'
22
+ + f' but the generated code in scanoss/api/scanning/v2/scanoss_scanning_pb2_grpc.py depends on'
23
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
24
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
25
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
26
+ )
27
+
8
28
 
9
29
  class ScanningStub(object):
10
30
  """*
@@ -21,12 +41,12 @@ class ScanningStub(object):
21
41
  '/scanoss.api.scanning.v2.Scanning/Echo',
22
42
  request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
23
43
  response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
24
- )
44
+ _registered_method=True)
25
45
  self.FolderHashScan = channel.unary_unary(
26
46
  '/scanoss.api.scanning.v2.Scanning/FolderHashScan',
27
47
  request_serializer=scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHRequest.SerializeToString,
28
48
  response_deserializer=scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHResponse.FromString,
29
- )
49
+ _registered_method=True)
30
50
 
31
51
 
32
52
  class ScanningServicer(object):
@@ -65,6 +85,7 @@ def add_ScanningServicer_to_server(servicer, server):
65
85
  generic_handler = grpc.method_handlers_generic_handler(
66
86
  'scanoss.api.scanning.v2.Scanning', rpc_method_handlers)
67
87
  server.add_generic_rpc_handlers((generic_handler,))
88
+ server.add_registered_method_handlers('scanoss.api.scanning.v2.Scanning', rpc_method_handlers)
68
89
 
69
90
 
70
91
  # This class is part of an EXPERIMENTAL API.
@@ -84,11 +105,21 @@ class Scanning(object):
84
105
  wait_for_ready=None,
85
106
  timeout=None,
86
107
  metadata=None):
87
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.scanning.v2.Scanning/Echo',
108
+ return grpc.experimental.unary_unary(
109
+ request,
110
+ target,
111
+ '/scanoss.api.scanning.v2.Scanning/Echo',
88
112
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
89
113
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
90
- options, channel_credentials,
91
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
114
+ options,
115
+ channel_credentials,
116
+ insecure,
117
+ call_credentials,
118
+ compression,
119
+ wait_for_ready,
120
+ timeout,
121
+ metadata,
122
+ _registered_method=True)
92
123
 
93
124
  @staticmethod
94
125
  def FolderHashScan(request,
@@ -101,8 +132,18 @@ class Scanning(object):
101
132
  wait_for_ready=None,
102
133
  timeout=None,
103
134
  metadata=None):
104
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.scanning.v2.Scanning/FolderHashScan',
135
+ return grpc.experimental.unary_unary(
136
+ request,
137
+ target,
138
+ '/scanoss.api.scanning.v2.Scanning/FolderHashScan',
105
139
  scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHRequest.SerializeToString,
106
140
  scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHResponse.FromString,
107
- options, channel_credentials,
108
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
141
+ options,
142
+ channel_credentials,
143
+ insecure,
144
+ call_credentials,
145
+ compression,
146
+ wait_for_ready,
147
+ timeout,
148
+ metadata,
149
+ _registered_method=True)
@@ -1,11 +1,22 @@
1
1
  # -*- coding: utf-8 -*-
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
3
4
  # source: scanoss/api/semgrep/v2/scanoss-semgrep.proto
5
+ # Protobuf Python Version: 6.31.0
4
6
  """Generated protocol buffer code."""
5
- from google.protobuf.internal import builder as _builder
6
7
  from google.protobuf import descriptor as _descriptor
7
8
  from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
8
10
  from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 6,
15
+ 31,
16
+ 0,
17
+ '',
18
+ 'scanoss/api/semgrep/v2/scanoss-semgrep.proto'
19
+ )
9
20
  # @@protoc_insertion_point(imports)
10
21
 
11
22
  _sym_db = _symbol_database.Default()
@@ -13,29 +24,45 @@ _sym_db = _symbol_database.Default()
13
24
 
14
25
  from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
15
26
  from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
16
- from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
17
-
27
+ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2
18
28
 
19
- DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,scanoss/api/semgrep/v2/scanoss-semgrep.proto\x12\x16scanoss.api.semgrep.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"\x96\x03\n\x0fSemgrepResponse\x12<\n\x05purls\x18\x01 \x03(\x0b\x32-.scanoss.api.semgrep.v2.SemgrepResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x43\n\x05Issue\x12\x0e\n\x06ruleID\x18\x01 \x01(\t\x12\x0c\n\x04\x66rom\x18\x02 \x01(\t\x12\n\n\x02to\x18\x03 \x01(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\x1a\x64\n\x04\x46ile\x12\x0f\n\x07\x66ileMD5\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12=\n\x06issues\x18\x03 \x03(\x0b\x32-.scanoss.api.semgrep.v2.SemgrepResponse.Issue\x1a\x63\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12;\n\x05\x66iles\x18\x03 \x03(\x0b\x32,.scanoss.api.semgrep.v2.SemgrepResponse.File2\xf8\x01\n\x07Semgrep\x12p\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"\x1f\x82\xd3\xe4\x93\x02\x19\"\x14/api/v2/semgrep/echo:\x01*\x12{\n\tGetIssues\x12\".scanoss.api.common.v2.PurlRequest\x1a\'.scanoss.api.semgrep.v2.SemgrepResponse\"!\x82\xd3\xe4\x93\x02\x1b\"\x16/api/v2/semgrep/issues:\x01*B\x85\x02Z/github.com/scanoss/papi/api/semgrepv2;semgrepv2\x92\x41\xd0\x01\x12j\n\x17SCANOSS Semgrep Service\"J\n\x0fscanoss-semgrep\x12\"https://github.com/scanoss/semgrep\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
20
29
 
21
- _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
22
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.semgrep.v2.scanoss_semgrep_pb2', globals())
23
- if _descriptor._USE_C_DESCRIPTORS == False:
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n,scanoss/api/semgrep/v2/scanoss-semgrep.proto\x12\x16scanoss.api.semgrep.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"C\n\x05Issue\x12\x0e\n\x06ruleID\x18\x01 \x01(\t\x12\x0c\n\x04\x66rom\x18\x02 \x01(\t\x12\n\n\x02to\x18\x03 \x01(\t\x12\x10\n\x08severity\x18\x04 \x01(\t\"T\n\x04\x46ile\x12\x0f\n\x07\x66ileMD5\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\x12-\n\x06issues\x18\x03 \x03(\x0b\x32\x1d.scanoss.api.semgrep.v2.Issue\"\xdf\x01\n\x0fSemgrepResponse\x12<\n\x05purls\x18\x01 \x03(\x0b\x32-.scanoss.api.semgrep.v2.SemgrepResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1aS\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12+\n\x05\x66iles\x18\x03 \x03(\x0b\x32\x1c.scanoss.api.semgrep.v2.File:\x02\x18\x01\"u\n\x12\x43omponentIssueInfo\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0f\n\x07version\x18\x02 \x01(\t\x12\x13\n\x0brequirement\x18\x03 \x01(\t\x12+\n\x05\x66iles\x18\x04 \x03(\x0b\x32\x1c.scanoss.api.semgrep.v2.File\"\xe6\x06\n\x17\x43omponentsIssueResponse\x12>\n\ncomponents\x18\x01 \x03(\x0b\x32*.scanoss.api.semgrep.v2.ComponentIssueInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\xd3\x05\x92\x41\xcf\x05\n\xcc\x05J\xc9\x05{\"components\":[{\"purl\":\"pkg:maven/org.apache.commons/commons-lang3\",\"version\":\"3.12.0\",\"requirement\":\"3.12.0\",\"files\":[{\"fileMD5\":\"a1b2c3d4e5f6\",\"path\":\"src/main/java/org/apache/commons/lang3/StringUtils.java\",\"issues\":[{\"ruleID\":\"java.lang.security.audit.crypto.weak-hash\",\"from\":\"156\",\"to\":\"159\",\"severity\":\"WARNING\"},{\"ruleID\":\"java.lang.security.audit.sql-injection.sql-injection\",\"from\":\"284\",\"to\":\"286\",\"severity\":\"ERROR\"}]},{\"fileMD5\":\"b2c3d4e5f6a1\",\"path\":\"src/main/java/org/apache/commons/lang3/Validate.java\",\"issues\":[{\"ruleID\":\"java.lang.security.audit.hardcoded-secret\",\"from\":\"95\",\"to\":\"95\",\"severity\":\"ERROR\"}]}]}],\"status\":{\"status\":\"SUCCESS\",\"message\":\"Security analysis completed successfully\"}}\"\xb9\x04\n\x16\x43omponentIssueResponse\x12=\n\tcomponent\x18\x01 \x01(\x0b\x32*.scanoss.api.semgrep.v2.ComponentIssueInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\xa8\x03\x92\x41\xa4\x03\n\xa1\x03J\x9e\x03{\"component\":{\"purl\":\"pkg:maven/org.apache.commons/commons-lang3\",\"version\":\"3.12.0\",\"requirement\":\"3.12.0\",\"files\":[{\"fileMD5\":\"a1b2c3d4e5f6\",\"path\":\"src/main/java/org/apache/commons/lang3/StringUtils.java\",\"issues\":[{\"ruleID\":\"java.lang.security.audit.sql-injection.sql-injection\",\"from\":\"284\",\"to\":\"286\",\"severity\":\"ERROR\"}]}]},\"status\":{\"status\":\"SUCCESS\",\"message\":\"Security analysis completed successfully\"}}2\x89\x04\n\x07Semgrep\x12l\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"\x1b\x82\xd3\xe4\x93\x02\x15\"\x10/v2/semgrep/echo:\x01*\x12]\n\tGetIssues\x12\".scanoss.api.common.v2.PurlRequest\x1a\'.scanoss.api.semgrep.v2.SemgrepResponse\"\x03\x88\x02\x01\x12\x9a\x01\n\x13GetComponentsIssues\x12(.scanoss.api.common.v2.ComponentsRequest\x1a/.scanoss.api.semgrep.v2.ComponentsIssueResponse\"(\x82\xd3\xe4\x93\x02\"\"\x1d/v2/semgrep/issues/components:\x01*\x12\x93\x01\n\x12GetComponentIssues\x12\'.scanoss.api.common.v2.ComponentRequest\x1a..scanoss.api.semgrep.v2.ComponentIssueResponse\"$\x82\xd3\xe4\x93\x02\x1e\x12\x1c/v2/semgrep/issues/componentB\x85\x02Z/github.com/scanoss/papi/api/semgrepv2;semgrepv2\x92\x41\xd0\x01\x12j\n\x17SCANOSS Semgrep Service\"J\n\x0fscanoss-semgrep\x12\"https://github.com/scanoss/semgrep\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
24
31
 
25
- DESCRIPTOR._options = None
26
- DESCRIPTOR._serialized_options = b'Z/github.com/scanoss/papi/api/semgrepv2;semgrepv2\222A\320\001\022j\n\027SCANOSS Semgrep Service\"J\n\017scanoss-semgrep\022\"https://github.com/scanoss/semgrep\032\023support@scanoss.com2\0032.0*\001\0012\020application/json:\020application/jsonR;\n\003404\0224\n*Returned when the resource does not exist.\022\006\n\004\232\002\001\007'
27
- _SEMGREP.methods_by_name['Echo']._options = None
28
- _SEMGREP.methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\031\"\024/api/v2/semgrep/echo:\001*'
29
- _SEMGREP.methods_by_name['GetIssues']._options = None
30
- _SEMGREP.methods_by_name['GetIssues']._serialized_options = b'\202\323\344\223\002\033\"\026/api/v2/semgrep/issues:\001*'
31
- _SEMGREPRESPONSE._serialized_start=193
32
- _SEMGREPRESPONSE._serialized_end=599
33
- _SEMGREPRESPONSE_ISSUE._serialized_start=329
34
- _SEMGREPRESPONSE_ISSUE._serialized_end=396
35
- _SEMGREPRESPONSE_FILE._serialized_start=398
36
- _SEMGREPRESPONSE_FILE._serialized_end=498
37
- _SEMGREPRESPONSE_PURLS._serialized_start=500
38
- _SEMGREPRESPONSE_PURLS._serialized_end=599
39
- _SEMGREP._serialized_start=602
40
- _SEMGREP._serialized_end=850
32
+ _globals = globals()
33
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.semgrep.v2.scanoss_semgrep_pb2', _globals)
35
+ if not _descriptor._USE_C_DESCRIPTORS:
36
+ _globals['DESCRIPTOR']._loaded_options = None
37
+ _globals['DESCRIPTOR']._serialized_options = b'Z/github.com/scanoss/papi/api/semgrepv2;semgrepv2\222A\320\001\022j\n\027SCANOSS Semgrep Service\"J\n\017scanoss-semgrep\022\"https://github.com/scanoss/semgrep\032\023support@scanoss.com2\0032.0*\001\0012\020application/json:\020application/jsonR;\n\003404\0224\n*Returned when the resource does not exist.\022\006\n\004\232\002\001\007'
38
+ _globals['_SEMGREPRESPONSE']._loaded_options = None
39
+ _globals['_SEMGREPRESPONSE']._serialized_options = b'\030\001'
40
+ _globals['_COMPONENTSISSUERESPONSE']._loaded_options = None
41
+ _globals['_COMPONENTSISSUERESPONSE']._serialized_options = b'\222A\317\005\n\314\005J\311\005{\"components\":[{\"purl\":\"pkg:maven/org.apache.commons/commons-lang3\",\"version\":\"3.12.0\",\"requirement\":\"3.12.0\",\"files\":[{\"fileMD5\":\"a1b2c3d4e5f6\",\"path\":\"src/main/java/org/apache/commons/lang3/StringUtils.java\",\"issues\":[{\"ruleID\":\"java.lang.security.audit.crypto.weak-hash\",\"from\":\"156\",\"to\":\"159\",\"severity\":\"WARNING\"},{\"ruleID\":\"java.lang.security.audit.sql-injection.sql-injection\",\"from\":\"284\",\"to\":\"286\",\"severity\":\"ERROR\"}]},{\"fileMD5\":\"b2c3d4e5f6a1\",\"path\":\"src/main/java/org/apache/commons/lang3/Validate.java\",\"issues\":[{\"ruleID\":\"java.lang.security.audit.hardcoded-secret\",\"from\":\"95\",\"to\":\"95\",\"severity\":\"ERROR\"}]}]}],\"status\":{\"status\":\"SUCCESS\",\"message\":\"Security analysis completed successfully\"}}'
42
+ _globals['_COMPONENTISSUERESPONSE']._loaded_options = None
43
+ _globals['_COMPONENTISSUERESPONSE']._serialized_options = b'\222A\244\003\n\241\003J\236\003{\"component\":{\"purl\":\"pkg:maven/org.apache.commons/commons-lang3\",\"version\":\"3.12.0\",\"requirement\":\"3.12.0\",\"files\":[{\"fileMD5\":\"a1b2c3d4e5f6\",\"path\":\"src/main/java/org/apache/commons/lang3/StringUtils.java\",\"issues\":[{\"ruleID\":\"java.lang.security.audit.sql-injection.sql-injection\",\"from\":\"284\",\"to\":\"286\",\"severity\":\"ERROR\"}]}]},\"status\":{\"status\":\"SUCCESS\",\"message\":\"Security analysis completed successfully\"}}'
44
+ _globals['_SEMGREP'].methods_by_name['Echo']._loaded_options = None
45
+ _globals['_SEMGREP'].methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\025\"\020/v2/semgrep/echo:\001*'
46
+ _globals['_SEMGREP'].methods_by_name['GetIssues']._loaded_options = None
47
+ _globals['_SEMGREP'].methods_by_name['GetIssues']._serialized_options = b'\210\002\001'
48
+ _globals['_SEMGREP'].methods_by_name['GetComponentsIssues']._loaded_options = None
49
+ _globals['_SEMGREP'].methods_by_name['GetComponentsIssues']._serialized_options = b'\202\323\344\223\002\"\"\035/v2/semgrep/issues/components:\001*'
50
+ _globals['_SEMGREP'].methods_by_name['GetComponentIssues']._loaded_options = None
51
+ _globals['_SEMGREP'].methods_by_name['GetComponentIssues']._serialized_options = b'\202\323\344\223\002\036\022\034/v2/semgrep/issues/component'
52
+ _globals['_ISSUE']._serialized_start=194
53
+ _globals['_ISSUE']._serialized_end=261
54
+ _globals['_FILE']._serialized_start=263
55
+ _globals['_FILE']._serialized_end=347
56
+ _globals['_SEMGREPRESPONSE']._serialized_start=350
57
+ _globals['_SEMGREPRESPONSE']._serialized_end=573
58
+ _globals['_SEMGREPRESPONSE_PURLS']._serialized_start=486
59
+ _globals['_SEMGREPRESPONSE_PURLS']._serialized_end=569
60
+ _globals['_COMPONENTISSUEINFO']._serialized_start=575
61
+ _globals['_COMPONENTISSUEINFO']._serialized_end=692
62
+ _globals['_COMPONENTSISSUERESPONSE']._serialized_start=695
63
+ _globals['_COMPONENTSISSUERESPONSE']._serialized_end=1565
64
+ _globals['_COMPONENTISSUERESPONSE']._serialized_start=1568
65
+ _globals['_COMPONENTISSUERESPONSE']._serialized_end=2137
66
+ _globals['_SEMGREP']._serialized_start=2140
67
+ _globals['_SEMGREP']._serialized_end=2661
41
68
  # @@protoc_insertion_point(module_scope)