github.com/google/osv-scalibr@v0.4.1/binary/proto/config.proto (about)

     1  /*
     2   * Copyright 2025 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  syntax = "proto3";
    18  
    19  package scalibr;
    20  
    21  option go_package = "github.com/google/osv-scalibr/binary/proto/config_go_proto";
    22  option java_multiple_files = true;
    23  option java_outer_classname = "Config";
    24  
    25  // Proto file describing the SCALIBR plugin configs. Whenever this proto is
    26  // modified make sure to regenerate the go_proto file by running
    27  // `make protos`
    28  
    29  message PluginConfig {
    30    // Global config values that apply to multiple plugins.
    31  
    32    // The maximum file size the plugin will process.
    33    int64 max_file_size_bytes = 1;
    34    // The local directory to store the downloaded manifests during dependency
    35    // resolution.
    36    string local_registry = 3;
    37    // If true, do not try to create google.DefaultClient for Artifact Registry
    38    // during dependency resolution.
    39    bool disable_google_auth = 4;
    40  
    41    // Config values that only apply to a single plugin.
    42    repeated PluginSpecificConfig plugin_specific = 2;
    43  }
    44  
    45  message PluginSpecificConfig {
    46    oneof config {
    47      GoBinaryConfig go_binary = 1;
    48      GovulncheckConfig govulncheck = 2;
    49      ArchiveConfig archive = 3;
    50      OVAConfig ova = 4;
    51      VDIConfig vdi = 5;
    52      VMDKConfig vmdk = 6;
    53      HashiCorpVaultValidatorConfig hashicorp_vault_validator = 7;
    54      SDPInspectConfig sdp_inspect = 8;
    55      POMXMLNetConfig pom_xml_net = 9;
    56    }
    57  }
    58  
    59  message GoBinaryConfig {
    60    // Enables extracting the module version from the Go binary content.
    61    bool version_from_content = 1;
    62  }
    63  
    64  message GovulncheckConfig {
    65    // Path to the offline vuln DB to pass to govunlcheck. If empty,
    66    // the detector will query vulns from the net instead.
    67    string offline_vuln_db_path = 1;
    68  }
    69  
    70  message ArchiveConfig {
    71    // The maximum file size the plugin will process.
    72    // If set, this overrides the global max_file_size_bytes configuration
    73    // for this specific plugin.
    74    int64 max_file_size_bytes = 1;
    75  }
    76  
    77  message OVAConfig {
    78    // The maximum file size the plugin will process.
    79    // If set, this overrides the global max_file_size_bytes configuration
    80    // for this specific plugin.
    81    int64 max_file_size_bytes = 1;
    82  }
    83  
    84  message VDIConfig {
    85    // The maximum file size the plugin will process.
    86    // If set, this overrides the global max_file_size_bytes configuration
    87    // for this specific plugin.
    88    int64 max_file_size_bytes = 1;
    89  }
    90  
    91  message VMDKConfig {
    92    // The maximum file size the plugin will process.
    93    // If set, this overrides the global max_file_size_bytes configuration
    94    // for this specific plugin.
    95    int64 max_file_size_bytes = 1;
    96  }
    97  
    98  message HashiCorpVaultValidatorConfig {
    99    // The URL of the Vault server to connect to.
   100    // https://developer.hashicorp.com/vault
   101    string vault_url = 1;
   102  }
   103  
   104  message SDPInspectConfig {
   105    // The GCP project id to use for Sensitive Data Protection InspectContent API
   106    // calls.
   107    string project_id = 1;
   108  }
   109  
   110  message POMXMLNetConfig {
   111    // The URL of the upstream Maven registry.
   112    string upstream_registry = 1;
   113  }