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
@@ -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.geoprovenance.v2 import scanoss_geoprovenance_pb2 as scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__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/geoprovenance/v2/scanoss_geoprovenance_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 GeoProvenanceStub(object):
10
30
  """*
@@ -21,17 +41,37 @@ class GeoProvenanceStub(object):
21
41
  '/scanoss.api.geoprovenance.v2.GeoProvenance/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.GetComponentContributors = channel.unary_unary(
26
46
  '/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentContributors',
27
47
  request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
28
48
  response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ContributorResponse.FromString,
29
- )
49
+ _registered_method=True)
50
+ self.GetCountryContributorsByComponents = channel.unary_unary(
51
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetCountryContributorsByComponents',
52
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
53
+ response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentsContributorResponse.FromString,
54
+ _registered_method=True)
55
+ self.GetCountryContributorsByComponent = channel.unary_unary(
56
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetCountryContributorsByComponent',
57
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
58
+ response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentContributorResponse.FromString,
59
+ _registered_method=True)
30
60
  self.GetComponentOrigin = channel.unary_unary(
31
61
  '/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentOrigin',
32
62
  request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
33
63
  response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.OriginResponse.FromString,
34
- )
64
+ _registered_method=True)
65
+ self.GetOriginByComponents = channel.unary_unary(
66
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetOriginByComponents',
67
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
68
+ response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentsOriginResponse.FromString,
69
+ _registered_method=True)
70
+ self.GetOriginByComponent = channel.unary_unary(
71
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetOriginByComponent',
72
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
73
+ response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentOriginResponse.FromString,
74
+ _registered_method=True)
35
75
 
36
76
 
37
77
  class GeoProvenanceServicer(object):
@@ -40,21 +80,61 @@ class GeoProvenanceServicer(object):
40
80
  """
41
81
 
42
82
  def Echo(self, request, context):
43
- """Standard echo
83
+ """Standard health check endpoint to verify service availability and connectivity
44
84
  """
45
85
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
46
86
  context.set_details('Method not implemented!')
47
87
  raise NotImplementedError('Method not implemented!')
48
88
 
49
89
  def GetComponentContributors(self, request, context):
90
+ """[DEPRECATED] Get component-level Geo Provenance based on contributor declared location
91
+ This method accepts PURL-based requests and is deprecated in favor of GetCountryContributorsByComponent
92
+ which accepts ComponentRequest for better component identification
93
+ """
94
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
95
+ context.set_details('Method not implemented!')
96
+ raise NotImplementedError('Method not implemented!')
97
+
98
+ def GetCountryContributorsByComponents(self, request, context):
99
+ """Get component-level Geo Provenance based on contributor declared location
100
+ This is the current method that accepts ComponentsRequest for enhanced component identification
101
+ Replaces the deprecated GetComponentContributors method
102
+ """
103
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
104
+ context.set_details('Method not implemented!')
105
+ raise NotImplementedError('Method not implemented!')
106
+
107
+ def GetCountryContributorsByComponent(self, request, context):
50
108
  """Get component-level Geo Provenance based on contributor declared location
109
+ This is the current method that accepts ComponentRequest for enhanced component identification
110
+ Replaces the deprecated GetComponentContributors method
51
111
  """
52
112
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53
113
  context.set_details('Method not implemented!')
54
114
  raise NotImplementedError('Method not implemented!')
55
115
 
56
116
  def GetComponentOrigin(self, request, context):
117
+ """[DEPRECATED] Get component-level Geo Provenance based on contributor origin commit times
118
+ This method accepts PURL-based requests and is deprecated in favor of GetOriginByComponent
119
+ which accepts ComponentRequest for better component identification
120
+ """
121
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
122
+ context.set_details('Method not implemented!')
123
+ raise NotImplementedError('Method not implemented!')
124
+
125
+ def GetOriginByComponents(self, request, context):
126
+ """Get component-level Geo Provenance based on contributor origin commit times
127
+ This is the current method that accepts ComponentsRequest for enhanced component identification
128
+ Replaces the deprecated GetComponentOrigin method
129
+ """
130
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
131
+ context.set_details('Method not implemented!')
132
+ raise NotImplementedError('Method not implemented!')
133
+
134
+ def GetOriginByComponent(self, request, context):
57
135
  """Get component-level Geo Provenance based on contributor origin commit times
136
+ This is the current method that accepts ComponentRequest for enhanced component identification
137
+ Replaces the deprecated GetComponentOrigin method
58
138
  """
59
139
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60
140
  context.set_details('Method not implemented!')
@@ -73,15 +153,36 @@ def add_GeoProvenanceServicer_to_server(servicer, server):
73
153
  request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
74
154
  response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ContributorResponse.SerializeToString,
75
155
  ),
156
+ 'GetCountryContributorsByComponents': grpc.unary_unary_rpc_method_handler(
157
+ servicer.GetCountryContributorsByComponents,
158
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.FromString,
159
+ response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentsContributorResponse.SerializeToString,
160
+ ),
161
+ 'GetCountryContributorsByComponent': grpc.unary_unary_rpc_method_handler(
162
+ servicer.GetCountryContributorsByComponent,
163
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.FromString,
164
+ response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentContributorResponse.SerializeToString,
165
+ ),
76
166
  'GetComponentOrigin': grpc.unary_unary_rpc_method_handler(
77
167
  servicer.GetComponentOrigin,
78
168
  request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
79
169
  response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.OriginResponse.SerializeToString,
80
170
  ),
171
+ 'GetOriginByComponents': grpc.unary_unary_rpc_method_handler(
172
+ servicer.GetOriginByComponents,
173
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.FromString,
174
+ response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentsOriginResponse.SerializeToString,
175
+ ),
176
+ 'GetOriginByComponent': grpc.unary_unary_rpc_method_handler(
177
+ servicer.GetOriginByComponent,
178
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.FromString,
179
+ response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentOriginResponse.SerializeToString,
180
+ ),
81
181
  }
82
182
  generic_handler = grpc.method_handlers_generic_handler(
83
183
  'scanoss.api.geoprovenance.v2.GeoProvenance', rpc_method_handlers)
84
184
  server.add_generic_rpc_handlers((generic_handler,))
185
+ server.add_registered_method_handlers('scanoss.api.geoprovenance.v2.GeoProvenance', rpc_method_handlers)
85
186
 
86
187
 
87
188
  # This class is part of an EXPERIMENTAL API.
@@ -101,11 +202,21 @@ class GeoProvenance(object):
101
202
  wait_for_ready=None,
102
203
  timeout=None,
103
204
  metadata=None):
104
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.geoprovenance.v2.GeoProvenance/Echo',
205
+ return grpc.experimental.unary_unary(
206
+ request,
207
+ target,
208
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/Echo',
105
209
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
106
210
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
107
- options, channel_credentials,
108
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
211
+ options,
212
+ channel_credentials,
213
+ insecure,
214
+ call_credentials,
215
+ compression,
216
+ wait_for_ready,
217
+ timeout,
218
+ metadata,
219
+ _registered_method=True)
109
220
 
110
221
  @staticmethod
111
222
  def GetComponentContributors(request,
@@ -118,11 +229,75 @@ class GeoProvenance(object):
118
229
  wait_for_ready=None,
119
230
  timeout=None,
120
231
  metadata=None):
121
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentContributors',
232
+ return grpc.experimental.unary_unary(
233
+ request,
234
+ target,
235
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentContributors',
122
236
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
123
237
  scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ContributorResponse.FromString,
124
- options, channel_credentials,
125
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
238
+ options,
239
+ channel_credentials,
240
+ insecure,
241
+ call_credentials,
242
+ compression,
243
+ wait_for_ready,
244
+ timeout,
245
+ metadata,
246
+ _registered_method=True)
247
+
248
+ @staticmethod
249
+ def GetCountryContributorsByComponents(request,
250
+ target,
251
+ options=(),
252
+ channel_credentials=None,
253
+ call_credentials=None,
254
+ insecure=False,
255
+ compression=None,
256
+ wait_for_ready=None,
257
+ timeout=None,
258
+ metadata=None):
259
+ return grpc.experimental.unary_unary(
260
+ request,
261
+ target,
262
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetCountryContributorsByComponents',
263
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
264
+ scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentsContributorResponse.FromString,
265
+ options,
266
+ channel_credentials,
267
+ insecure,
268
+ call_credentials,
269
+ compression,
270
+ wait_for_ready,
271
+ timeout,
272
+ metadata,
273
+ _registered_method=True)
274
+
275
+ @staticmethod
276
+ def GetCountryContributorsByComponent(request,
277
+ target,
278
+ options=(),
279
+ channel_credentials=None,
280
+ call_credentials=None,
281
+ insecure=False,
282
+ compression=None,
283
+ wait_for_ready=None,
284
+ timeout=None,
285
+ metadata=None):
286
+ return grpc.experimental.unary_unary(
287
+ request,
288
+ target,
289
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetCountryContributorsByComponent',
290
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
291
+ scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentContributorResponse.FromString,
292
+ options,
293
+ channel_credentials,
294
+ insecure,
295
+ call_credentials,
296
+ compression,
297
+ wait_for_ready,
298
+ timeout,
299
+ metadata,
300
+ _registered_method=True)
126
301
 
127
302
  @staticmethod
128
303
  def GetComponentOrigin(request,
@@ -135,8 +310,72 @@ class GeoProvenance(object):
135
310
  wait_for_ready=None,
136
311
  timeout=None,
137
312
  metadata=None):
138
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentOrigin',
313
+ return grpc.experimental.unary_unary(
314
+ request,
315
+ target,
316
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentOrigin',
139
317
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
140
318
  scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.OriginResponse.FromString,
141
- options, channel_credentials,
142
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
319
+ options,
320
+ channel_credentials,
321
+ insecure,
322
+ call_credentials,
323
+ compression,
324
+ wait_for_ready,
325
+ timeout,
326
+ metadata,
327
+ _registered_method=True)
328
+
329
+ @staticmethod
330
+ def GetOriginByComponents(request,
331
+ target,
332
+ options=(),
333
+ channel_credentials=None,
334
+ call_credentials=None,
335
+ insecure=False,
336
+ compression=None,
337
+ wait_for_ready=None,
338
+ timeout=None,
339
+ metadata=None):
340
+ return grpc.experimental.unary_unary(
341
+ request,
342
+ target,
343
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetOriginByComponents',
344
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentsRequest.SerializeToString,
345
+ scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentsOriginResponse.FromString,
346
+ options,
347
+ channel_credentials,
348
+ insecure,
349
+ call_credentials,
350
+ compression,
351
+ wait_for_ready,
352
+ timeout,
353
+ metadata,
354
+ _registered_method=True)
355
+
356
+ @staticmethod
357
+ def GetOriginByComponent(request,
358
+ target,
359
+ options=(),
360
+ channel_credentials=None,
361
+ call_credentials=None,
362
+ insecure=False,
363
+ compression=None,
364
+ wait_for_ready=None,
365
+ timeout=None,
366
+ metadata=None):
367
+ return grpc.experimental.unary_unary(
368
+ request,
369
+ target,
370
+ '/scanoss.api.geoprovenance.v2.GeoProvenance/GetOriginByComponent',
371
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.ComponentRequest.SerializeToString,
372
+ scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ComponentOriginResponse.FromString,
373
+ options,
374
+ channel_credentials,
375
+ insecure,
376
+ call_credentials,
377
+ compression,
378
+ wait_for_ready,
379
+ timeout,
380
+ metadata,
381
+ _registered_method=True)
@@ -0,0 +1,23 @@
1
+ """
2
+ SPDX-License-Identifier: MIT
3
+
4
+ Copyright (c) 2025, SCANOSS
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ """
@@ -0,0 +1,23 @@
1
+ """
2
+ SPDX-License-Identifier: MIT
3
+
4
+ Copyright (c) 2025, SCANOSS
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
23
+ """
@@ -0,0 +1,84 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: scanoss/api/licenses/v2/scanoss-licenses.proto
5
+ # Protobuf Python Version: 6.31.0
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
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/licenses/v2/scanoss-licenses.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+ from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
26
+ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
27
+ from protoc_gen_openapiv2.options import annotations_pb2 as protoc__gen__openapiv2_dot_options_dot_annotations__pb2
28
+
29
+
30
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.scanoss/api/licenses/v2/scanoss-licenses.proto\x12\x17scanoss.api.licenses.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a.protoc-gen-openapiv2/options/annotations.proto\"\xbd\x03\n\x18\x43omponentLicenseResponse\x12@\n\tcomponent\x18\x01 \x01(\x0b\x32-.scanoss.api.licenses.v2.ComponentLicenseInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\xa7\x02\x92\x41\xa3\x02\n\xa0\x02J\x9d\x02{\"component\":{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\"}]}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}\"\xe9\x04\n\x19\x43omponentsLicenseResponse\x12\x41\n\ncomponents\x18\x01 \x03(\x0b\x32-.scanoss.api.licenses.v2.ComponentLicenseInfo\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse:\xd1\x03\x92\x41\xcd\x03\n\xca\x03J\xc7\x03{\"components\":[{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\"}]}, {\"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\",\"requirement\": \"\",\"version\": \"v1.30.0\",\"statement\": \"MIT\", \"licenses\": [{\"id\": \"MIT\",\"full_name\": \"MIT License\"}]} ], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}\"\x89\x01\n\x16LicenseDetailsResponse\x12\x38\n\x07license\x18\x01 \x01(\x0b\x32\'.scanoss.api.licenses.v2.LicenseDetails\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\"\x81\x01\n\x13ObligationsResponse\x12\x33\n\x0bobligations\x18\x01 \x01(\x0b\x32\x1e.scanoss.api.licenses.v2.OSADL\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\"\xe4\x05\n\x04SPDX\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\tfull_name\x18\x02 \x01(\tR\tfull_name\x12 \n\x0b\x64\x65tails_url\x18\x04 \x01(\tR\x0b\x64\x65tails_url\x12$\n\rreference_url\x18\x05 \x01(\tR\rreference_url\x12$\n\ris_deprecated\x18\x06 \x01(\x08R\ris_deprecated\x12\"\n\x0cis_fsf_libre\x18\x07 \x01(\x08R\x0cis_fsf_libre\x12(\n\x0fis_osi_approved\x18\x08 \x01(\x08R\x0fis_osi_approved\x12\x1a\n\x08see_also\x18\t \x03(\tR\x08see_also\x12J\n\ncross_refs\x18\n \x03(\x0b\x32*.scanoss.api.licenses.v2.SPDX.SPDXCrossRefR\ncross_refs\x12?\n\nexceptions\x18\x0b \x03(\x0b\x32+.scanoss.api.licenses.v2.SPDX.SPDXException\x1a\xac\x01\n\x0cSPDXCrossRef\x12\x0b\n\x03url\x18\x01 \x01(\t\x12\x1a\n\x08is_valid\x18\x02 \x01(\x08R\x08is_valid\x12\x18\n\x07is_live\x18\x03 \x01(\x08R\x07is_live\x12\x11\n\ttimestamp\x18\x04 \x01(\t\x12(\n\x0fis_wayback_link\x18\x05 \x01(\x08R\x0fis_wayback_link\x12\r\n\x05order\x18\x06 \x01(\x05\x12\r\n\x05match\x18\x07 \x01(\t\x1a\x9d\x01\n\rSPDXException\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\tfull_name\x18\x02 \x01(\tR\tfull_name\x12 \n\x0b\x64\x65tails_url\x18\x03 \x01(\tR\x0b\x64\x65tails_url\x12\x1a\n\x08see_also\x18\x05 \x03(\tR\x08see_also\x12$\n\ris_deprecated\x18\x06 \x01(\x08R\ris_deprecated\"\xfc\x02\n\x05OSADL\x12(\n\x0f\x63opyleft_clause\x18\x01 \x01(\x08R\x0f\x63opyleft_clause\x12\"\n\x0cpatent_hints\x18\x02 \x01(\x08R\x0cpatent_hints\x12\x15\n\rcompatibility\x18\x03 \x03(\t\x12\x38\n\x17\x64\x65pending_compatibility\x18\x04 \x03(\tR\x17\x64\x65pending_compatibility\x12\x17\n\x0fincompatibility\x18\x05 \x03(\t\x12I\n\tuse_cases\x18\x06 \x03(\x0b\x32+.scanoss.api.licenses.v2.OSADL.OSADLUseCaseR\tuse_cases\x1ap\n\x0cOSADLUseCase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12(\n\x0fobligation_text\x18\x02 \x01(\tR\x0fobligation_text\x12(\n\x0fobligation_json\x18\x03 \x01(\tR\x0fobligation_json\"\x86\x01\n\x0bLicenseInfo\x12\n\n\x02id\x18\x01 \x01(\t\x12\x1c\n\tfull_name\x18\x02 \x01(\tR\tfull_name:M\x92\x41J\nHJF{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\"}\"\xbe\x01\n\x0eLicenseDetails\x12\x1c\n\tfull_name\x18\x01 \x01(\tR\tfull_name\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.scanoss.api.licenses.v2.LicenseType\x12+\n\x04spdx\x18\x03 \x01(\x0b\x32\x1d.scanoss.api.licenses.v2.SPDX\x12-\n\x05osadl\x18\x04 \x01(\x0b\x32\x1e.scanoss.api.licenses.v2.OSADL\"\x1c\n\x0eLicenseRequest\x12\n\n\x02id\x18\x01 \x01(\t\"\x95\x01\n\x14\x43omponentLicenseInfo\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x13\n\x0brequirement\x18\x02 \x01(\t\x12\x0f\n\x07version\x18\x03 \x01(\t\x12\x11\n\tstatement\x18\x04 \x01(\t\x12\x36\n\x08licenses\x18\x05 \x03(\x0b\x32$.scanoss.api.licenses.v2.LicenseInfo*l\n\x0bLicenseType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x0e\n\nPERMISSIVE\x10\x01\x12\x0c\n\x08\x43OPYLEFT\x10\x02\x12\x0e\n\nCOMMERCIAL\x10\x03\x12\x0f\n\x0bPROPRIETARY\x10\x04\x12\x11\n\rPUBLIC_DOMAIN\x10\x05\x32\xbc\x05\n\x07License\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/licenses/echo:\x01*\x12\x92\x01\n\x14GetComponentLicenses\x12\'.scanoss.api.common.v2.ComponentRequest\x1a\x31.scanoss.api.licenses.v2.ComponentLicenseResponse\"\x1e\x82\xd3\xe4\x93\x02\x18\x12\x16/v2/licenses/component\x12\x99\x01\n\x15GetComponentsLicenses\x12(.scanoss.api.common.v2.ComponentsRequest\x1a\x32.scanoss.api.licenses.v2.ComponentsLicenseResponse\"\"\x82\xd3\xe4\x93\x02\x1c\"\x17/v2/licenses/components:\x01*\x12\x84\x01\n\nGetDetails\x12\'.scanoss.api.licenses.v2.LicenseRequest\x1a/.scanoss.api.licenses.v2.LicenseDetailsResponse\"\x1c\x82\xd3\xe4\x93\x02\x16\x12\x14/v2/licenses/details\x12\x89\x01\n\x0eGetObligations\x12\'.scanoss.api.licenses.v2.LicenseRequest\x1a,.scanoss.api.licenses.v2.ObligationsResponse\" \x82\xd3\xe4\x93\x02\x1a\x12\x18/v2/licenses/obligationsB\xa7\x02Z1github.com/scanoss/papi/api/licensesv2;licensesv2\x92\x41\xf0\x01\x12\xb4\x01\n\x17SCANOSS License Service\x12\x46License service provides license intelligence for software components.\"L\n\x10scanoss-licenses\x12#https://github.com/scanoss/licenses\x1a\x13support@scanoss.com2\x03\x32.0\x1a\x0f\x61pi.scanoss.com*\x02\x01\x02\x32\x10\x61pplication/json:\x10\x61pplication/jsonb\x06proto3')
31
+
32
+ _globals = globals()
33
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
34
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.licenses.v2.scanoss_licenses_pb2', _globals)
35
+ if not _descriptor._USE_C_DESCRIPTORS:
36
+ _globals['DESCRIPTOR']._loaded_options = None
37
+ _globals['DESCRIPTOR']._serialized_options = b'Z1github.com/scanoss/papi/api/licensesv2;licensesv2\222A\360\001\022\264\001\n\027SCANOSS License Service\022FLicense service provides license intelligence for software components.\"L\n\020scanoss-licenses\022#https://github.com/scanoss/licenses\032\023support@scanoss.com2\0032.0\032\017api.scanoss.com*\002\001\0022\020application/json:\020application/json'
38
+ _globals['_COMPONENTLICENSERESPONSE']._loaded_options = None
39
+ _globals['_COMPONENTLICENSERESPONSE']._serialized_options = b'\222A\243\002\n\240\002J\235\002{\"component\":{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\"}]}, \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}'
40
+ _globals['_COMPONENTSLICENSERESPONSE']._loaded_options = None
41
+ _globals['_COMPONENTSLICENSERESPONSE']._serialized_options = b'\222A\315\003\n\312\003J\307\003{\"components\":[{\"purl\": \"pkg:github/scanoss/engine@1.0.0\", \"requirement\": \"\", \"version\": \"1.0.0\", \"statement\": \"GPL-2.0\", \"licenses\": [{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\"}]}, {\"purl\": \"pkg:github/scanoss/scanoss.py@v1.30.0\",\"requirement\": \"\",\"version\": \"v1.30.0\",\"statement\": \"MIT\", \"licenses\": [{\"id\": \"MIT\",\"full_name\": \"MIT License\"}]} ], \"status\": {\"status\": \"SUCCESS\", \"message\": \"Licenses Successfully retrieved\"}}'
42
+ _globals['_LICENSEINFO']._loaded_options = None
43
+ _globals['_LICENSEINFO']._serialized_options = b'\222AJ\nHJF{\"id\": \"GPL-2.0\", \"full_name\": \"GNU General Public License v2.0 only\"}'
44
+ _globals['_LICENSE'].methods_by_name['Echo']._loaded_options = None
45
+ _globals['_LICENSE'].methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\026\"\021/v2/licenses/echo:\001*'
46
+ _globals['_LICENSE'].methods_by_name['GetComponentLicenses']._loaded_options = None
47
+ _globals['_LICENSE'].methods_by_name['GetComponentLicenses']._serialized_options = b'\202\323\344\223\002\030\022\026/v2/licenses/component'
48
+ _globals['_LICENSE'].methods_by_name['GetComponentsLicenses']._loaded_options = None
49
+ _globals['_LICENSE'].methods_by_name['GetComponentsLicenses']._serialized_options = b'\202\323\344\223\002\034\"\027/v2/licenses/components:\001*'
50
+ _globals['_LICENSE'].methods_by_name['GetDetails']._loaded_options = None
51
+ _globals['_LICENSE'].methods_by_name['GetDetails']._serialized_options = b'\202\323\344\223\002\026\022\024/v2/licenses/details'
52
+ _globals['_LICENSE'].methods_by_name['GetObligations']._loaded_options = None
53
+ _globals['_LICENSE'].methods_by_name['GetObligations']._serialized_options = b'\202\323\344\223\002\032\022\030/v2/licenses/obligations'
54
+ _globals['_LICENSETYPE']._serialized_start=3175
55
+ _globals['_LICENSETYPE']._serialized_end=3283
56
+ _globals['_COMPONENTLICENSERESPONSE']._serialized_start=198
57
+ _globals['_COMPONENTLICENSERESPONSE']._serialized_end=643
58
+ _globals['_COMPONENTSLICENSERESPONSE']._serialized_start=646
59
+ _globals['_COMPONENTSLICENSERESPONSE']._serialized_end=1263
60
+ _globals['_LICENSEDETAILSRESPONSE']._serialized_start=1266
61
+ _globals['_LICENSEDETAILSRESPONSE']._serialized_end=1403
62
+ _globals['_OBLIGATIONSRESPONSE']._serialized_start=1406
63
+ _globals['_OBLIGATIONSRESPONSE']._serialized_end=1535
64
+ _globals['_SPDX']._serialized_start=1538
65
+ _globals['_SPDX']._serialized_end=2278
66
+ _globals['_SPDX_SPDXCROSSREF']._serialized_start=1946
67
+ _globals['_SPDX_SPDXCROSSREF']._serialized_end=2118
68
+ _globals['_SPDX_SPDXEXCEPTION']._serialized_start=2121
69
+ _globals['_SPDX_SPDXEXCEPTION']._serialized_end=2278
70
+ _globals['_OSADL']._serialized_start=2281
71
+ _globals['_OSADL']._serialized_end=2661
72
+ _globals['_OSADL_OSADLUSECASE']._serialized_start=2549
73
+ _globals['_OSADL_OSADLUSECASE']._serialized_end=2661
74
+ _globals['_LICENSEINFO']._serialized_start=2664
75
+ _globals['_LICENSEINFO']._serialized_end=2798
76
+ _globals['_LICENSEDETAILS']._serialized_start=2801
77
+ _globals['_LICENSEDETAILS']._serialized_end=2991
78
+ _globals['_LICENSEREQUEST']._serialized_start=2993
79
+ _globals['_LICENSEREQUEST']._serialized_end=3021
80
+ _globals['_COMPONENTLICENSEINFO']._serialized_start=3024
81
+ _globals['_COMPONENTLICENSEINFO']._serialized_end=3173
82
+ _globals['_LICENSE']._serialized_start=3286
83
+ _globals['_LICENSE']._serialized_end=3986
84
+ # @@protoc_insertion_point(module_scope)