scanoss 1.19.6__py3-none-any.whl → 1.20.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 (71) hide show
  1. protoc_gen_swagger/__init__.py +13 -13
  2. protoc_gen_swagger/options/__init__.py +13 -13
  3. protoc_gen_swagger/options/annotations_pb2.py +12 -9
  4. protoc_gen_swagger/options/annotations_pb2_grpc.py +1 -1
  5. protoc_gen_swagger/options/openapiv2_pb2.py +98 -96
  6. protoc_gen_swagger/options/openapiv2_pb2_grpc.py +1 -1
  7. scanoss/__init__.py +18 -18
  8. scanoss/api/__init__.py +17 -17
  9. scanoss/api/common/__init__.py +17 -17
  10. scanoss/api/common/v2/__init__.py +17 -17
  11. scanoss/api/common/v2/scanoss_common_pb2.py +18 -18
  12. scanoss/api/common/v2/scanoss_common_pb2_grpc.py +1 -1
  13. scanoss/api/components/__init__.py +17 -17
  14. scanoss/api/components/v2/__init__.py +17 -17
  15. scanoss/api/components/v2/scanoss_components_pb2.py +48 -38
  16. scanoss/api/components/v2/scanoss_components_pb2_grpc.py +142 -96
  17. scanoss/api/cryptography/v2/scanoss_cryptography_pb2.py +22 -16
  18. scanoss/api/cryptography/v2/scanoss_cryptography_pb2_grpc.py +75 -49
  19. scanoss/api/dependencies/__init__.py +17 -17
  20. scanoss/api/dependencies/v2/__init__.py +17 -17
  21. scanoss/api/dependencies/v2/scanoss_dependencies_pb2.py +30 -24
  22. scanoss/api/dependencies/v2/scanoss_dependencies_pb2_grpc.py +75 -49
  23. scanoss/api/provenance/__init__.py +23 -0
  24. scanoss/api/provenance/v2/__init__.py +23 -0
  25. scanoss/api/provenance/v2/scanoss_provenance_pb2.py +42 -0
  26. scanoss/api/provenance/v2/scanoss_provenance_pb2_grpc.py +108 -0
  27. scanoss/api/scanning/__init__.py +17 -17
  28. scanoss/api/scanning/v2/__init__.py +17 -17
  29. scanoss/api/scanning/v2/scanoss_scanning_pb2.py +10 -8
  30. scanoss/api/scanning/v2/scanoss_scanning_pb2_grpc.py +40 -32
  31. scanoss/api/semgrep/__init__.py +17 -17
  32. scanoss/api/semgrep/v2/__init__.py +17 -17
  33. scanoss/api/semgrep/v2/scanoss_semgrep_pb2.py +22 -18
  34. scanoss/api/semgrep/v2/scanoss_semgrep_pb2_grpc.py +71 -49
  35. scanoss/api/vulnerabilities/__init__.py +17 -17
  36. scanoss/api/vulnerabilities/v2/__init__.py +17 -17
  37. scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py +37 -27
  38. scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py +109 -72
  39. scanoss/cli.py +578 -264
  40. scanoss/components.py +99 -48
  41. scanoss/csvoutput.py +83 -56
  42. scanoss/cyclonedx.py +48 -46
  43. scanoss/data/build_date.txt +1 -1
  44. scanoss/file_filters.py +13 -15
  45. scanoss/filecount.py +43 -36
  46. scanoss/inspection/__init__.py +17 -17
  47. scanoss/inspection/copyleft.py +71 -58
  48. scanoss/inspection/policy_check.py +76 -53
  49. scanoss/inspection/undeclared_component.py +98 -75
  50. scanoss/inspection/utils/license_utils.py +66 -44
  51. scanoss/results.py +51 -60
  52. scanoss/scancodedeps.py +61 -38
  53. scanoss/scanner.py +203 -135
  54. scanoss/scanoss_settings.py +5 -3
  55. scanoss/scanossapi.py +98 -69
  56. scanoss/scanossbase.py +19 -19
  57. scanoss/scanossgrpc.py +107 -51
  58. scanoss/scanpostprocessor.py +9 -6
  59. scanoss/scantype.py +22 -21
  60. scanoss/spdxlite.py +265 -171
  61. scanoss/threadeddependencies.py +91 -61
  62. scanoss/threadedscanning.py +37 -31
  63. scanoss/utils/file.py +4 -4
  64. scanoss/winnowing.py +111 -47
  65. {scanoss-1.19.6.dist-info → scanoss-1.20.1.dist-info}/METADATA +1 -1
  66. scanoss-1.20.1.dist-info/RECORD +74 -0
  67. scanoss-1.19.6.dist-info/RECORD +0 -70
  68. {scanoss-1.19.6.dist-info → scanoss-1.20.1.dist-info}/LICENSE +0 -0
  69. {scanoss-1.19.6.dist-info → scanoss-1.20.1.dist-info}/WHEEL +0 -0
  70. {scanoss-1.19.6.dist-info → scanoss-1.20.1.dist-info}/entry_points.txt +0 -0
  71. {scanoss-1.19.6.dist-info → scanoss-1.20.1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,108 @@
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
+
5
+ from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
6
+ from scanoss.api.provenance.v2 import scanoss_provenance_pb2 as scanoss_dot_api_dot_provenance_dot_v2_dot_scanoss__provenance__pb2
7
+
8
+
9
+ class ProvenanceStub(object):
10
+ """*
11
+ Expose all of the SCANOSS Provenance RPCs here
12
+ """
13
+
14
+ def __init__(self, channel):
15
+ """Constructor.
16
+
17
+ Args:
18
+ channel: A grpc.Channel.
19
+ """
20
+ self.Echo = channel.unary_unary(
21
+ '/scanoss.api.provenance.v2.Provenance/Echo',
22
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
23
+ response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
24
+ )
25
+ self.GetComponentProvenance = channel.unary_unary(
26
+ '/scanoss.api.provenance.v2.Provenance/GetComponentProvenance',
27
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
28
+ response_deserializer=scanoss_dot_api_dot_provenance_dot_v2_dot_scanoss__provenance__pb2.ProvenanceResponse.FromString,
29
+ )
30
+
31
+
32
+ class ProvenanceServicer(object):
33
+ """*
34
+ Expose all of the SCANOSS Provenance RPCs here
35
+ """
36
+
37
+ def Echo(self, request, context):
38
+ """Standard echo
39
+ """
40
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
41
+ context.set_details('Method not implemented!')
42
+ raise NotImplementedError('Method not implemented!')
43
+
44
+ def GetComponentProvenance(self, request, context):
45
+ """Get Provenance countrues associated with a list of PURLs
46
+ """
47
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
48
+ context.set_details('Method not implemented!')
49
+ raise NotImplementedError('Method not implemented!')
50
+
51
+
52
+ def add_ProvenanceServicer_to_server(servicer, server):
53
+ rpc_method_handlers = {
54
+ 'Echo': grpc.unary_unary_rpc_method_handler(
55
+ servicer.Echo,
56
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
57
+ response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
58
+ ),
59
+ 'GetComponentProvenance': grpc.unary_unary_rpc_method_handler(
60
+ servicer.GetComponentProvenance,
61
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
62
+ response_serializer=scanoss_dot_api_dot_provenance_dot_v2_dot_scanoss__provenance__pb2.ProvenanceResponse.SerializeToString,
63
+ ),
64
+ }
65
+ generic_handler = grpc.method_handlers_generic_handler(
66
+ 'scanoss.api.provenance.v2.Provenance', rpc_method_handlers)
67
+ server.add_generic_rpc_handlers((generic_handler,))
68
+
69
+
70
+ # This class is part of an EXPERIMENTAL API.
71
+ class Provenance(object):
72
+ """*
73
+ Expose all of the SCANOSS Provenance RPCs here
74
+ """
75
+
76
+ @staticmethod
77
+ def Echo(request,
78
+ target,
79
+ options=(),
80
+ channel_credentials=None,
81
+ call_credentials=None,
82
+ insecure=False,
83
+ compression=None,
84
+ wait_for_ready=None,
85
+ timeout=None,
86
+ metadata=None):
87
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.provenance.v2.Provenance/Echo',
88
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
89
+ 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)
92
+
93
+ @staticmethod
94
+ def GetComponentProvenance(request,
95
+ target,
96
+ options=(),
97
+ channel_credentials=None,
98
+ call_credentials=None,
99
+ insecure=False,
100
+ compression=None,
101
+ wait_for_ready=None,
102
+ timeout=None,
103
+ metadata=None):
104
+ return grpc.experimental.unary_unary(request, target, '/scanoss.api.provenance.v2.Provenance/GetComponentProvenance',
105
+ scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
106
+ scanoss_dot_api_dot_provenance_dot_v2_dot_scanoss__provenance__pb2.ProvenanceResponse.FromString,
107
+ options, channel_credentials,
108
+ insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
@@ -1,23 +1,23 @@
1
1
  """
2
- SPDX-License-Identifier: MIT
2
+ SPDX-License-Identifier: MIT
3
3
 
4
- Copyright (c) 2021, SCANOSS
4
+ Copyright (c) 2021, SCANOSS
5
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:
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
12
 
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
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.
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
23
  """
@@ -1,23 +1,23 @@
1
1
  """
2
- SPDX-License-Identifier: MIT
2
+ SPDX-License-Identifier: MIT
3
3
 
4
- Copyright (c) 2021, SCANOSS
4
+ Copyright (c) 2021, SCANOSS
5
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:
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
12
 
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
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.
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
23
  """
@@ -2,6 +2,7 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: scanoss/api/scanning/v2/scanoss-scanning.proto
4
4
  """Generated protocol buffer code."""
5
+
5
6
  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
@@ -16,16 +17,17 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
16
17
  from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
17
18
 
18
19
 
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.proto2}\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*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
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
21
+ 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.proto2}\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*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'
22
+ )
20
23
 
21
24
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
22
25
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.scanning.v2.scanoss_scanning_pb2', globals())
23
26
  if _descriptor._USE_C_DESCRIPTORS == False:
24
-
25
- DESCRIPTOR._options = None
26
- DESCRIPTOR._serialized_options = b'Z1github.com/scanoss/papi/api/scanningv2;scanningv2\222A\323\001\022m\n\030SCANOSS Scanning Service\"L\n\020scanoss-scanning\022#https://github.com/scanoss/scanning\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
- _SCANNING.methods_by_name['Echo']._options = None
28
- _SCANNING.methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\032\"\025/api/v2/scanning/echo:\001*'
29
- _SCANNING._serialized_start=195
30
- _SCANNING._serialized_end=320
27
+ DESCRIPTOR._options = None
28
+ DESCRIPTOR._serialized_options = b'Z1github.com/scanoss/papi/api/scanningv2;scanningv2\222A\323\001\022m\n\030SCANOSS Scanning Service"L\n\020scanoss-scanning\022#https://github.com/scanoss/scanning\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'
29
+ _SCANNING.methods_by_name['Echo']._options = None
30
+ _SCANNING.methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\032"\025/api/v2/scanning/echo:\001*'
31
+ _SCANNING._serialized_start = 195
32
+ _SCANNING._serialized_end = 320
31
33
  # @@protoc_insertion_point(module_scope)
@@ -1,13 +1,13 @@
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
4
  import grpc
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
 
7
8
 
8
9
  class ScanningStub(object):
9
- """Expose all of the SCANOSS Scanning RPCs here
10
- """
10
+ """Expose all of the SCANOSS Scanning RPCs here"""
11
11
 
12
12
  def __init__(self, channel):
13
13
  """Constructor.
@@ -16,19 +16,17 @@ class ScanningStub(object):
16
16
  channel: A grpc.Channel.
17
17
  """
18
18
  self.Echo = channel.unary_unary(
19
- '/scanoss.api.scanning.v2.Scanning/Echo',
20
- request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
21
- response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
22
- )
19
+ '/scanoss.api.scanning.v2.Scanning/Echo',
20
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
21
+ response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
22
+ )
23
23
 
24
24
 
25
25
  class ScanningServicer(object):
26
- """Expose all of the SCANOSS Scanning RPCs here
27
- """
26
+ """Expose all of the SCANOSS Scanning RPCs here"""
28
27
 
29
28
  def Echo(self, request, context):
30
- """Standard echo
31
- """
29
+ """Standard echo"""
32
30
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
33
31
  context.set_details('Method not implemented!')
34
32
  raise NotImplementedError('Method not implemented!')
@@ -36,35 +34,45 @@ class ScanningServicer(object):
36
34
 
37
35
  def add_ScanningServicer_to_server(servicer, server):
38
36
  rpc_method_handlers = {
39
- 'Echo': grpc.unary_unary_rpc_method_handler(
40
- servicer.Echo,
41
- request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
42
- response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
43
- ),
37
+ 'Echo': grpc.unary_unary_rpc_method_handler(
38
+ servicer.Echo,
39
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
40
+ response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
41
+ ),
44
42
  }
45
- generic_handler = grpc.method_handlers_generic_handler(
46
- 'scanoss.api.scanning.v2.Scanning', rpc_method_handlers)
43
+ generic_handler = grpc.method_handlers_generic_handler('scanoss.api.scanning.v2.Scanning', rpc_method_handlers)
47
44
  server.add_generic_rpc_handlers((generic_handler,))
48
45
 
49
46
 
50
- # This class is part of an EXPERIMENTAL API.
47
+ # This class is part of an EXPERIMENTAL API.
51
48
  class Scanning(object):
52
- """Expose all of the SCANOSS Scanning RPCs here
53
- """
49
+ """Expose all of the SCANOSS Scanning RPCs here"""
54
50
 
55
51
  @staticmethod
56
- def Echo(request,
52
+ def Echo(
53
+ request,
54
+ target,
55
+ options=(),
56
+ channel_credentials=None,
57
+ call_credentials=None,
58
+ insecure=False,
59
+ compression=None,
60
+ wait_for_ready=None,
61
+ timeout=None,
62
+ metadata=None,
63
+ ):
64
+ return grpc.experimental.unary_unary(
65
+ request,
57
66
  target,
58
- options=(),
59
- channel_credentials=None,
60
- call_credentials=None,
61
- insecure=False,
62
- compression=None,
63
- wait_for_ready=None,
64
- timeout=None,
65
- metadata=None):
66
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.scanning.v2.Scanning/Echo',
67
+ '/scanoss.api.scanning.v2.Scanning/Echo',
67
68
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
68
69
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
69
- options, channel_credentials,
70
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
70
+ options,
71
+ channel_credentials,
72
+ insecure,
73
+ call_credentials,
74
+ compression,
75
+ wait_for_ready,
76
+ timeout,
77
+ metadata,
78
+ )
@@ -1,23 +1,23 @@
1
1
  """
2
- SPDX-License-Identifier: MIT
2
+ SPDX-License-Identifier: MIT
3
3
 
4
- Copyright (c) 2023, SCANOSS
4
+ Copyright (c) 2023, SCANOSS
5
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:
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
12
 
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
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.
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
23
  """
@@ -1,23 +1,23 @@
1
1
  """
2
- SPDX-License-Identifier: MIT
2
+ SPDX-License-Identifier: MIT
3
3
 
4
- Copyright (c) 2023, SCANOSS
4
+ Copyright (c) 2023, SCANOSS
5
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:
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
12
 
13
- The above copyright notice and this permission notice shall be included in
14
- all copies or substantial portions of the Software.
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
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.
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
23
  """
@@ -2,6 +2,7 @@
2
2
  # Generated by the protocol buffer compiler. DO NOT EDIT!
3
3
  # source: scanoss/api/semgrep/v2/scanoss-semgrep.proto
4
4
  """Generated protocol buffer code."""
5
+
5
6
  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
@@ -16,26 +17,29 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
16
17
  from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
17
18
 
18
19
 
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
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(
21
+ 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'
22
+ )
20
23
 
21
24
  _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
22
25
  _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.semgrep.v2.scanoss_semgrep_pb2', globals())
23
26
  if _descriptor._USE_C_DESCRIPTORS == False:
24
-
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
27
+ DESCRIPTOR._options = None
28
+ 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'
29
+ _SEMGREP.methods_by_name['Echo']._options = None
30
+ _SEMGREP.methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\031"\024/api/v2/semgrep/echo:\001*'
31
+ _SEMGREP.methods_by_name['GetIssues']._options = None
32
+ _SEMGREP.methods_by_name[
33
+ 'GetIssues'
34
+ ]._serialized_options = b'\202\323\344\223\002\033"\026/api/v2/semgrep/issues:\001*'
35
+ _SEMGREPRESPONSE._serialized_start = 193
36
+ _SEMGREPRESPONSE._serialized_end = 599
37
+ _SEMGREPRESPONSE_ISSUE._serialized_start = 329
38
+ _SEMGREPRESPONSE_ISSUE._serialized_end = 396
39
+ _SEMGREPRESPONSE_FILE._serialized_start = 398
40
+ _SEMGREPRESPONSE_FILE._serialized_end = 498
41
+ _SEMGREPRESPONSE_PURLS._serialized_start = 500
42
+ _SEMGREPRESPONSE_PURLS._serialized_end = 599
43
+ _SEMGREP._serialized_start = 602
44
+ _SEMGREP._serialized_end = 850
41
45
  # @@protoc_insertion_point(module_scope)