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
@@ -1,5 +1,6 @@
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
@@ -18,15 +19,15 @@ class SemgrepStub(object):
18
19
  channel: A grpc.Channel.
19
20
  """
20
21
  self.Echo = channel.unary_unary(
21
- '/scanoss.api.semgrep.v2.Semgrep/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
- )
22
+ '/scanoss.api.semgrep.v2.Semgrep/Echo',
23
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
24
+ response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
25
+ )
25
26
  self.GetIssues = channel.unary_unary(
26
- '/scanoss.api.semgrep.v2.Semgrep/GetIssues',
27
- request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
28
- response_deserializer=scanoss_dot_api_dot_semgrep_dot_v2_dot_scanoss__semgrep__pb2.SemgrepResponse.FromString,
29
- )
27
+ '/scanoss.api.semgrep.v2.Semgrep/GetIssues',
28
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
29
+ response_deserializer=scanoss_dot_api_dot_semgrep_dot_v2_dot_scanoss__semgrep__pb2.SemgrepResponse.FromString,
30
+ )
30
31
 
31
32
 
32
33
  class SemgrepServicer(object):
@@ -35,15 +36,13 @@ class SemgrepServicer(object):
35
36
  """
36
37
 
37
38
  def Echo(self, request, context):
38
- """Standard echo
39
- """
39
+ """Standard echo"""
40
40
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
41
41
  context.set_details('Method not implemented!')
42
42
  raise NotImplementedError('Method not implemented!')
43
43
 
44
44
  def GetIssues(self, request, context):
45
- """Get Potential issues associated with a list of PURLs
46
- """
45
+ """Get Potential issues associated with a list of PURLs"""
47
46
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
48
47
  context.set_details('Method not implemented!')
49
48
  raise NotImplementedError('Method not implemented!')
@@ -51,58 +50,81 @@ class SemgrepServicer(object):
51
50
 
52
51
  def add_SemgrepServicer_to_server(servicer, server):
53
52
  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
- 'GetIssues': grpc.unary_unary_rpc_method_handler(
60
- servicer.GetIssues,
61
- request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
62
- response_serializer=scanoss_dot_api_dot_semgrep_dot_v2_dot_scanoss__semgrep__pb2.SemgrepResponse.SerializeToString,
63
- ),
53
+ 'Echo': grpc.unary_unary_rpc_method_handler(
54
+ servicer.Echo,
55
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
56
+ response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
57
+ ),
58
+ 'GetIssues': grpc.unary_unary_rpc_method_handler(
59
+ servicer.GetIssues,
60
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
61
+ response_serializer=scanoss_dot_api_dot_semgrep_dot_v2_dot_scanoss__semgrep__pb2.SemgrepResponse.SerializeToString,
62
+ ),
64
63
  }
65
- generic_handler = grpc.method_handlers_generic_handler(
66
- 'scanoss.api.semgrep.v2.Semgrep', rpc_method_handlers)
64
+ generic_handler = grpc.method_handlers_generic_handler('scanoss.api.semgrep.v2.Semgrep', rpc_method_handlers)
67
65
  server.add_generic_rpc_handlers((generic_handler,))
68
66
 
69
67
 
70
- # This class is part of an EXPERIMENTAL API.
68
+ # This class is part of an EXPERIMENTAL API.
71
69
  class Semgrep(object):
72
70
  """
73
71
  Expose all of the SCANOSS Cryptography RPCs here
74
72
  """
75
73
 
76
74
  @staticmethod
77
- def Echo(request,
75
+ def Echo(
76
+ request,
77
+ target,
78
+ options=(),
79
+ channel_credentials=None,
80
+ call_credentials=None,
81
+ insecure=False,
82
+ compression=None,
83
+ wait_for_ready=None,
84
+ timeout=None,
85
+ metadata=None,
86
+ ):
87
+ return grpc.experimental.unary_unary(
88
+ request,
78
89
  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.semgrep.v2.Semgrep/Echo',
90
+ '/scanoss.api.semgrep.v2.Semgrep/Echo',
88
91
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
89
92
  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)
93
+ options,
94
+ channel_credentials,
95
+ insecure,
96
+ call_credentials,
97
+ compression,
98
+ wait_for_ready,
99
+ timeout,
100
+ metadata,
101
+ )
92
102
 
93
103
  @staticmethod
94
- def GetIssues(request,
104
+ def GetIssues(
105
+ request,
106
+ target,
107
+ options=(),
108
+ channel_credentials=None,
109
+ call_credentials=None,
110
+ insecure=False,
111
+ compression=None,
112
+ wait_for_ready=None,
113
+ timeout=None,
114
+ metadata=None,
115
+ ):
116
+ return grpc.experimental.unary_unary(
117
+ request,
95
118
  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.semgrep.v2.Semgrep/GetIssues',
119
+ '/scanoss.api.semgrep.v2.Semgrep/GetIssues',
105
120
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
106
121
  scanoss_dot_api_dot_semgrep_dot_v2_dot_scanoss__semgrep__pb2.SemgrepResponse.FromString,
107
- options, channel_credentials,
108
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
122
+ options,
123
+ channel_credentials,
124
+ insecure,
125
+ call_credentials,
126
+ compression,
127
+ wait_for_ready,
128
+ timeout,
129
+ metadata,
130
+ )
@@ -1,23 +1,23 @@
1
1
  """
2
- SPDX-License-Identifier: MIT
2
+ SPDX-License-Identifier: MIT
3
3
 
4
- Copyright (c) 2022, SCANOSS
4
+ Copyright (c) 2022, 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) 2022, SCANOSS
4
+ Copyright (c) 2022, 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/vulnerabilities/v2/scanoss-vulnerabilities.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,34 +17,43 @@ 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/vulnerabilities/v2/scanoss-vulnerabilities.proto\x12\x1escanoss.api.vulnerabilities.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"\x8d\x01\n\x14VulnerabilityRequest\x12I\n\x05purls\x18\x01 \x03(\x0b\x32:.scanoss.api.vulnerabilities.v2.VulnerabilityRequest.Purls\x1a*\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x13\n\x0brequirement\x18\x02 \x01(\t\"\xab\x01\n\x0b\x43peResponse\x12@\n\x05purls\x18\x01 \x03(\x0b\x32\x31.scanoss.api.vulnerabilities.v2.CpeResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a#\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0c\n\x04\x63pes\x18\x02 \x03(\t\"\xa3\x03\n\x15VulnerabilityResponse\x12J\n\x05purls\x18\x01 \x03(\x0b\x32;.scanoss.api.vulnerabilities.v2.VulnerabilityResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x8f\x01\n\x0fVulnerabilities\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03\x63ve\x18\x02 \x01(\t\x12\x0b\n\x03url\x18\x03 \x01(\t\x12\x0f\n\x07summary\x18\x04 \x01(\t\x12\x10\n\x08severity\x18\x05 \x01(\t\x12\x11\n\tpublished\x18\x06 \x01(\t\x12\x10\n\x08modified\x18\x07 \x01(\t\x12\x0e\n\x06source\x18\x08 \x01(\t\x1au\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12^\n\x0fvulnerabilities\x18\x02 \x03(\x0b\x32\x45.scanoss.api.vulnerabilities.v2.VulnerabilityResponse.Vulnerabilities2\xdb\x03\n\x0fVulnerabilities\x12x\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/api/v2/vulnerabilities/echo:\x01*\x12\x95\x01\n\x07GetCpes\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a+.scanoss.api.vulnerabilities.v2.CpeResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/api/v2/vulnerabilities/cpes:\x01*\x12\xb5\x01\n\x12GetVulnerabilities\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a\x35.scanoss.api.vulnerabilities.v2.VulnerabilityResponse\"2\x82\xd3\xe4\x93\x02,\"\'/api/v2/vulnerabilities/vulnerabilities:\x01*B\xac\x02Z?github.com/scanoss/papi/api/vulnerabilitiesv2;vulnerabilitiesv2\x92\x41\xe7\x01\x12\x80\x01\n\x1dSCANOSS Vulnerability Service\"Z\n\x17scanoss-vulnerabilities\x12*https://github.com/scanoss/vulnerabilities\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/vulnerabilities/v2/scanoss-vulnerabilities.proto\x12\x1escanoss.api.vulnerabilities.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto"\x8d\x01\n\x14VulnerabilityRequest\x12I\n\x05purls\x18\x01 \x03(\x0b\x32:.scanoss.api.vulnerabilities.v2.VulnerabilityRequest.Purls\x1a*\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x13\n\x0brequirement\x18\x02 \x01(\t"\xab\x01\n\x0b\x43peResponse\x12@\n\x05purls\x18\x01 \x03(\x0b\x32\x31.scanoss.api.vulnerabilities.v2.CpeResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a#\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x0c\n\x04\x63pes\x18\x02 \x03(\t"\xa3\x03\n\x15VulnerabilityResponse\x12J\n\x05purls\x18\x01 \x03(\x0b\x32;.scanoss.api.vulnerabilities.v2.VulnerabilityResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x8f\x01\n\x0fVulnerabilities\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0b\n\x03\x63ve\x18\x02 \x01(\t\x12\x0b\n\x03url\x18\x03 \x01(\t\x12\x0f\n\x07summary\x18\x04 \x01(\t\x12\x10\n\x08severity\x18\x05 \x01(\t\x12\x11\n\tpublished\x18\x06 \x01(\t\x12\x10\n\x08modified\x18\x07 \x01(\t\x12\x0e\n\x06source\x18\x08 \x01(\t\x1au\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12^\n\x0fvulnerabilities\x18\x02 \x03(\x0b\x32\x45.scanoss.api.vulnerabilities.v2.VulnerabilityResponse.Vulnerabilities2\xdb\x03\n\x0fVulnerabilities\x12x\n\x04\x45\x63ho\x12".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse"\'\x82\xd3\xe4\x93\x02!"\x1c/api/v2/vulnerabilities/echo:\x01*\x12\x95\x01\n\x07GetCpes\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a+.scanoss.api.vulnerabilities.v2.CpeResponse"\'\x82\xd3\xe4\x93\x02!"\x1c/api/v2/vulnerabilities/cpes:\x01*\x12\xb5\x01\n\x12GetVulnerabilities\x12\x34.scanoss.api.vulnerabilities.v2.VulnerabilityRequest\x1a\x35.scanoss.api.vulnerabilities.v2.VulnerabilityResponse"2\x82\xd3\xe4\x93\x02,"\'/api/v2/vulnerabilities/vulnerabilities:\x01*B\xac\x02Z?github.com/scanoss/papi/api/vulnerabilitiesv2;vulnerabilitiesv2\x92\x41\xe7\x01\x12\x80\x01\n\x1dSCANOSS Vulnerability Service"Z\n\x17scanoss-vulnerabilities\x12*https://github.com/scanoss/vulnerabilities\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
- _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.vulnerabilities.v2.scanoss_vulnerabilities_pb2', globals())
25
+ _builder.BuildTopDescriptorsAndMessages(
26
+ DESCRIPTOR, 'scanoss.api.vulnerabilities.v2.scanoss_vulnerabilities_pb2', globals()
27
+ )
23
28
  if _descriptor._USE_C_DESCRIPTORS == False:
24
-
25
- DESCRIPTOR._options = None
26
- DESCRIPTOR._serialized_options = b'Z?github.com/scanoss/papi/api/vulnerabilitiesv2;vulnerabilitiesv2\222A\347\001\022\200\001\n\035SCANOSS Vulnerability Service\"Z\n\027scanoss-vulnerabilities\022*https://github.com/scanoss/vulnerabilities\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
- _VULNERABILITIES.methods_by_name['Echo']._options = None
28
- _VULNERABILITIES.methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002!\"\034/api/v2/vulnerabilities/echo:\001*'
29
- _VULNERABILITIES.methods_by_name['GetCpes']._options = None
30
- _VULNERABILITIES.methods_by_name['GetCpes']._serialized_options = b'\202\323\344\223\002!\"\034/api/v2/vulnerabilities/cpes:\001*'
31
- _VULNERABILITIES.methods_by_name['GetVulnerabilities']._options = None
32
- _VULNERABILITIES.methods_by_name['GetVulnerabilities']._serialized_options = b'\202\323\344\223\002,\"\'/api/v2/vulnerabilities/vulnerabilities:\001*'
33
- _VULNERABILITYREQUEST._serialized_start=217
34
- _VULNERABILITYREQUEST._serialized_end=358
35
- _VULNERABILITYREQUEST_PURLS._serialized_start=316
36
- _VULNERABILITYREQUEST_PURLS._serialized_end=358
37
- _CPERESPONSE._serialized_start=361
38
- _CPERESPONSE._serialized_end=532
39
- _CPERESPONSE_PURLS._serialized_start=497
40
- _CPERESPONSE_PURLS._serialized_end=532
41
- _VULNERABILITYRESPONSE._serialized_start=535
42
- _VULNERABILITYRESPONSE._serialized_end=954
43
- _VULNERABILITYRESPONSE_VULNERABILITIES._serialized_start=692
44
- _VULNERABILITYRESPONSE_VULNERABILITIES._serialized_end=835
45
- _VULNERABILITYRESPONSE_PURLS._serialized_start=837
46
- _VULNERABILITYRESPONSE_PURLS._serialized_end=954
47
- _VULNERABILITIES._serialized_start=957
48
- _VULNERABILITIES._serialized_end=1432
29
+ DESCRIPTOR._options = None
30
+ DESCRIPTOR._serialized_options = b'Z?github.com/scanoss/papi/api/vulnerabilitiesv2;vulnerabilitiesv2\222A\347\001\022\200\001\n\035SCANOSS Vulnerability Service"Z\n\027scanoss-vulnerabilities\022*https://github.com/scanoss/vulnerabilities\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'
31
+ _VULNERABILITIES.methods_by_name['Echo']._options = None
32
+ _VULNERABILITIES.methods_by_name[
33
+ 'Echo'
34
+ ]._serialized_options = b'\202\323\344\223\002!"\034/api/v2/vulnerabilities/echo:\001*'
35
+ _VULNERABILITIES.methods_by_name['GetCpes']._options = None
36
+ _VULNERABILITIES.methods_by_name[
37
+ 'GetCpes'
38
+ ]._serialized_options = b'\202\323\344\223\002!"\034/api/v2/vulnerabilities/cpes:\001*'
39
+ _VULNERABILITIES.methods_by_name['GetVulnerabilities']._options = None
40
+ _VULNERABILITIES.methods_by_name[
41
+ 'GetVulnerabilities'
42
+ ]._serialized_options = b'\202\323\344\223\002,"\'/api/v2/vulnerabilities/vulnerabilities:\001*'
43
+ _VULNERABILITYREQUEST._serialized_start = 217
44
+ _VULNERABILITYREQUEST._serialized_end = 358
45
+ _VULNERABILITYREQUEST_PURLS._serialized_start = 316
46
+ _VULNERABILITYREQUEST_PURLS._serialized_end = 358
47
+ _CPERESPONSE._serialized_start = 361
48
+ _CPERESPONSE._serialized_end = 532
49
+ _CPERESPONSE_PURLS._serialized_start = 497
50
+ _CPERESPONSE_PURLS._serialized_end = 532
51
+ _VULNERABILITYRESPONSE._serialized_start = 535
52
+ _VULNERABILITYRESPONSE._serialized_end = 954
53
+ _VULNERABILITYRESPONSE_VULNERABILITIES._serialized_start = 692
54
+ _VULNERABILITYRESPONSE_VULNERABILITIES._serialized_end = 835
55
+ _VULNERABILITYRESPONSE_PURLS._serialized_start = 837
56
+ _VULNERABILITYRESPONSE_PURLS._serialized_end = 954
57
+ _VULNERABILITIES._serialized_start = 957
58
+ _VULNERABILITIES._serialized_end = 1432
49
59
  # @@protoc_insertion_point(module_scope)
@@ -1,9 +1,12 @@
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
- from scanoss.api.vulnerabilities.v2 import scanoss_vulnerabilities_pb2 as scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2
7
+ from scanoss.api.vulnerabilities.v2 import (
8
+ scanoss_vulnerabilities_pb2 as scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2,
9
+ )
7
10
 
8
11
 
9
12
  class VulnerabilitiesStub(object):
@@ -18,20 +21,20 @@ class VulnerabilitiesStub(object):
18
21
  channel: A grpc.Channel.
19
22
  """
20
23
  self.Echo = channel.unary_unary(
21
- '/scanoss.api.vulnerabilities.v2.Vulnerabilities/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
- )
24
+ '/scanoss.api.vulnerabilities.v2.Vulnerabilities/Echo',
25
+ request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
26
+ response_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
27
+ )
25
28
  self.GetCpes = channel.unary_unary(
26
- '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetCpes',
27
- request_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
28
- response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.FromString,
29
- )
29
+ '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetCpes',
30
+ request_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
31
+ response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.FromString,
32
+ )
30
33
  self.GetVulnerabilities = channel.unary_unary(
31
- '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetVulnerabilities',
32
- request_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
33
- response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.FromString,
34
- )
34
+ '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetVulnerabilities',
35
+ request_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
36
+ response_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.FromString,
37
+ )
35
38
 
36
39
 
37
40
  class VulnerabilitiesServicer(object):
@@ -40,22 +43,19 @@ class VulnerabilitiesServicer(object):
40
43
  """
41
44
 
42
45
  def Echo(self, request, context):
43
- """Standard echo
44
- """
46
+ """Standard echo"""
45
47
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
46
48
  context.set_details('Method not implemented!')
47
49
  raise NotImplementedError('Method not implemented!')
48
50
 
49
51
  def GetCpes(self, request, context):
50
- """Get CPEs associated with a PURL
51
- """
52
+ """Get CPEs associated with a PURL"""
52
53
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
53
54
  context.set_details('Method not implemented!')
54
55
  raise NotImplementedError('Method not implemented!')
55
56
 
56
57
  def GetVulnerabilities(self, request, context):
57
- """Get vulnerability details
58
- """
58
+ """Get vulnerability details"""
59
59
  context.set_code(grpc.StatusCode.UNIMPLEMENTED)
60
60
  context.set_details('Method not implemented!')
61
61
  raise NotImplementedError('Method not implemented!')
@@ -63,80 +63,117 @@ class VulnerabilitiesServicer(object):
63
63
 
64
64
  def add_VulnerabilitiesServicer_to_server(servicer, server):
65
65
  rpc_method_handlers = {
66
- 'Echo': grpc.unary_unary_rpc_method_handler(
67
- servicer.Echo,
68
- request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
69
- response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
70
- ),
71
- 'GetCpes': grpc.unary_unary_rpc_method_handler(
72
- servicer.GetCpes,
73
- request_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.FromString,
74
- response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.SerializeToString,
75
- ),
76
- 'GetVulnerabilities': grpc.unary_unary_rpc_method_handler(
77
- servicer.GetVulnerabilities,
78
- request_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.FromString,
79
- response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.SerializeToString,
80
- ),
66
+ 'Echo': grpc.unary_unary_rpc_method_handler(
67
+ servicer.Echo,
68
+ request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.FromString,
69
+ response_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.SerializeToString,
70
+ ),
71
+ 'GetCpes': grpc.unary_unary_rpc_method_handler(
72
+ servicer.GetCpes,
73
+ request_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.FromString,
74
+ response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.SerializeToString,
75
+ ),
76
+ 'GetVulnerabilities': grpc.unary_unary_rpc_method_handler(
77
+ servicer.GetVulnerabilities,
78
+ request_deserializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.FromString,
79
+ response_serializer=scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.SerializeToString,
80
+ ),
81
81
  }
82
82
  generic_handler = grpc.method_handlers_generic_handler(
83
- 'scanoss.api.vulnerabilities.v2.Vulnerabilities', rpc_method_handlers)
83
+ 'scanoss.api.vulnerabilities.v2.Vulnerabilities', rpc_method_handlers
84
+ )
84
85
  server.add_generic_rpc_handlers((generic_handler,))
85
86
 
86
87
 
87
- # This class is part of an EXPERIMENTAL API.
88
+ # This class is part of an EXPERIMENTAL API.
88
89
  class Vulnerabilities(object):
89
90
  """
90
91
  Expose all of the SCANOSS Vulnerability RPCs here
91
92
  """
92
93
 
93
94
  @staticmethod
94
- def Echo(request,
95
+ def Echo(
96
+ request,
97
+ target,
98
+ options=(),
99
+ channel_credentials=None,
100
+ call_credentials=None,
101
+ insecure=False,
102
+ compression=None,
103
+ wait_for_ready=None,
104
+ timeout=None,
105
+ metadata=None,
106
+ ):
107
+ return grpc.experimental.unary_unary(
108
+ request,
95
109
  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.vulnerabilities.v2.Vulnerabilities/Echo',
110
+ '/scanoss.api.vulnerabilities.v2.Vulnerabilities/Echo',
105
111
  scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
106
112
  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)
113
+ options,
114
+ channel_credentials,
115
+ insecure,
116
+ call_credentials,
117
+ compression,
118
+ wait_for_ready,
119
+ timeout,
120
+ metadata,
121
+ )
109
122
 
110
123
  @staticmethod
111
- def GetCpes(request,
124
+ def GetCpes(
125
+ request,
126
+ target,
127
+ options=(),
128
+ channel_credentials=None,
129
+ call_credentials=None,
130
+ insecure=False,
131
+ compression=None,
132
+ wait_for_ready=None,
133
+ timeout=None,
134
+ metadata=None,
135
+ ):
136
+ return grpc.experimental.unary_unary(
137
+ request,
112
138
  target,
113
- options=(),
114
- channel_credentials=None,
115
- call_credentials=None,
116
- insecure=False,
117
- compression=None,
118
- wait_for_ready=None,
119
- timeout=None,
120
- metadata=None):
121
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetCpes',
139
+ '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetCpes',
122
140
  scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
123
141
  scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.CpeResponse.FromString,
124
- options, channel_credentials,
125
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
142
+ options,
143
+ channel_credentials,
144
+ insecure,
145
+ call_credentials,
146
+ compression,
147
+ wait_for_ready,
148
+ timeout,
149
+ metadata,
150
+ )
126
151
 
127
152
  @staticmethod
128
- def GetVulnerabilities(request,
153
+ def GetVulnerabilities(
154
+ request,
155
+ target,
156
+ options=(),
157
+ channel_credentials=None,
158
+ call_credentials=None,
159
+ insecure=False,
160
+ compression=None,
161
+ wait_for_ready=None,
162
+ timeout=None,
163
+ metadata=None,
164
+ ):
165
+ return grpc.experimental.unary_unary(
166
+ request,
129
167
  target,
130
- options=(),
131
- channel_credentials=None,
132
- call_credentials=None,
133
- insecure=False,
134
- compression=None,
135
- wait_for_ready=None,
136
- timeout=None,
137
- metadata=None):
138
- return grpc.experimental.unary_unary(request, target, '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetVulnerabilities',
168
+ '/scanoss.api.vulnerabilities.v2.Vulnerabilities/GetVulnerabilities',
139
169
  scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityRequest.SerializeToString,
140
170
  scanoss_dot_api_dot_vulnerabilities_dot_v2_dot_scanoss__vulnerabilities__pb2.VulnerabilityResponse.FromString,
141
- options, channel_credentials,
142
- insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
171
+ options,
172
+ channel_credentials,
173
+ insecure,
174
+ call_credentials,
175
+ compression,
176
+ wait_for_ready,
177
+ timeout,
178
+ metadata,
179
+ )