github.com/devseccon/trivy@v0.47.1-0.20231123133102-bd902a0bd996/rpc/scanner/service.proto (about) 1 syntax = "proto3"; 2 3 package trivy.scanner.v1; 4 option go_package = "github.com/devseccon/trivy/rpc/scanner;scanner"; 5 6 import "rpc/common/service.proto"; 7 8 service Scanner { 9 rpc Scan(ScanRequest) returns (ScanResponse); 10 } 11 12 message ScanRequest { 13 string target = 1; // image name or tar file path 14 string artifact_id = 2; 15 repeated string blob_ids = 3; 16 ScanOptions options = 4; 17 } 18 19 // cf. 20 // https://stackoverflow.com/questions/38886789/protobuf3-how-to-describe-map-of-repeated-string 21 message Licenses { 22 repeated string names = 1; 23 } 24 25 message ScanOptions { 26 repeated string vuln_type = 1; 27 repeated string scanners = 2; 28 bool list_all_packages = 3; 29 map<string, Licenses> license_categories = 4; 30 bool include_dev_deps = 5; 31 } 32 33 message ScanResponse { 34 common.OS os = 1; 35 repeated Result results = 3; 36 } 37 38 // Result is the same as github.com/devseccon/trivy/pkg/report.Result 39 message Result { 40 string target = 1; 41 repeated common.Vulnerability vulnerabilities = 2; 42 repeated common.DetectedMisconfiguration misconfigurations = 4; 43 string class = 6; 44 string type = 3; 45 repeated common.Package packages = 5; 46 repeated common.CustomResource custom_resources = 7; 47 repeated common.SecretFinding secrets = 8; 48 repeated common.DetectedLicense licenses = 9; 49 }