scanoss 1.20.6__py3-none-any.whl → 1.23.0__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.
- protoc_gen_swagger/options/annotations_pb2.py +9 -12
- protoc_gen_swagger/options/annotations_pb2_grpc.py +1 -1
- protoc_gen_swagger/options/openapiv2_pb2.py +96 -98
- protoc_gen_swagger/options/openapiv2_pb2_grpc.py +1 -1
- scanoss/__init__.py +1 -1
- scanoss/api/common/v2/scanoss_common_pb2.py +20 -18
- scanoss/api/common/v2/scanoss_common_pb2_grpc.py +1 -1
- scanoss/api/components/v2/scanoss_components_pb2.py +38 -48
- scanoss/api/components/v2/scanoss_components_pb2_grpc.py +96 -142
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2.py +42 -22
- scanoss/api/cryptography/v2/scanoss_cryptography_pb2_grpc.py +185 -75
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2.py +32 -30
- scanoss/api/dependencies/v2/scanoss_dependencies_pb2_grpc.py +83 -75
- scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2.py +49 -0
- scanoss/api/geoprovenance/v2/scanoss_geoprovenance_pb2_grpc.py +142 -0
- scanoss/api/scanning/v2/scanoss_scanning_pb2.py +20 -10
- scanoss/api/scanning/v2/scanoss_scanning_pb2_grpc.py +70 -40
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2.py +18 -22
- scanoss/api/semgrep/v2/scanoss_semgrep_pb2_grpc.py +49 -71
- scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2.py +27 -37
- scanoss/api/vulnerabilities/v2/scanoss_vulnerabilities_pb2_grpc.py +72 -109
- scanoss/cli.py +393 -84
- scanoss/components.py +21 -11
- scanoss/constants.py +12 -0
- scanoss/data/build_date.txt +1 -1
- scanoss/file_filters.py +272 -57
- scanoss/results.py +92 -109
- scanoss/scanners/__init__.py +23 -0
- scanoss/scanners/container_scanner.py +474 -0
- scanoss/scanners/folder_hasher.py +302 -0
- scanoss/scanners/scanner_config.py +73 -0
- scanoss/scanners/scanner_hfh.py +173 -0
- scanoss/scanoss_settings.py +9 -5
- scanoss/scanossbase.py +9 -3
- scanoss/scanossgrpc.py +143 -18
- scanoss/threadedscanning.py +6 -6
- scanoss/utils/abstract_presenter.py +103 -0
- scanoss/utils/crc64.py +96 -0
- scanoss/utils/simhash.py +198 -0
- {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/METADATA +2 -1
- scanoss-1.23.0.dist-info/RECORD +83 -0
- {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/WHEEL +1 -1
- scanoss/api/provenance/v2/scanoss_provenance_pb2.py +0 -42
- scanoss/api/provenance/v2/scanoss_provenance_pb2_grpc.py +0 -108
- scanoss-1.20.6.dist-info/RECORD +0 -74
- /scanoss/api/{provenance → geoprovenance}/__init__.py +0 -0
- /scanoss/api/{provenance → geoprovenance}/v2/__init__.py +0 -0
- {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/entry_points.txt +0 -0
- {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/licenses/LICENSE +0 -0
- {scanoss-1.20.6.dist-info → scanoss-1.23.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
3
|
+
# source: scanoss/api/geoprovenance/v2/scanoss-geoprovenance.proto
|
|
4
|
+
"""Generated protocol buffer code."""
|
|
5
|
+
from google.protobuf.internal import builder as _builder
|
|
6
|
+
from google.protobuf import descriptor as _descriptor
|
|
7
|
+
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
8
|
+
from google.protobuf import symbol_database as _symbol_database
|
|
9
|
+
# @@protoc_insertion_point(imports)
|
|
10
|
+
|
|
11
|
+
_sym_db = _symbol_database.Default()
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
|
|
15
|
+
from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
16
|
+
from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n8scanoss/api/geoprovenance/v2/scanoss-geoprovenance.proto\x12\x1cscanoss.api.geoprovenance.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"\xd1\x03\n\x13\x43ontributorResponse\x12\x46\n\x05purls\x18\x01 \x03(\x0b\x32\x37.scanoss.api.geoprovenance.v2.ContributorResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x32\n\x10\x44\x65\x63laredLocation\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x10\n\x08location\x18\x02 \x01(\t\x1a\x31\n\x0f\x43uratedLocation\x12\x0f\n\x07\x63ountry\x18\x01 \x01(\t\x12\r\n\x05\x63ount\x18\x02 \x01(\x05\x1a\xd3\x01\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12^\n\x12\x64\x65\x63lared_locations\x18\x02 \x03(\x0b\x32\x42.scanoss.api.geoprovenance.v2.ContributorResponse.DeclaredLocation\x12\\\n\x11\x63urated_locations\x18\x03 \x03(\x0b\x32\x41.scanoss.api.geoprovenance.v2.ContributorResponse.CuratedLocation\"\x99\x02\n\x0eOriginResponse\x12\x41\n\x05purls\x18\x01 \x03(\x0b\x32\x32.scanoss.api.geoprovenance.v2.OriginResponse.Purls\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a,\n\x08Location\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\npercentage\x18\x02 \x01(\x02\x1a_\n\x05Purls\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12H\n\tlocations\x18\x02 \x03(\x0b\x32\x35.scanoss.api.geoprovenance.v2.OriginResponse.Location2\xb9\x03\n\rGeoProvenance\x12v\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\"%\x82\xd3\xe4\x93\x02\x1f\"\x1a/api/v2/geoprovenance/echo:\x01*\x12\x9d\x01\n\x18GetComponentContributors\x12\".scanoss.api.common.v2.PurlRequest\x1a\x31.scanoss.api.geoprovenance.v2.ContributorResponse\"*\x82\xd3\xe4\x93\x02$\"\x1f/api/v2/geoprovenance/countries:\x01*\x12\x8f\x01\n\x12GetComponentOrigin\x12\".scanoss.api.common.v2.PurlRequest\x1a,.scanoss.api.geoprovenance.v2.OriginResponse\"\'\x82\xd3\xe4\x93\x02!\"\x1c/api/v2/geoprovenance/origin:\x01*B\xa4\x02Z;github.com/scanoss/papi/api/geoprovenancev2;geoprovenancev2\x92\x41\xe3\x01\x12}\n\x1eSCANOSS GEO Provenance Service\"V\n\x15scanoss-geoprovenance\x12(https://github.com/scanoss/geoprovenance\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
|
+
|
|
21
|
+
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
22
|
+
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.geoprovenance.v2.scanoss_geoprovenance_pb2', globals())
|
|
23
|
+
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
24
|
+
|
|
25
|
+
DESCRIPTOR._options = None
|
|
26
|
+
DESCRIPTOR._serialized_options = b'Z;github.com/scanoss/papi/api/geoprovenancev2;geoprovenancev2\222A\343\001\022}\n\036SCANOSS GEO Provenance Service\"V\n\025scanoss-geoprovenance\022(https://github.com/scanoss/geoprovenance\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
|
+
_GEOPROVENANCE.methods_by_name['Echo']._options = None
|
|
28
|
+
_GEOPROVENANCE.methods_by_name['Echo']._serialized_options = b'\202\323\344\223\002\037\"\032/api/v2/geoprovenance/echo:\001*'
|
|
29
|
+
_GEOPROVENANCE.methods_by_name['GetComponentContributors']._options = None
|
|
30
|
+
_GEOPROVENANCE.methods_by_name['GetComponentContributors']._serialized_options = b'\202\323\344\223\002$\"\037/api/v2/geoprovenance/countries:\001*'
|
|
31
|
+
_GEOPROVENANCE.methods_by_name['GetComponentOrigin']._options = None
|
|
32
|
+
_GEOPROVENANCE.methods_by_name['GetComponentOrigin']._serialized_options = b'\202\323\344\223\002!\"\034/api/v2/geoprovenance/origin:\001*'
|
|
33
|
+
_CONTRIBUTORRESPONSE._serialized_start=211
|
|
34
|
+
_CONTRIBUTORRESPONSE._serialized_end=676
|
|
35
|
+
_CONTRIBUTORRESPONSE_DECLAREDLOCATION._serialized_start=361
|
|
36
|
+
_CONTRIBUTORRESPONSE_DECLAREDLOCATION._serialized_end=411
|
|
37
|
+
_CONTRIBUTORRESPONSE_CURATEDLOCATION._serialized_start=413
|
|
38
|
+
_CONTRIBUTORRESPONSE_CURATEDLOCATION._serialized_end=462
|
|
39
|
+
_CONTRIBUTORRESPONSE_PURLS._serialized_start=465
|
|
40
|
+
_CONTRIBUTORRESPONSE_PURLS._serialized_end=676
|
|
41
|
+
_ORIGINRESPONSE._serialized_start=679
|
|
42
|
+
_ORIGINRESPONSE._serialized_end=960
|
|
43
|
+
_ORIGINRESPONSE_LOCATION._serialized_start=819
|
|
44
|
+
_ORIGINRESPONSE_LOCATION._serialized_end=863
|
|
45
|
+
_ORIGINRESPONSE_PURLS._serialized_start=865
|
|
46
|
+
_ORIGINRESPONSE_PURLS._serialized_end=960
|
|
47
|
+
_GEOPROVENANCE._serialized_start=963
|
|
48
|
+
_GEOPROVENANCE._serialized_end=1404
|
|
49
|
+
# @@protoc_insertion_point(module_scope)
|
|
@@ -0,0 +1,142 @@
|
|
|
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.geoprovenance.v2 import scanoss_geoprovenance_pb2 as scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class GeoProvenanceStub(object):
|
|
10
|
+
"""*
|
|
11
|
+
Expose all of the SCANOSS Geo 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.geoprovenance.v2.GeoProvenance/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.GetComponentContributors = channel.unary_unary(
|
|
26
|
+
'/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentContributors',
|
|
27
|
+
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
|
|
28
|
+
response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ContributorResponse.FromString,
|
|
29
|
+
)
|
|
30
|
+
self.GetComponentOrigin = channel.unary_unary(
|
|
31
|
+
'/scanoss.api.geoprovenance.v2.GeoProvenance/GetComponentOrigin',
|
|
32
|
+
request_serializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
|
|
33
|
+
response_deserializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.OriginResponse.FromString,
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class GeoProvenanceServicer(object):
|
|
38
|
+
"""*
|
|
39
|
+
Expose all of the SCANOSS Geo Provenance RPCs here
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
def Echo(self, request, context):
|
|
43
|
+
"""Standard echo
|
|
44
|
+
"""
|
|
45
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
46
|
+
context.set_details('Method not implemented!')
|
|
47
|
+
raise NotImplementedError('Method not implemented!')
|
|
48
|
+
|
|
49
|
+
def GetComponentContributors(self, request, context):
|
|
50
|
+
"""Get component-level Geo Provenance based on contributor declared location
|
|
51
|
+
"""
|
|
52
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
53
|
+
context.set_details('Method not implemented!')
|
|
54
|
+
raise NotImplementedError('Method not implemented!')
|
|
55
|
+
|
|
56
|
+
def GetComponentOrigin(self, request, context):
|
|
57
|
+
"""Get component-level Geo Provenance based on contributor origin commit times
|
|
58
|
+
"""
|
|
59
|
+
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
60
|
+
context.set_details('Method not implemented!')
|
|
61
|
+
raise NotImplementedError('Method not implemented!')
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def add_GeoProvenanceServicer_to_server(servicer, server):
|
|
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
|
+
'GetComponentContributors': grpc.unary_unary_rpc_method_handler(
|
|
72
|
+
servicer.GetComponentContributors,
|
|
73
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
|
|
74
|
+
response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.ContributorResponse.SerializeToString,
|
|
75
|
+
),
|
|
76
|
+
'GetComponentOrigin': grpc.unary_unary_rpc_method_handler(
|
|
77
|
+
servicer.GetComponentOrigin,
|
|
78
|
+
request_deserializer=scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.FromString,
|
|
79
|
+
response_serializer=scanoss_dot_api_dot_geoprovenance_dot_v2_dot_scanoss__geoprovenance__pb2.OriginResponse.SerializeToString,
|
|
80
|
+
),
|
|
81
|
+
}
|
|
82
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
83
|
+
'scanoss.api.geoprovenance.v2.GeoProvenance', rpc_method_handlers)
|
|
84
|
+
server.add_generic_rpc_handlers((generic_handler,))
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
# This class is part of an EXPERIMENTAL API.
|
|
88
|
+
class GeoProvenance(object):
|
|
89
|
+
"""*
|
|
90
|
+
Expose all of the SCANOSS Geo Provenance RPCs here
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
@staticmethod
|
|
94
|
+
def Echo(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.geoprovenance.v2.GeoProvenance/Echo',
|
|
105
|
+
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
|
|
106
|
+
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)
|
|
109
|
+
|
|
110
|
+
@staticmethod
|
|
111
|
+
def GetComponentContributors(request,
|
|
112
|
+
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.geoprovenance.v2.GeoProvenance/GetComponentContributors',
|
|
122
|
+
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
|
|
123
|
+
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)
|
|
126
|
+
|
|
127
|
+
@staticmethod
|
|
128
|
+
def GetComponentOrigin(request,
|
|
129
|
+
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.geoprovenance.v2.GeoProvenance/GetComponentOrigin',
|
|
139
|
+
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
|
|
140
|
+
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)
|
|
@@ -2,7 +2,6 @@
|
|
|
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
|
-
|
|
6
5
|
from google.protobuf.internal import builder as _builder
|
|
7
6
|
from google.protobuf import descriptor as _descriptor
|
|
8
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -17,17 +16,28 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
|
17
16
|
from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
|
|
18
17
|
|
|
19
18
|
|
|
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
|
-
)
|
|
19
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n.scanoss/api/scanning/v2/scanoss-scanning.proto\x12\x17scanoss.api.scanning.v2\x1a*scanoss/api/common/v2/scanoss-common.proto\x1a\x1cgoogle/api/annotations.proto\x1a,protoc-gen-swagger/options/annotations.proto\"\xff\x01\n\nHFHRequest\x12\x12\n\nbest_match\x18\x01 \x01(\x08\x12\x11\n\tthreshold\x18\x02 \x01(\x05\x12:\n\x04root\x18\x03 \x01(\x0b\x32,.scanoss.api.scanning.v2.HFHRequest.Children\x1a\x8d\x01\n\x08\x43hildren\x12\x0f\n\x07path_id\x18\x01 \x01(\t\x12\x16\n\x0esim_hash_names\x18\x02 \x01(\t\x12\x18\n\x10sim_hash_content\x18\x03 \x01(\t\x12>\n\x08\x63hildren\x18\x04 \x03(\x0b\x32,.scanoss.api.scanning.v2.HFHRequest.Children\"\xc1\x02\n\x0bHFHResponse\x12<\n\x07results\x18\x01 \x03(\x0b\x32+.scanoss.api.scanning.v2.HFHResponse.Result\x12\x35\n\x06status\x18\x02 \x01(\x0b\x32%.scanoss.api.common.v2.StatusResponse\x1a\x39\n\tComponent\x12\x0c\n\x04purl\x18\x01 \x01(\t\x12\x10\n\x08versions\x18\x02 \x03(\t\x12\x0c\n\x04rank\x18\x03 \x01(\x05\x1a\x81\x01\n\x06Result\x12\x0f\n\x07path_id\x18\x01 \x01(\t\x12\x42\n\ncomponents\x18\x02 \x03(\x0b\x32..scanoss.api.scanning.v2.HFHResponse.Component\x12\x13\n\x0bprobability\x18\x03 \x01(\x02\x12\r\n\x05stage\x18\x04 \x01(\x05\x32\x81\x02\n\x08Scanning\x12q\n\x04\x45\x63ho\x12\".scanoss.api.common.v2.EchoRequest\x1a#.scanoss.api.common.v2.EchoResponse\" \x82\xd3\xe4\x93\x02\x1a\"\x15/api/v2/scanning/echo:\x01*\x12\x81\x01\n\x0e\x46olderHashScan\x12#.scanoss.api.scanning.v2.HFHRequest\x1a$.scanoss.api.scanning.v2.HFHResponse\"$\x82\xd3\xe4\x93\x02\x1e\"\x19/api/v2/scanning/hfh/scan:\x01*B\x8a\x02Z1github.com/scanoss/papi/api/scanningv2;scanningv2\x92\x41\xd3\x01\x12m\n\x18SCANOSS Scanning Service\"L\n\x10scanoss-scanning\x12#https://github.com/scanoss/scanning\x1a\x13support@scanoss.com2\x03\x32.0*\x01\x01\x32\x10\x61pplication/json:\x10\x61pplication/jsonR;\n\x03\x34\x30\x34\x12\x34\n*Returned when the resource does not exist.\x12\x06\n\x04\x9a\x02\x01\x07\x62\x06proto3')
|
|
23
20
|
|
|
24
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
25
22
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.scanning.v2.scanoss_scanning_pb2', globals())
|
|
26
23
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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.methods_by_name['FolderHashScan']._options = None
|
|
30
|
+
_SCANNING.methods_by_name['FolderHashScan']._serialized_options = b'\202\323\344\223\002\036\"\031/api/v2/scanning/hfh/scan:\001*'
|
|
31
|
+
_HFHREQUEST._serialized_start=196
|
|
32
|
+
_HFHREQUEST._serialized_end=451
|
|
33
|
+
_HFHREQUEST_CHILDREN._serialized_start=310
|
|
34
|
+
_HFHREQUEST_CHILDREN._serialized_end=451
|
|
35
|
+
_HFHRESPONSE._serialized_start=454
|
|
36
|
+
_HFHRESPONSE._serialized_end=775
|
|
37
|
+
_HFHRESPONSE_COMPONENT._serialized_start=586
|
|
38
|
+
_HFHRESPONSE_COMPONENT._serialized_end=643
|
|
39
|
+
_HFHRESPONSE_RESULT._serialized_start=646
|
|
40
|
+
_HFHRESPONSE_RESULT._serialized_end=775
|
|
41
|
+
_SCANNING._serialized_start=778
|
|
42
|
+
_SCANNING._serialized_end=1035
|
|
33
43
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,13 +1,15 @@
|
|
|
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
|
-
|
|
4
3
|
import grpc
|
|
5
4
|
|
|
6
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.scanning.v2 import scanoss_scanning_pb2 as scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
class ScanningStub(object):
|
|
10
|
-
"""
|
|
10
|
+
"""*
|
|
11
|
+
Expose all of the SCANOSS Scanning RPCs here
|
|
12
|
+
"""
|
|
11
13
|
|
|
12
14
|
def __init__(self, channel):
|
|
13
15
|
"""Constructor.
|
|
@@ -16,17 +18,32 @@ class ScanningStub(object):
|
|
|
16
18
|
channel: A grpc.Channel.
|
|
17
19
|
"""
|
|
18
20
|
self.Echo = channel.unary_unary(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
'/scanoss.api.scanning.v2.Scanning/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.FolderHashScan = channel.unary_unary(
|
|
26
|
+
'/scanoss.api.scanning.v2.Scanning/FolderHashScan',
|
|
27
|
+
request_serializer=scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHRequest.SerializeToString,
|
|
28
|
+
response_deserializer=scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHResponse.FromString,
|
|
29
|
+
)
|
|
23
30
|
|
|
24
31
|
|
|
25
32
|
class ScanningServicer(object):
|
|
26
|
-
"""
|
|
33
|
+
"""*
|
|
34
|
+
Expose all of the SCANOSS Scanning RPCs here
|
|
35
|
+
"""
|
|
27
36
|
|
|
28
37
|
def Echo(self, request, context):
|
|
29
|
-
"""Standard echo
|
|
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 FolderHashScan(self, request, context):
|
|
45
|
+
"""Scan the given folder request looking for matches
|
|
46
|
+
"""
|
|
30
47
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
31
48
|
context.set_details('Method not implemented!')
|
|
32
49
|
raise NotImplementedError('Method not implemented!')
|
|
@@ -34,45 +51,58 @@ class ScanningServicer(object):
|
|
|
34
51
|
|
|
35
52
|
def add_ScanningServicer_to_server(servicer, server):
|
|
36
53
|
rpc_method_handlers = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
+
'FolderHashScan': grpc.unary_unary_rpc_method_handler(
|
|
60
|
+
servicer.FolderHashScan,
|
|
61
|
+
request_deserializer=scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHRequest.FromString,
|
|
62
|
+
response_serializer=scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHResponse.SerializeToString,
|
|
63
|
+
),
|
|
42
64
|
}
|
|
43
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
65
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
66
|
+
'scanoss.api.scanning.v2.Scanning', rpc_method_handlers)
|
|
44
67
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
45
68
|
|
|
46
69
|
|
|
47
|
-
# This class is part of an EXPERIMENTAL API.
|
|
70
|
+
# This class is part of an EXPERIMENTAL API.
|
|
48
71
|
class Scanning(object):
|
|
49
|
-
"""
|
|
72
|
+
"""*
|
|
73
|
+
Expose all of the SCANOSS Scanning RPCs here
|
|
74
|
+
"""
|
|
50
75
|
|
|
51
76
|
@staticmethod
|
|
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,
|
|
77
|
+
def Echo(request,
|
|
66
78
|
target,
|
|
67
|
-
|
|
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.scanning.v2.Scanning/Echo',
|
|
68
88
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
|
|
69
89
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
|
|
70
|
-
options,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
90
|
+
options, channel_credentials,
|
|
91
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
92
|
+
|
|
93
|
+
@staticmethod
|
|
94
|
+
def FolderHashScan(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.scanning.v2.Scanning/FolderHashScan',
|
|
105
|
+
scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHRequest.SerializeToString,
|
|
106
|
+
scanoss_dot_api_dot_scanning_dot_v2_dot_scanoss__scanning__pb2.HFHResponse.FromString,
|
|
107
|
+
options, channel_credentials,
|
|
108
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
@@ -2,7 +2,6 @@
|
|
|
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
|
-
|
|
6
5
|
from google.protobuf.internal import builder as _builder
|
|
7
6
|
from google.protobuf import descriptor as _descriptor
|
|
8
7
|
from google.protobuf import descriptor_pool as _descriptor_pool
|
|
@@ -17,29 +16,26 @@ from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2
|
|
|
17
16
|
from protoc_gen_swagger.options import annotations_pb2 as protoc__gen__swagger_dot_options_dot_annotations__pb2
|
|
18
17
|
|
|
19
18
|
|
|
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
|
-
)
|
|
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')
|
|
23
20
|
|
|
24
21
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
|
|
25
22
|
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'scanoss.api.semgrep.v2.scanoss_semgrep_pb2', globals())
|
|
26
23
|
if _descriptor._USE_C_DESCRIPTORS == False:
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
_SEMGREP._serialized_end = 850
|
|
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
|
|
45
41
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -1,6 +1,5 @@
|
|
|
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
|
-
|
|
4
3
|
import grpc
|
|
5
4
|
|
|
6
5
|
from scanoss.api.common.v2 import scanoss_common_pb2 as scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2
|
|
@@ -19,15 +18,15 @@ class SemgrepStub(object):
|
|
|
19
18
|
channel: A grpc.Channel.
|
|
20
19
|
"""
|
|
21
20
|
self.Echo = channel.unary_unary(
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
+
)
|
|
26
25
|
self.GetIssues = channel.unary_unary(
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+
)
|
|
31
30
|
|
|
32
31
|
|
|
33
32
|
class SemgrepServicer(object):
|
|
@@ -36,13 +35,15 @@ class SemgrepServicer(object):
|
|
|
36
35
|
"""
|
|
37
36
|
|
|
38
37
|
def Echo(self, request, context):
|
|
39
|
-
"""Standard echo
|
|
38
|
+
"""Standard echo
|
|
39
|
+
"""
|
|
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
|
|
45
|
+
"""Get Potential issues associated with a list of PURLs
|
|
46
|
+
"""
|
|
46
47
|
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
|
47
48
|
context.set_details('Method not implemented!')
|
|
48
49
|
raise NotImplementedError('Method not implemented!')
|
|
@@ -50,81 +51,58 @@ class SemgrepServicer(object):
|
|
|
50
51
|
|
|
51
52
|
def add_SemgrepServicer_to_server(servicer, server):
|
|
52
53
|
rpc_method_handlers = {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
+
),
|
|
63
64
|
}
|
|
64
|
-
generic_handler = grpc.method_handlers_generic_handler(
|
|
65
|
+
generic_handler = grpc.method_handlers_generic_handler(
|
|
66
|
+
'scanoss.api.semgrep.v2.Semgrep', rpc_method_handlers)
|
|
65
67
|
server.add_generic_rpc_handlers((generic_handler,))
|
|
66
68
|
|
|
67
69
|
|
|
68
|
-
# This class is part of an EXPERIMENTAL API.
|
|
70
|
+
# This class is part of an EXPERIMENTAL API.
|
|
69
71
|
class Semgrep(object):
|
|
70
72
|
"""
|
|
71
73
|
Expose all of the SCANOSS Cryptography RPCs here
|
|
72
74
|
"""
|
|
73
75
|
|
|
74
76
|
@staticmethod
|
|
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,
|
|
77
|
+
def Echo(request,
|
|
89
78
|
target,
|
|
90
|
-
|
|
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',
|
|
91
88
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoRequest.SerializeToString,
|
|
92
89
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.EchoResponse.FromString,
|
|
93
|
-
options,
|
|
94
|
-
|
|
95
|
-
insecure,
|
|
96
|
-
call_credentials,
|
|
97
|
-
compression,
|
|
98
|
-
wait_for_ready,
|
|
99
|
-
timeout,
|
|
100
|
-
metadata,
|
|
101
|
-
)
|
|
90
|
+
options, channel_credentials,
|
|
91
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
|
102
92
|
|
|
103
93
|
@staticmethod
|
|
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,
|
|
94
|
+
def GetIssues(request,
|
|
118
95
|
target,
|
|
119
|
-
|
|
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',
|
|
120
105
|
scanoss_dot_api_dot_common_dot_v2_dot_scanoss__common__pb2.PurlRequest.SerializeToString,
|
|
121
106
|
scanoss_dot_api_dot_semgrep_dot_v2_dot_scanoss__semgrep__pb2.SemgrepResponse.FromString,
|
|
122
|
-
options,
|
|
123
|
-
|
|
124
|
-
insecure,
|
|
125
|
-
call_credentials,
|
|
126
|
-
compression,
|
|
127
|
-
wait_for_ready,
|
|
128
|
-
timeout,
|
|
129
|
-
metadata,
|
|
130
|
-
)
|
|
107
|
+
options, channel_credentials,
|
|
108
|
+
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|