🤬
  • ■ ■ ■ ■ ■ ■
    build.gradle
    skipped 34 lines
    35 35   grpcVersion = '1.29.0'
    36 36   gsonVersion = '2.8.6'
    37 37   jaxbVersion = '2.3.1'
     38 + javaxAnnotationVersion = '1.3.2'
    38 39   javaxInjectVersion = '1'
    39 40   jcommanderVersion = '1.48'
    40 41   jsoupVersion = '1.9.2'
    skipped 20 lines
    61 62   guice: "com.google.inject:guice:${guiceVersion}",
    62 63   guice_assisted: "com.google.inject.extensions:guice-assistedinject:${guiceVersion}",
    63 64   grpc_protobuf: "io.grpc:grpc-protobuf:${grpcVersion}",
     65 + grpc_stub: "io.grpc:grpc-stub:${grpcVersion}",
     66 + javax_annotations: "javax.annotation:javax.annotation-api:${javaxAnnotationVersion}",
    64 67   gson: "com.google.code.gson:gson:${gsonVersion}",
    65 68   jaxb_runtime: "org.glassfish.jaxb:jaxb-runtime:${jaxbVersion}",
    66 69   javax_inject: "javax.inject:javax.inject:${javaxInjectVersion}",
    skipped 153 lines
  • ■ ■ ■ ■ ■ ■
    proto/build.gradle
    skipped 37 lines
    38 38  dependencies {
    39 39   compile deps.protobuf
    40 40   compile deps.grpc_protobuf
     41 + compile deps.grpc_stub
     42 + compile deps.javax_annotations
    41 43  }
    42 44   
  • ■ ■ ■ ■ ■ ■
    proto/plugin_representation.proto
    skipped 13 lines
    14 14   * limitations under the License.
    15 15   */
    16 16   
    17  -// Data representation of a tsunami plugin definition passed between language servers.
     17 +// Representation of a tsunami plugin definition passed between language servers.
    18 18  syntax = "proto3";
    19 19   
    20 20  package tsunami.proto;
    skipped 18 lines
    39 39   bool for_web_service = 4;
    40 40  }
    41 41   
    42  -// Represents a PluginInfo annotation placeholder used by the PluginDefinition proto above.
     42 +// Represents a PluginInfo annotation placeholder used by the
     43 +// PluginDefinition proto above.
    43 44  message PluginInfo {
    44 45   enum PluginType {
    45 46   // Plugin is an unspecified type.
    skipped 22 lines
    68 69   string author = 5;
    69 70  }
    70 71   
    71  -// Represents a ForServiceName annotation placeholder used by the PluginDefinition proto above.
     72 +// Represents a ForServiceName annotation placeholder used by the
     73 +// PluginDefinition proto above.
    72 74  message TargetServiceName {
    73 75   // The value of the name of the target.
    74 76   repeated string value = 1;
    75 77  }
    76 78   
    77  -// Represents a ForSoftware annotation placeholder used by the PluginDefinition proto above.
     79 +// Represents a ForSoftware annotation placeholder used by the
     80 +// PluginDefinition proto above.
    78 81  message TargetSoftware {
    79 82   // The name of the target software, case insensitive.
    80 83   string name = 1;
    skipped 5 lines
  • ■ ■ ■ ■ ■ ■
    proto/plugin_service.proto
     1 +/*
     2 + * Copyright 2020 Google LLC
     3 + *
     4 + * Licensed under the Apache License, Version 2.0 (the "License");
     5 + * you may not use this file except in compliance with the License.
     6 + * You may obtain a copy of the License at
     7 + *
     8 + * http://www.apache.org/licenses/LICENSE-2.0
     9 + *
     10 + * Unless required by applicable law or agreed to in writing, software
     11 + * distributed under the License is distributed on an "AS IS" BASIS,
     12 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 + * See the License for the specific language governing permissions and
     14 + * limitations under the License.
     15 + */
     16 + 
     17 +// Model for the plugin RPC service protocol.
     18 +syntax = "proto3";
     19 + 
     20 +package tsunami.proto;
     21 + 
     22 +import "plugin_representation.proto";
     23 +import "detection.proto";
     24 +import "reconnaissance.proto";
     25 +import "network_service.proto";
     26 + 
     27 +option java_multiple_files = true;
     28 +option java_outer_classname = "PluginServiceProtos";
     29 +option java_package = "com.google.tsunami.proto";
     30 +option go_package = "github.com/google/tsunami-security-scanner/proto";
     31 + 
     32 +// Represents a run request with all matched plugins that will need to run
     33 +// as well as the target to run against.
     34 +message RunRequest {
     35 + // Target of the plugins.
     36 + TargetInfo target = 1;
     37 + // All matched plugins that will need to run.
     38 + repeated MatchedPlugin plugins = 2;
     39 +}
     40 + 
     41 +// Represents the plugin needed to run by the language-specific server
     42 +// as well as all the matched network services for the plugin.
     43 +message MatchedPlugin {
     44 + // All matched network services from the reconnaissance report.
     45 + repeated NetworkService services = 1;
     46 + // Plugin to run.
     47 + PluginDefinition plugin = 2;
     48 +}
     49 + 
     50 +// Represents a run response with the only field being all DetectionReports
     51 +// generated by the language-specific server.
     52 +message RunResponse {
     53 + DetectionReportList reports = 1;
     54 +}
     55 + 
     56 +// Represents a request to list all plugins from the requested server.
     57 +message ListPluginsRequest {}
     58 + 
     59 +// Represents a response containing a list of all plugins
     60 +// from the requested server.
     61 +message ListPluginsResponse {
     62 + repeated PluginDefinition plugins = 1;
     63 +}
     64 + 
     65 +// Represents the plugin service, two RPCs for running plugins
     66 +// and listing plugins, respectively.
     67 +service PluginService {
     68 + // Performs a run request to run all language plugins specified by the request.
     69 + rpc Run(RunRequest) returns (RunResponse) {}
     70 + // Sends a request to list all plugins from the respective language server.
     71 + rpc ListPlugins(ListPluginsRequest) returns (ListPluginsResponse) {}
     72 +}
     73 + 
Please wait...
Page is in error, reload to recover