├── uploadartifact.go ├── deleteartifacts.go ├── addclientslabels.go ├── removeclientslabels.go ├── listclientslabels.go ├── listartifacts.go ├── searchclients.go ├── getclient.go ├── generate.go ├── acls.proto ├── generate └── gen-functions.sh ├── examples └── export-client-list │ └── export-client-list.go ├── analysis.proto ├── README.md ├── anomaly.proto ├── apiclient.go ├── semantic.proto ├── output_plugin.proto ├── data_server.proto ├── data_store.proto ├── artifact.proto ├── config_file.proto ├── checks.proto ├── anomaly.pb.go ├── knowledge_base.proto ├── analysis.pb.go ├── semantic.pb.go ├── LICENSE ├── acls.pb.go ├── artifact.pb.go ├── output_plugin.pb.go ├── export.proto └── data_store.pb.go /uploadartifact.go: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by ./generate/gen-functions.sh 2 | 3 | package apiclient 4 | 5 | func (c APIClient) UploadArtifact(rq ApiUploadArtifactArgs) error { 6 | return c.post("/api/artifacts/upload", &rq) 7 | } 8 | -------------------------------------------------------------------------------- /deleteartifacts.go: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by ./generate/gen-functions.sh 2 | 3 | package apiclient 4 | 5 | func (c APIClient) DeleteArtifacts(rq ApiDeleteArtifactsArgs) error { 6 | return c.post("/api/artifacts/delete", &rq) 7 | } 8 | -------------------------------------------------------------------------------- /addclientslabels.go: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by ./generate/gen-functions.sh 2 | 3 | package apiclient 4 | 5 | func (c APIClient) AddClientsLabels(rq ApiAddClientsLabelsArgs) error { 6 | return c.post("/api/clients/labels/add", &rq) 7 | } 8 | -------------------------------------------------------------------------------- /removeclientslabels.go: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by ./generate/gen-functions.sh 2 | 3 | package apiclient 4 | 5 | func (c APIClient) RemoveClientsLabels(rq ApiRemoveClientsLabelsArgs) error { 6 | return c.post("/api/clients/labels/remove", &rq) 7 | } 8 | -------------------------------------------------------------------------------- /listclientslabels.go: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by ./generate/gen-functions.sh 2 | 3 | package apiclient 4 | 5 | func (c APIClient) ListClientsLabels() (rs *ApiListClientsLabelsResult, err error) { 6 | rs = new(ApiListClientsLabelsResult) 7 | if err := c.get("/api/clients/labels", nil, rs); err != nil { 8 | return nil, err 9 | } 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /listartifacts.go: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by ./generate/gen-functions.sh 2 | 3 | package apiclient 4 | 5 | func (c APIClient) ListArtifacts(rq ApiListArtifactsArgs) (rs *ApiListArtifactsResult, err error) { 6 | rs = new(ApiListArtifactsResult) 7 | if err := c.do("GET", "/api/artifacts", &rq, rs); err != nil { 8 | return nil, err 9 | } 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /searchclients.go: -------------------------------------------------------------------------------- 1 | // This file has been autogenerated by ./generate/gen-functions.sh 2 | 3 | package apiclient 4 | 5 | func (c APIClient) SearchClients(rq ApiSearchClientsArgs) (rs *ApiSearchClientsResult, err error) { 6 | rs = new(ApiSearchClientsResult) 7 | if err := c.do("GET", "/api/clients", &rq, rs); err != nil { 8 | return nil, err 9 | } 10 | return 11 | } 12 | -------------------------------------------------------------------------------- /getclient.go: -------------------------------------------------------------------------------- 1 | package apiclient 2 | 3 | import ( 4 | "net/url" 5 | "path" 6 | "strconv" 7 | ) 8 | 9 | func (c APIClient) GetClient(client string, timestamp uint64) (rs *ApiGetClientResult, err error) { 10 | rs = new(ApiGetClientResult) 11 | values := make(url.Values) 12 | if timestamp != 0 { 13 | values.Set("timestamp", strconv.FormatUint(timestamp, 10)) 14 | } 15 | if err := c.get(path.Join("/api/clients", client), values, rs); err != nil { 16 | return nil, err 17 | } 18 | return 19 | } 20 | -------------------------------------------------------------------------------- /generate.go: -------------------------------------------------------------------------------- 1 | package apiclient 2 | 3 | //go:generate -command protoc sh -c "protoc -I. --go_out=import_path=apiclient:. *.proto; sed -i -e s,google/protobuf,github.com/golang/protobuf/protoc-gen-go/descriptor, semantic.pb.go" 4 | //go:generate protoc 5 | 6 | //go:generate -command genfunc ./generate/gen-functions.sh 7 | 8 | //go:generate genfunc SearchClients get /api/clients 9 | 10 | //go:generate genfunc AddClientsLabels post-simple /api/clients/labels/add 11 | //go:generate genfunc RemoveClientsLabels post-simple /api/clients/labels/remove 12 | //go:generate genfunc ListClientsLabels get-simple /api/clients/labels 13 | 14 | //go:generate genfunc ListArtifacts get /api/artifacts 15 | //go:generate genfunc DeleteArtifacts post-simple /api/artifacts/delete 16 | //go:generate genfunc UploadArtifact post-simple /api/artifacts/upload 17 | -------------------------------------------------------------------------------- /acls.proto: -------------------------------------------------------------------------------- 1 | 2 | 3 | syntax = "proto2"; 4 | 5 | import "semantic.proto"; 6 | 7 | 8 | 9 | message ClientApprovalAuthorization { 10 | optional string label = 1 [(sem_type) = { 11 | description: "Client label this approval ACL applies to." 12 | }]; 13 | optional bool requester_must_be_authorized = 2 [(sem_type) = { 14 | description: "If true, approval requester must also be listed in the ACL." 15 | " This allows you to specify machines that can only be " 16 | "accessed by the listed users." 17 | }, default = false]; 18 | 19 | optional uint64 num_approvers_required = 3 [(sem_type) = { 20 | description: "Number of people from this ACL that need to approve " 21 | "before access is granted." 22 | }, default = 1]; 23 | 24 | repeated string users = 4 [(sem_type) = { 25 | description: "List of users that can approve clients with this label." 26 | }]; 27 | 28 | repeated string groups = 5 [(sem_type) = { 29 | description: "List of groups that can approve clients with this label." 30 | }]; 31 | } 32 | 33 | -------------------------------------------------------------------------------- /generate/gen-functions.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -eu 4 | 5 | funcname=$1 6 | method=$2 7 | path=$3 8 | filename=$(echo $funcname | tr 'A-Z' 'a-z') 9 | 10 | case "$method" in 11 | get|post) 12 | cat < $filename.go 13 | // This file has been autogenerated by $0 14 | 15 | package apiclient 16 | 17 | func (c APIClient) ${funcname}(rq Api${funcname}Args) (rs *Api${funcname}Result, err error) { 18 | rs = new(Api${funcname}Result) 19 | if err := c.do("GET", "${path}", &rq, rs); err != nil { 20 | return nil, err 21 | } 22 | return 23 | } 24 | EOF 25 | ;; 26 | get-simple) 27 | cat < $filename.go 28 | // This file has been autogenerated by $0 29 | 30 | package apiclient 31 | 32 | func (c APIClient) ${funcname}() (rs *Api${funcname}Result, err error) { 33 | rs = new(Api${funcname}Result) 34 | if err := c.get("${path}", nil, rs); err != nil { 35 | return nil, err 36 | } 37 | return 38 | } 39 | EOF 40 | ;; 41 | post-simple) 42 | cat < $filename.go 43 | // This file has been autogenerated by $0 44 | 45 | package apiclient 46 | 47 | func (c APIClient) ${funcname}(rq Api${funcname}Args) error { 48 | return c.post("${path}", &rq) 49 | } 50 | EOF 51 | ;; 52 | *) 53 | echo "unknown method $method" >&2; exit 1 54 | ;; 55 | esac 56 | -------------------------------------------------------------------------------- /examples/export-client-list/export-client-list.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/hillu/go-grr-apiclient" 5 | 6 | "crypto/tls" 7 | "encoding/csv" 8 | "flag" 9 | "log" 10 | "net/http" 11 | "net/url" 12 | "os" 13 | "strings" 14 | ) 15 | 16 | func main() { 17 | var urlstr, user, pass string 18 | flag.StringVar(&urlstr, "url", "http://localhost:8000", "Base URL for GRR AdminUI server") 19 | flag.StringVar(&user, "user", "", "Username") 20 | flag.StringVar(&pass, "pass", "", "Passwort") 21 | flag.Parse() 22 | baseurl, err := url.Parse(urlstr) 23 | if err != nil { 24 | log.Fatal(err) 25 | } 26 | c := apiclient.APIClient{ 27 | BaseURL: baseurl, User: user, Pass: pass, 28 | Client: &http.Client{Transport: &http.Transport{ 29 | TLSClientConfig: &tls.Config{InsecureSkipVerify: true}}, 30 | }, 31 | } 32 | result, err := c.SearchClients(apiclient.ApiSearchClientsArgs{}) 33 | if err != nil { 34 | log.Fatal(err) 35 | } 36 | w := csv.NewWriter(os.Stdout) 37 | defer w.Flush() 38 | w.Write([]string{"Client ID", "Host", "Labels"}) 39 | for _, client := range result.GetItems() { 40 | var labels []string 41 | for _, label := range client.GetLabels() { 42 | labels = append(labels, label.GetName()) 43 | } 44 | w.Write([]string{ 45 | client.GetUrn(), 46 | client.GetOsInfo().GetNode(), 47 | strings.Join(labels, " "), 48 | }) 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /analysis.proto: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All Rights Reserved 2 | 3 | // These are protobufs used in various analysis jobs. 4 | 5 | syntax = "proto2"; 6 | 7 | import "jobs.proto"; 8 | import "semantic.proto"; 9 | 10 | 11 | // A graph is a way to represent data. 12 | message Sample { 13 | optional string label = 1; 14 | optional uint64 x_value = 2; 15 | optional uint64 y_value = 3; 16 | }; 17 | 18 | message SampleFloat { 19 | optional string label = 1; 20 | optional float x_value = 2; 21 | optional float y_value = 3; 22 | }; 23 | 24 | message Graph { 25 | optional string title = 1; 26 | optional string xtitle = 2; 27 | optional string ytitle = 3; 28 | repeated Sample data = 4; 29 | optional uint32 x_scale = 5 [default = 1]; 30 | optional uint32 y_scale = 6 [default = 1]; 31 | }; 32 | 33 | message GraphFloat { 34 | optional string title = 1; 35 | optional string xtitle = 2; 36 | optional string ytitle = 3; 37 | repeated SampleFloat data = 4; 38 | optional uint32 x_scale = 5 [default = 1]; 39 | optional uint32 y_scale = 6 [default = 1]; 40 | }; 41 | 42 | // The following relate to the timelining functionality. 43 | message Event { 44 | optional uint64 timestamp = 1 [(sem_type) = { 45 | type: "RDFDatetime", 46 | description: "The event timestamp." 47 | }]; 48 | 49 | optional string source = 2 [(sem_type) = { 50 | type: "RDFURN", 51 | description: "The urn of the originating object for this event.", 52 | }]; 53 | 54 | // The name of the object which this event is talking about. 55 | optional string subject = 3; 56 | 57 | // The type of this event. 58 | optional string type = 4; 59 | optional StatEntry stat = 5; 60 | 61 | // The sequential number of this event as stored in the time series. 62 | optional uint32 id = 6; 63 | }; 64 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Golang API Client for GRR Rapid Response 2 | 3 | ## What? 4 | 5 | This package contains Go bindings for the GRR Rapid Response API. It 6 | provides a way to talk to the GRR AdminUI server and is intended for 7 | automation and integration tasks. 8 | 9 | It currently targets the stable 3.1.0.2 release of GRR. This is the 10 | version for which the GRR project has provided an Ubuntu/Xenial 11 | package. There is also a 12 | [package](https://packages.debian.org/sid/grr-server) of the 3.1.0.2 13 | version in Debian/unstable which can be used on Debian 9.x ("stretch") 14 | systems. 15 | 16 | ## Why? 17 | 18 | During the 19 | [March 8 2017 Meetup](https://www.youtube.com/watch?v=SIvf7-Lzp2M), it 20 | was announced that someone inside Google had been working on a Golang 21 | API client and that it would be published "soon". While a Python 22 | client has been added to the 23 | [api_client/python](https://github.com/google/grr/tree/master/api_client/python) 24 | directory, no "official" Go client has been published as of late 25 | May 2017. Until the GRR team at Google decides to publish their code, 26 | I hope that this will be useful. 27 | 28 | ## Hacking / Work in progress 29 | 30 | Data structures have been generated from the Protobuf definitions that 31 | are shipped with GRR 3.1.0.2. 32 | 33 | This package does not yet cover all functions and API endpoints. There 34 | are templates for three basic patterns, see `generate.go`, 35 | `generate/gen-functions.sh` for details: 36 | 37 | - simple GET: fixed path, no parameters, receive Protobuf Message 38 | - simple POST: fixed path, provide Protobuf Message, receive simple answer 39 | - GET/POST: fixed path, provide Protobuf Message, receive Protobuf Message 40 | 41 | For everything else (e.g. `GET /api/clients/`), a small 42 | adapter function has to be written, see `GetClient()` for an example. 43 | 44 | ## License 45 | 46 | Apache 2.0, see LICENSE file in the source distribution. 47 | 48 | ## Author 49 | 50 | Hilko Bengen 51 | -------------------------------------------------------------------------------- /anomaly.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | import "jobs.proto"; 4 | import "semantic.proto"; 5 | 6 | 7 | 8 | // type?, labels 9 | message Anomaly { 10 | 11 | enum AnomalyLevel { 12 | UNKNOWN_ANOMALY_LEVEL = 0; 13 | VERY_LOW = 1; 14 | LOW = 2; 15 | MEDIUM = 3; 16 | HIGH = 4; 17 | VERY_HIGH = 5; 18 | }; 19 | 20 | enum AnomalyType { 21 | UNKNOWN_ANOMALY_TYPE = 0; 22 | PARSER_ANOMALY = 1; // Found during format parsing. 23 | ANALYSIS_ANOMALY = 2; // Found during analysis. 24 | MANUAL_ANOMALY = 3; // Found by humans. 25 | }; 26 | 27 | optional AnomalyType type = 1 [(sem_type) = { 28 | description: "Type of anomaly this represents.", 29 | }]; 30 | 31 | optional AnomalyLevel severity = 2 [(sem_type) = { 32 | description: "Severity of the anomaly if it is a true positive.", 33 | }]; 34 | 35 | optional AnomalyLevel confidence = 3 [(sem_type) = { 36 | description: "Confidence that the anomaly is a true positive.", 37 | }]; 38 | 39 | optional string symptom = 4 [(sem_type) = { 40 | description: "A description of what is anomalous.", 41 | }]; 42 | 43 | optional string explanation = 5 [(sem_type) = { 44 | description: "A description of possible explanations for the anomaly if " 45 | "additional information is available.", 46 | }]; 47 | 48 | optional string generated_by = 6 [(sem_type) = { 49 | description: "String describing what generated the anomaly, this is " 50 | "normally the name of a parser or artifact.", 51 | }]; 52 | 53 | optional PathSpec reference_pathspec = 7 [(sem_type) = { 54 | description: "A pathspec pointing to the object where the anomaly was " 55 | "found." 56 | }]; 57 | 58 | repeated string anomaly_reference_id = 8 [(sem_type) = { 59 | description: "A string used to reference the anomaly in the Anomaly " 60 | "database." 61 | }]; 62 | 63 | repeated string finding = 9 [(sem_type) = { 64 | description: "String descriptions of data that triggered the Anomaly." 65 | }]; 66 | 67 | } 68 | 69 | -------------------------------------------------------------------------------- /apiclient.go: -------------------------------------------------------------------------------- 1 | package apiclient 2 | 3 | import ( 4 | "github.com/golang/protobuf/jsonpb" 5 | "github.com/golang/protobuf/proto" 6 | 7 | "bytes" 8 | "io" 9 | "net/http" 10 | "net/url" 11 | "path" 12 | "strconv" 13 | ) 14 | 15 | type APIError struct { 16 | StatusCode int 17 | Body string 18 | } 19 | 20 | func (e APIError) Error() string { 21 | return "web server error " + strconv.FormatInt(int64(e.StatusCode), 10) 22 | } 23 | 24 | type APIClient struct { 25 | BaseURL *url.URL 26 | User, Pass string 27 | Client *http.Client 28 | } 29 | 30 | func (c APIClient) client() *http.Client { 31 | if c.Client == nil { 32 | return http.DefaultClient 33 | } 34 | return c.Client 35 | } 36 | 37 | func (c APIClient) do(method, apipath string, rqm, rsm proto.Message) error { 38 | u := *c.BaseURL 39 | u.Path = path.Join(u.Path, apipath) 40 | u.RawQuery = "strip_type_info=1" 41 | buf := &bytes.Buffer{} 42 | if err := (&jsonpb.Marshaler{}).Marshal(buf, rqm); err != nil { 43 | return err 44 | } 45 | rq, err := http.NewRequest(method, u.String(), buf) 46 | if err != nil { 47 | return err 48 | } 49 | rq.SetBasicAuth(c.User, c.Pass) 50 | rs, err := c.client().Do(rq) 51 | if err != nil { 52 | return err 53 | } 54 | if rs.StatusCode >= 400 { 55 | buf := &bytes.Buffer{} 56 | io.Copy(buf, rs.Body) 57 | return APIError{ 58 | StatusCode: rs.StatusCode, 59 | Body: buf.String(), 60 | } 61 | } 62 | skipXSS(rs.Body) 63 | if err := jsonpb.Unmarshal(rs.Body, rsm); err != nil { 64 | return err 65 | } 66 | return nil 67 | } 68 | 69 | func (c APIClient) get(apipath string, values url.Values, rsm proto.Message) error { 70 | u := *c.BaseURL 71 | u.Path = path.Join(u.Path, apipath) 72 | if values == nil { 73 | values = make(url.Values) 74 | } 75 | values.Set("strip_type_info", "1") 76 | u.RawQuery = values.Encode() 77 | rq, err := http.NewRequest("GET", u.String(), nil) 78 | if err != nil { 79 | return err 80 | } 81 | rq.SetBasicAuth(c.User, c.Pass) 82 | rs, err := c.client().Do(rq) 83 | if err != nil { 84 | return err 85 | } 86 | if rs.StatusCode >= 400 { 87 | buf := &bytes.Buffer{} 88 | io.Copy(buf, rs.Body) 89 | return APIError{ 90 | StatusCode: rs.StatusCode, 91 | Body: buf.String(), 92 | } 93 | } 94 | skipXSS(rs.Body) 95 | if err := jsonpb.Unmarshal(rs.Body, rsm); err != nil { 96 | return err 97 | } 98 | return nil 99 | } 100 | 101 | func (c APIClient) post(apipath string, rqm proto.Message) error { 102 | u := *c.BaseURL 103 | u.Path = path.Join(u.Path, apipath) 104 | buf := &bytes.Buffer{} 105 | if err := (&jsonpb.Marshaler{}).Marshal(buf, rqm); err != nil { 106 | return err 107 | } 108 | rq, err := http.NewRequest("POST", u.String(), buf) 109 | if err != nil { 110 | return err 111 | } 112 | rq.SetBasicAuth(c.User, c.Pass) 113 | rs, err := c.client().Do(rq) 114 | if err != nil { 115 | return err 116 | } 117 | if rs.StatusCode >= 400 { 118 | buf := &bytes.Buffer{} 119 | io.Copy(buf, rs.Body) 120 | return APIError{ 121 | StatusCode: rs.StatusCode, 122 | Body: buf.String(), 123 | } 124 | } 125 | return nil 126 | } 127 | 128 | func skipXSS(r io.Reader) { 129 | var buf [5]byte 130 | r.Read(buf[:]) 131 | } 132 | -------------------------------------------------------------------------------- /semantic.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | import "google/protobuf/descriptor.proto"; // for FieldOptions 4 | 5 | 6 | 7 | message AnyValue { 8 | optional string type_url = 1; // URL of the protobuf corresponding to value. 9 | optional bytes value = 2; // Serialized protobuf pointed to by type_url. 10 | } 11 | 12 | 13 | message SemanticDescriptor { 14 | // The semantic name of the SemanticValue contained in this field. 15 | optional string type = 1; 16 | 17 | // The type of this field can be specified dynamically. This is the name of 18 | // the attribute to use to retrieve the SemanticValue class to be used for 19 | // parsing this field. 20 | optional string dynamic_type = 5; 21 | optional string description = 2; 22 | 23 | enum Labels { 24 | ADVANCED = 1; // Field should be offered for modification by advanced users 25 | // only. 26 | HIDDEN = 2; // Field should be hidden from UIs - typically for internally 27 | // generated and used fields. 28 | }; 29 | 30 | repeated Labels label = 3; 31 | 32 | // A friendly name for this field - to be used in GUIs etc. 33 | optional string friendly_name = 4; 34 | } 35 | 36 | 37 | message SemanticMessageDescriptor { 38 | // Describe the purpose of this protobuf. 39 | optional string description = 1; 40 | 41 | // Certain RDFValues have union-like semantics. I.e. they are essentially 42 | // selectors of a number of other predefined RDFValues. They have a single 43 | // field that identifies the type of the selected "subvalue" and 44 | // nested fields corresponding to different selections. For examples: 45 | // 46 | // message FileFinderFilter { 47 | // option (semantic) = { 48 | // union_field: "filter_type" 49 | // }; 50 | // enum Type { 51 | // MODIFICATION_TIME = 0 [(description) = "Modification time"]; 52 | // ACCESS_TIME = 1 [(description) = "Access time"]; 53 | // } 54 | // 55 | // optional Type filter_type = 1; 56 | // optional FileFinderModificationTimeFilter modification_time = 2; 57 | // optional FileFinderAccessTimeFilter access_time = 3; 58 | // } 59 | // 60 | // Field specified in union_field is used to determine which nested fields is 61 | // actually used. Field identified by union_field has to be Enum. 62 | // Corresponding nested values have to have names equal to enum values names, 63 | // but in lower case. 64 | // 65 | // At the moment setting union_field attribute on an RDFValue only affects the 66 | // UI rendering. RDFValues with union_field set are rendered with a select 67 | // box that allows users to switch between different available types. 68 | // 69 | // TODO(user): Suggestion from bgalehouse: We can just have "is_union" 70 | // boolean attribute instead of a string "union_field", because for 71 | // union-like structures we can understand the type of the structure by 72 | // inspecting its data fields. 73 | optional string union_field = 2; 74 | } 75 | 76 | extend google.protobuf.FieldOptions { 77 | optional SemanticDescriptor sem_type = 51584972; 78 | } 79 | 80 | extend google.protobuf.MessageOptions { 81 | optional SemanticMessageDescriptor semantic = 51584971; 82 | } 83 | 84 | extend google.protobuf.EnumValueOptions { 85 | optional string description = 48651165; 86 | repeated SemanticDescriptor.Labels label = 48651166; 87 | } 88 | -------------------------------------------------------------------------------- /output_plugin.proto: -------------------------------------------------------------------------------- 1 | 2 | 3 | // The following messages are used to start flows in GRR. 4 | 5 | syntax = "proto2"; 6 | 7 | import "export.proto"; 8 | import "semantic.proto"; 9 | 10 | 11 | message OutputPluginDescriptor { 12 | optional string plugin_name = 1 [(sem_type) = { 13 | description: "The name of the output plugin." 14 | }]; 15 | 16 | optional bytes plugin_args = 2 [(sem_type) = { 17 | dynamic_type: "GetPluginArgsClass", 18 | description: "The parameters for this plugin. Must be an instance " 19 | "of the named plugin's args_type." 20 | }]; 21 | } 22 | 23 | // Next id: 7 24 | message OutputPluginBatchProcessingStatus { 25 | enum Status { 26 | SUCCESS = 0; // Batch was succesffully processed. 27 | ERROR = 1; // Batch wasn't processed due to an error. 28 | } 29 | 30 | optional Status status = 1 [(sem_type) = { 31 | description: "Was this batch successfully processed or not?" 32 | }, default = SUCCESS]; 33 | 34 | optional OutputPluginDescriptor plugin_descriptor = 6 [(sem_type) = { 35 | description: "Descriptor of the output plugin responsible for this result." 36 | }]; 37 | 38 | optional string summary = 3 [(sem_type) = { 39 | description: "Summary message." 40 | }]; 41 | 42 | optional uint64 batch_index = 4 [(sem_type) = { 43 | description: "Number of the batch being processed." 44 | }]; 45 | 46 | optional uint64 batch_size = 5 [(sem_type) = { 47 | description: "Size of the batch beting processed." 48 | }]; 49 | } 50 | 51 | message OutputPluginVerificationResult { 52 | optional string plugin_id = 1 [(sem_type) = { 53 | description: "String identifying the output plugin being checked." 54 | }]; 55 | optional OutputPluginDescriptor plugin_descriptor = 2 [(sem_type) = { 56 | description: "Descriptor of the plugin that's being checked." 57 | }]; 58 | 59 | enum Status { 60 | N_A = 0; 61 | SUCCESS = 1; 62 | WARNING = 2; 63 | FAILURE = 3; 64 | }; 65 | optional Status status = 3; 66 | optional string status_message = 4; 67 | 68 | optional uint64 timestamp = 5 [(sem_type) = { 69 | type: "RDFDatetime", 70 | description: "Timestamp of the check." 71 | }]; 72 | } 73 | 74 | message OutputPluginVerificationResultsList { 75 | repeated OutputPluginVerificationResult results = 1; 76 | } 77 | 78 | message EmailOutputPluginArgs { 79 | optional string email_address = 1 [(sem_type) = { 80 | type: "DomainEmailAddress", 81 | description: "The email address that messages will be sent to.", 82 | }]; 83 | optional uint64 emails_limit = 2 [default=100]; 84 | } 85 | 86 | message BigQueryOutputPluginArgs { 87 | optional ExportOptions export_options = 2 [(sem_type) = { 88 | description: "Export options.", 89 | label: ADVANCED 90 | }]; 91 | optional bool convert_values = 3 [(sem_type) = { 92 | description: "If true, convert values for export-friendly format.", 93 | label: HIDDEN 94 | }, default=true]; 95 | } 96 | 97 | message CSVOutputPluginArgs { 98 | optional ExportOptions export_options = 2 [(sem_type) = { 99 | description: "Export options.", 100 | label: ADVANCED 101 | }]; 102 | optional bool convert_values = 3 [(sem_type) = { 103 | description: "If true, convert values for export-friendly format.", 104 | label: HIDDEN 105 | }, default=true]; 106 | } 107 | -------------------------------------------------------------------------------- /data_server.proto: -------------------------------------------------------------------------------- 1 | 2 | syntax = "proto2"; 3 | import "data_store.proto"; 4 | import "semantic.proto"; 5 | 6 | 7 | 8 | message DataStoreCommand { 9 | enum Command { 10 | MULTI_SET = 0; 11 | // Deprecated 12 | // MULTI_RESOLVE_REGEX = 1; 13 | RESOLVE_MULTI = 2; 14 | DELETE_SUBJECT = 3; 15 | DELETE_ATTRIBUTES = 4; 16 | // Deprecated. 17 | // DELETE_ATTRIBUTES_REGEX = 5; 18 | LOCK_SUBJECT = 6; 19 | UNLOCK_SUBJECT = 7; 20 | EXTEND_SUBJECT = 8; 21 | MULTI_RESOLVE_PREFIX = 9; 22 | SCAN_ATTRIBUTES = 10; 23 | }; 24 | optional Command command = 1; 25 | optional DataStoreRequest request = 2; 26 | } 27 | 28 | message DataServerInterval { 29 | // Range of hashes used by the server. 30 | // Represented as an interval [start, end[. 31 | optional uint64 start = 1; 32 | optional uint64 end = 2; 33 | }; 34 | 35 | message DataServerState { 36 | enum Status { 37 | AVAILABLE = 0; 38 | OFFLINE = 1; 39 | } 40 | 41 | optional Status status = 1; 42 | optional uint64 load = 2; 43 | optional uint64 size = 3; 44 | optional uint64 num_components = 4; 45 | optional uint64 avg_component = 5; 46 | }; 47 | 48 | message DataServerInformation { 49 | optional uint64 index = 1; 50 | optional string address = 2; 51 | optional uint64 port = 3; 52 | optional DataServerState state = 4; 53 | 54 | optional DataServerInterval interval = 5; 55 | }; 56 | 57 | message DataServerMapping { 58 | // Version of the mapping. 59 | optional uint64 version = 1; 60 | 61 | // Number of data servers. 62 | optional uint64 num_servers = 2; 63 | 64 | // Information about each server. 65 | repeated DataServerInformation servers = 3; 66 | 67 | // Pathing information for subject paths. 68 | repeated string pathing = 4; 69 | }; 70 | 71 | message DataServerClientInformation { 72 | // Client username. 73 | optional string username = 1; 74 | 75 | // Client password. 76 | optional string password = 2; 77 | 78 | // Client permissions (r, rw, w). 79 | optional string permissions = 3; 80 | }; 81 | 82 | message DataServerEncryptedCreds { 83 | optional bytes init_vector = 1 [(sem_type) = { 84 | type: "AES128Key" 85 | }]; 86 | optional bytes ciphertext = 2; 87 | optional bytes sha256 = 3 [(sem_type) = { 88 | description: "The sha256 of the plain text encrypted in the ciphertext " 89 | "field."; 90 | }]; 91 | }; 92 | 93 | message DataServerClientCredentials { 94 | repeated DataServerClientInformation users = 1; 95 | }; 96 | 97 | message DataServerRebalance { 98 | // ID of operation. 99 | optional string id = 1; 100 | 101 | // New mapping information. 102 | optional DataServerMapping mapping = 2; 103 | 104 | // Number of files need to move. 105 | repeated uint64 moving = 3; 106 | }; 107 | 108 | message DataServerFileCopy { 109 | // Rebalance operation. 110 | optional string rebalance_id = 1; 111 | 112 | // Directory where the file will be copied. 113 | optional string directory = 2; 114 | 115 | // Filename for the file to copy. 116 | optional string filename = 3; 117 | 118 | // Size of file. 119 | optional uint64 size = 4; 120 | } 121 | 122 | message DataStoreAuthToken { 123 | optional string username = 1; 124 | optional string nonce = 2; 125 | optional string hash = 3; 126 | }; 127 | 128 | message DataStoreRegistrationRequest { 129 | optional uint32 port = 1; 130 | optional DataStoreAuthToken token = 2; 131 | }; 132 | -------------------------------------------------------------------------------- /data_store.proto: -------------------------------------------------------------------------------- 1 | 2 | 3 | // These are protobufs used in various analysis jobs. 4 | 5 | syntax = "proto2"; 6 | import "flows.proto"; 7 | import "jobs.proto"; 8 | import "semantic.proto"; 9 | 10 | 11 | 12 | // Represent a timestamp specification. 13 | message TimestampSpec { 14 | enum Type { 15 | SPECIFIC_TIME = 0; 16 | RANGED_TIME = 1; 17 | ALL_TIMESTAMPS = 2; 18 | NEWEST_TIMESTAMP = 3; 19 | } 20 | 21 | optional Type type = 1 [default = NEWEST_TIMESTAMP]; 22 | 23 | optional uint64 start = 2 [(sem_type) = { 24 | type: "RDFDatetime", 25 | description: "Start of the timestamp range if type is RANGED_TIME." 26 | }]; 27 | 28 | optional uint64 end = 3 [(sem_type) = { 29 | type: "RDFDatetime", 30 | description: "End of the timestamp range if type is RANGED_TIME." 31 | }]; 32 | } 33 | 34 | 35 | message DataStoreValue { 36 | optional string attribute = 1; 37 | optional DataBlob value = 2; 38 | 39 | optional TimestampSpec timestamp = 5; 40 | 41 | // Options specific to the Value. 42 | enum Option { 43 | DEFAULT = 0; 44 | 45 | // The value should replace other values in the data store (Used for Set 46 | // operations). 47 | REPLACE = 1; 48 | }; 49 | optional Option option = 4; 50 | } 51 | 52 | message DataStoreRequest { 53 | repeated string subject = 1 [(sem_type) = { 54 | type: "RDFURN", 55 | description: "The AFF4 object we interact with." 56 | }]; 57 | 58 | repeated DataStoreValue values = 2; 59 | optional TimestampSpec timestamp = 5; 60 | optional ACLToken token = 6; 61 | 62 | optional bool sync = 7; 63 | 64 | optional uint32 limit = 8; 65 | }; 66 | 67 | message QueryASTNode { 68 | optional string name = 1; 69 | repeated bytes args = 2; 70 | repeated QueryASTNode children = 3; 71 | }; 72 | 73 | message DataStoreQuery { 74 | repeated string attributes = 1; 75 | optional QueryASTNode filter = 2; 76 | optional string subject_prefix = 3; 77 | repeated string subjects = 4 [(sem_type) = { 78 | type: "RDFURN", 79 | description: "The AFF4 objects we query for." 80 | }]; 81 | 82 | optional uint32 limit = 5; 83 | optional uint32 limit_start = 6; 84 | optional ACLToken token = 7; 85 | 86 | optional TimestampSpec timestamp = 8; 87 | } 88 | 89 | message ResultSet { 90 | optional string subject = 1 [(sem_type) = { 91 | type: "RDFURN", 92 | description: "The AFF4 object we interact with." 93 | }]; 94 | repeated DataStoreValue values = 2; 95 | optional bytes serialized_result = 3 [(sem_type) = { 96 | description: "Raw field which holds the data serialized in json format." 97 | "This data will be available using the payload attribute." 98 | }]; 99 | } 100 | 101 | message DataStoreResponse { 102 | // Although we can relay exceptions they mess up the logs so we 103 | // explicitly return them here. 104 | enum Status { 105 | OK = 0; 106 | AUTHORIZATION_DENIED = 1; 107 | DATA_STORE_ERROR = 2; 108 | FLOW_ERROR = 3; 109 | TIMEOUT_ERROR = 4; 110 | }; 111 | 112 | repeated ResultSet results = 1; 113 | 114 | // 115 | optional uint32 count = 2 [(sem_type) = { 116 | description: "Total number of results on the server " 117 | "(Can be more than len(results))." 118 | }]; 119 | 120 | optional Status status = 3 [default = OK]; 121 | 122 | optional string status_desc = 4 [(sem_type) = { 123 | description: "Additional human readable message for the failure." 124 | }]; 125 | 126 | optional string failed_subject = 5 [(sem_type) = { 127 | description: "In case of failure, the subject that caused the " 128 | "request to fail." 129 | }]; 130 | 131 | optional DataStoreRequest request = 6 [(sem_type) = { 132 | description: "The request which elicited this response.", 133 | }]; 134 | }; 135 | -------------------------------------------------------------------------------- /artifact.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | import "jobs.proto"; 4 | import "semantic.proto"; 5 | 6 | 7 | 8 | 9 | // Proto representation of an ArtifactSource. 10 | message ArtifactSource { 11 | 12 | enum SourceType { 13 | COLLECTOR_TYPE_UNKNOWN = 0; 14 | FILE = 1; 15 | REGISTRY_KEY = 2; 16 | REGISTRY_VALUE = 3; 17 | WMI = 4; 18 | // ARTIFACT has been deprecated in favor of ARTIFACT_GROUP. 19 | ARTIFACT = 5; 20 | PATH = 6; 21 | DIRECTORY = 7; 22 | ARTIFACT_GROUP = 8; 23 | 24 | // TODO(user): these types will likely be separated out from artifacts in 25 | // the future 26 | GRR_CLIENT_ACTION = 40; 27 | LIST_FILES = 41; 28 | ARTIFACT_FILES = 42; 29 | GREP = 43; 30 | 31 | COMMAND = 45; 32 | REKALL_PLUGIN = 46; 33 | 34 | }; 35 | 36 | optional SourceType type = 1 [(sem_type) = { 37 | description: "The type of source.", 38 | }]; 39 | 40 | optional Dict attributes = 2 [(sem_type) = { 41 | description: "The attributes that describe the source. e.g. file paths.", 42 | }]; 43 | 44 | repeated string conditions = 3 [(sem_type) = { 45 | description: "Object filter conditions that decide if this source" 46 | " applies to a given system.", 47 | }]; 48 | 49 | repeated string returned_types = 4 [(sem_type) = { 50 | description: "A list of types that may be returned by this source. " 51 | "Anything returned that is not in this list will be filtered.", 52 | }]; 53 | 54 | repeated string supported_os = 5 [(sem_type) = { 55 | description: "A list of operating systems to which this source should be " 56 | "applied.", 57 | }]; 58 | 59 | } 60 | 61 | 62 | // Proto representation of an artifact. 63 | message Artifact { 64 | optional string name = 1 [(sem_type) = { 65 | description: "Globally unique name of the artifact.", 66 | type: "ArtifactName", 67 | }]; 68 | 69 | repeated string conditions = 2 [(sem_type) = { 70 | description: "A list of conditions that decide if the artifact should " 71 | "run.", 72 | }]; 73 | 74 | optional string doc = 3 [(sem_type) = { 75 | description: "Doc string for the artifact.", 76 | }]; 77 | 78 | repeated string labels = 4 [(sem_type) = { 79 | description: "A list of labels the artifact belongs to.", 80 | }]; 81 | 82 | repeated string supported_os = 5 [(sem_type) = { 83 | description: "A list of operating systems the artifact supports.", 84 | }]; 85 | 86 | repeated string urls = 6 [(sem_type) = { 87 | description: "A list of urls that help document the artifact.", 88 | }]; 89 | 90 | /* Deprecated 91 | repeated Collector collectors = 7 [(sem_type) = { 92 | description: "A list of artifact collectors.", 93 | }]; */ 94 | 95 | repeated string provides = 8 [(sem_type) = { 96 | description: "A list of knowledgebase values this artifact provides.", 97 | }]; 98 | 99 | repeated ArtifactSource sources = 9 [(sem_type) = { 100 | description: "A list of artifact sources.", 101 | }]; 102 | 103 | optional string error_message = 10 [(sem_type) = { 104 | description: "The error message for artifacts that failed validation." 105 | }]; 106 | } 107 | 108 | 109 | message ArtifactProcessorDescriptor { 110 | optional string name = 1 [(sem_type) = { 111 | description: "Processor's name as registered in GRR." 112 | }]; 113 | optional string description = 2 [(sem_type) = { 114 | description: "Description of this processor." 115 | }]; 116 | repeated string output_types = 3 [(sem_type) = { 117 | description: "The semantic types that can be produced by the processor." 118 | }]; 119 | } 120 | 121 | 122 | message ArtifactDescriptor { 123 | optional Artifact artifact = 1 [(sem_type) = { 124 | description: "Artifact itself." 125 | }]; 126 | repeated string dependencies = 2 [(sem_type) = { 127 | description: "Names of artifacts this artifact depends on." 128 | }]; 129 | repeated string path_dependencies = 3 [(sem_type) = { 130 | description: "Names of KB objects this artifact depends on." 131 | }]; 132 | optional string artifact_source = 4 [(sem_type) = { 133 | description: "Artifact's JSON source." 134 | }]; 135 | repeated ArtifactProcessorDescriptor processors = 5 [(sem_type) = { 136 | description: "Processors that will process this artifact's output." 137 | }]; 138 | optional bool is_custom = 6 [(sem_type) = { 139 | description: "If True, this artifact was manually uploaded by the user." 140 | }]; 141 | optional string error_message = 7 [(sem_type) = { 142 | description: "The error message for artifacts that failed validation." 143 | }]; 144 | } 145 | -------------------------------------------------------------------------------- /config_file.proto: -------------------------------------------------------------------------------- 1 | // Configuration files. 2 | syntax = "proto2"; 3 | 4 | import "jobs.proto"; 5 | import "semantic.proto"; 6 | 7 | 8 | 9 | // Logging configuration. 10 | message LogTarget { 11 | optional string facility = 1 [(sem_type) = { 12 | description: "What log types this target applies to." 13 | }]; 14 | 15 | optional string priority = 2 [(sem_type) = { 16 | description: "What log priorities this target applies to." 17 | }]; 18 | 19 | enum LogTransport { 20 | UNKNOWN_LOG_TRANSPORT = 0; 21 | NONE = 1; 22 | FILE = 2; 23 | UDP = 3; 24 | TCP = 4; 25 | PIPE = 5; 26 | SCRIPT = 6; 27 | MODULE = 7; 28 | WALL = 8; 29 | }; 30 | 31 | optional LogTransport transport = 3 [(sem_type) = { 32 | description: "How logs are sent to a destination." 33 | }]; 34 | 35 | optional string destination = 4 [(sem_type) = { 36 | description: "Where logs are sent to." 37 | }]; 38 | } 39 | 40 | 41 | message LogConfig { 42 | repeated LogTarget targets = 1 [(sem_type) = { 43 | description: "Logging targets." 44 | }]; 45 | } 46 | 47 | 48 | // NFS configuration files. 49 | message NfsClient { 50 | optional string host = 1; 51 | repeated string options = 2; 52 | } 53 | 54 | message NfsExport { 55 | optional string share = 1; 56 | repeated string defaults = 2; 57 | repeated NfsClient clients = 3; 58 | } 59 | 60 | 61 | // An sshd match block configuration. This is a subcomponent of an sshd config. 62 | message SshdMatchBlock { 63 | optional string criterion = 1 [(sem_type) = { 64 | description: "Criteria that trigger a match block." 65 | }]; 66 | optional AttributedDict config = 2 [(sem_type) = { 67 | description: "The configuration of the match block." 68 | }]; 69 | } 70 | 71 | 72 | // A sshd configuration containing the sshd settings, and any number of match 73 | // groups. 74 | message SshdConfig { 75 | optional AttributedDict config = 1 [(sem_type) = { 76 | description: "The main sshd configuration." 77 | }]; 78 | repeated SshdMatchBlock matches = 2 [(sem_type) = { 79 | description: "Match block sections." 80 | }]; 81 | } 82 | 83 | 84 | // A ntp configuration containing the all the ntp settings. 85 | message NtpConfig { 86 | optional AttributedDict config = 1 [(sem_type) = { 87 | description: "The main ntp configuration." 88 | }]; 89 | repeated AttributedDict server = 2 [(sem_type) = { 90 | description: "server keyword configurations." 91 | }]; 92 | repeated AttributedDict restrict = 3 [(sem_type) = { 93 | description: "restrict keyword configurations." 94 | }]; 95 | repeated AttributedDict fudge = 4 [(sem_type) = { 96 | description: "fudge keyword configurations." 97 | }]; 98 | repeated AttributedDict trap = 5 [(sem_type) = { 99 | description: "trap keyword configurations." 100 | }]; 101 | repeated AttributedDict peer = 6 [(sem_type) = { 102 | description: "peer keyword configurations." 103 | }]; 104 | repeated AttributedDict broadcast = 7 [(sem_type) = { 105 | description: "broadcast keyword configurations." 106 | }]; 107 | repeated AttributedDict manycastclient = 8 [(sem_type) = { 108 | description: "manycastclient keyword configurations." 109 | }]; 110 | } 111 | 112 | 113 | // A PAM configuration entry. 114 | message PamConfigEntry { 115 | optional string service = 1 [(sem_type) = { 116 | description: "The service name the entry belongs to." 117 | }]; 118 | optional string type = 2 [(sem_type) = { 119 | description: "The type for this entry." 120 | }]; 121 | optional string control = 3 [(sem_type) = { 122 | description: "The behavior of PAM for this entry." 123 | }]; 124 | optional string module_path = 4 [(sem_type) = { 125 | description: "The filepath to the PAM module." 126 | }]; 127 | optional string module_args = 5 [(sem_type) = { 128 | description: "The arguments to the PAM module." 129 | }]; 130 | } 131 | 132 | 133 | // A PAM configuration, containing all definitions of the services. 134 | // and any references to external configs outside of the artifact. 135 | message PamConfig { 136 | repeated PamConfigEntry entries = 1 [(sem_type) = { 137 | description: "A list of the enumerated PAM configuration entries." 138 | }]; 139 | repeated string external_config = 2 [(sem_type) = { 140 | description: "Details of references to external config files." 141 | }]; 142 | } 143 | 144 | // Sudoers aliases. 145 | message SudoersAlias { 146 | enum Type { 147 | USER = 0; 148 | RUNAS = 1; 149 | HOST = 2; 150 | CMD = 3; 151 | } 152 | 153 | optional Type type = 1 [(sem_type) = { 154 | description: "Alias type." 155 | }]; 156 | optional string name = 2 [(sem_type) = { 157 | description: "Alias name." 158 | }]; 159 | 160 | repeated string users = 3 [(sem_type) = { 161 | description: "User list, if type is USER." 162 | }]; 163 | repeated string runas = 4 [(sem_type) = { 164 | description: "Runas list, if type is RUNAS." 165 | }]; 166 | repeated string hosts = 5 [(sem_type) = { 167 | description: "Host list, if type is HOST." 168 | }]; 169 | repeated string cmds = 6 [(sem_type) = { 170 | description: "Command list, if type is CMD." 171 | }]; 172 | } 173 | 174 | // Default setting in sudoers. 175 | message SudoersDefault { 176 | optional string scope = 1 [(sem_type) = { 177 | description: "Scope for this default (eg, >root)." 178 | }]; 179 | optional string name = 2 [(sem_type) = { 180 | description: "Name for the default, including negations (!)." 181 | }]; 182 | optional string value = 3 [(sem_type) = { 183 | description: "Value for the default, if one exists." 184 | }]; 185 | } 186 | 187 | // Sudoers file entry. 188 | message SudoersEntry { 189 | repeated string users = 1 [(sem_type) = { 190 | description: "Users this rule applies to." 191 | }]; 192 | repeated string hosts = 2 [(sem_type) = { 193 | description: "Hosts this rule applies to (optional)." 194 | }]; 195 | repeated string cmdspec = 3 [(sem_type) = { 196 | description: "All content after the '=' in the sudoers rule." 197 | }]; 198 | } 199 | 200 | // Sudoers configuration. 201 | message SudoersConfig { 202 | repeated SudoersDefault defaults = 1 [(sem_type) = { 203 | description: "Default settings (binary options or key/value pairs)." 204 | }]; 205 | repeated SudoersAlias aliases = 2 [(sem_type) = { 206 | description: "Aliases within a sudoers file." 207 | }]; 208 | repeated SudoersEntry entries = 3 [(sem_type) = { 209 | description: "Entries within a sudoers file." 210 | }]; 211 | repeated string includes = 4 [(sem_type) = { 212 | description: "Includes within a sudoers file." 213 | }]; 214 | } 215 | -------------------------------------------------------------------------------- /checks.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | import "anomaly.proto"; 4 | import "jobs.proto"; 5 | import "knowledge_base.proto"; 6 | import "semantic.proto"; 7 | 8 | 9 | // SECTION: Defining checks. 10 | // ------------------------- 11 | // Checks define a broad issue (e.g. system files with lax permissions). 12 | // Methods define distinct cases where the issues is true (e.g. files with o+w, 13 | // files with g+w for many groups in xattrs). 14 | // Probes define distinct ways of either detecting an issue, or detecting 15 | // aspects of an issue that need to be considered in combination. 16 | // Filters define how host data should be processed to determine if an issue 17 | // exists. 18 | enum Match { 19 | // Quantifies how many results indicate a problem. 20 | NONE = 0; // No tested items match. 21 | ONE = 1; // Only one tested item matches. 22 | ANY = 2; // One or more tested items match. 23 | ALL = 3; // All tested items match. 24 | SOME = 4; // More than one tested item matches. 25 | } 26 | 27 | message Check { 28 | optional string check_id = 1 [(sem_type) = { 29 | description: "A distinguishing identifier for an advisory." 30 | }]; 31 | repeated Method method = 2 [(sem_type) = { 32 | description: "A way to analyse the host." 33 | }]; 34 | repeated Match match = 3 [(sem_type) = { 35 | description: "The condition is detected if the specified number of host " 36 | "results exist after processing. Set to ANY, by default." 37 | }]; 38 | optional Target target = 4 [(sem_type) = { 39 | description: "Limit this check to specific targets." 40 | }]; 41 | optional Hint hint = 5 [(sem_type) = { 42 | description: "Textual descriptions of a problem, fix and/or findings." 43 | }]; 44 | } 45 | 46 | message Method { 47 | repeated Probe probe = 1 [(sem_type) = { 48 | description: "A way to process some host data." 49 | }]; 50 | repeated Match match = 2 [(sem_type) = { 51 | description: "The condition is detected if the specified number of host " 52 | "results exist after processing. Set to ANY, by default." 53 | }]; 54 | repeated Dict resource = 3 [(sem_type) = { 55 | description: "Extra data (e.g. hint text, comparison data)." 56 | }]; 57 | optional Target target = 4 [(sem_type) = { 58 | description: "Limit this method to specific targets." 59 | }]; 60 | optional Hint hint = 5 [(sem_type) = { 61 | description: "Textual descriptions of a problem, fix and/or findings." 62 | }]; 63 | } 64 | 65 | message Probe { 66 | enum Mode { 67 | SERIAL = 0; 68 | PARALLEL = 1; 69 | } 70 | enum ResultContext { 71 | UNKNOWN_RESULT_CONTEXT = 0; 72 | PARSER = 1; 73 | ANOMALY = 2; 74 | RAW = 3; 75 | } 76 | optional string artifact = 1 [(sem_type) = { 77 | description: "The artifact that provides the host data." 78 | }]; 79 | repeated string parser = 2 [(sem_type) = { 80 | description: "Which parsers should process host data." 81 | }]; 82 | optional Mode mode = 3 [default = SERIAL, (sem_type) = { 83 | description: "How to apply filters. Serial runs data through each filter" 84 | "sequentially. Parallel applies each filter individually." 85 | }]; 86 | repeated Filter baseline = 4 [(sem_type) = { 87 | description: "One or more filters used to extract baseline data (e.g. " 88 | "all the apt repos on a system). If defined, baseline data " 89 | "is used to evaluate filter results, rather than host data." 90 | }]; 91 | repeated Filter filters = 5 [(sem_type) = { 92 | description: "One or more filters applied to the host data." 93 | }]; 94 | repeated Match match = 6 [(sem_type) = { 95 | description: "The condition is detected if the specified number of host " 96 | "results exist after processing. Set to ANY, by default." 97 | }]; 98 | optional Target target = 7 [(sem_type) = { 99 | description: "Limit this Probe to specific targets." 100 | }]; 101 | optional Hint hint = 8 [(sem_type) = { 102 | description: "Textual descriptions of a problem, fix and/or findings." 103 | }]; 104 | optional ResultContext result_context = 9 [default = PARSER, (sem_type) = { 105 | description: "Which stage of results in the artifact collection to use for " 106 | "the checks. Defaults to the registered artifact parsers." 107 | }]; 108 | } 109 | 110 | message Filter { 111 | optional string type = 1 [(sem_type) = { 112 | description: "The type of filter to hand data to." 113 | }]; 114 | optional string expression = 2 [(sem_type) = { 115 | description: "A rule definition or match term used to pass runtime " 116 | "parameters to a filter." 117 | }]; 118 | optional Hint hint = 5 [(sem_type) = { 119 | description: "Textual descriptions of a problem, fix and/or findings." 120 | }]; 121 | } 122 | 123 | // SECTION: Reporting issues. 124 | // -------------------------- 125 | // The result of a single check. A check without anomalies was run, but did not 126 | // detect a problem. 127 | message CheckResult { 128 | optional string check_id = 1 [(sem_type) = { 129 | description: "The check id, identifies what check is being reported." 130 | }]; 131 | repeated Anomaly anomaly = 2 [(sem_type) = { 132 | description: "Specific findings indicating an issue exists." 133 | }]; 134 | } 135 | 136 | // The results of all checks performed on a host from a flow. This provides a 137 | // manifest of completed checks, which can be used to: 138 | // - open new issues, if the check results include anomalies. 139 | // - update existing issues, if the check results vary from previous state. 140 | // - close existing issues, if the check indicates issues weren't found. 141 | message CheckResults { 142 | optional KnowledgeBase kb = 1 [(sem_type) = { 143 | description: "Details about the host." 144 | }]; 145 | repeated CheckResult result = 2 [(sem_type) = { 146 | description: "The check results for a host" 147 | }]; 148 | } 149 | 150 | // Information about what checks are looking for, what actions can be taken to 151 | // address an issue, and template text to present finding data in a usable, 152 | // condensed form when reporting problems. 153 | message Hint { 154 | optional string problem = 1 [(sem_type) = { 155 | description: "A description of the issue." 156 | }]; 157 | optional string fix = 2 [(sem_type) = { 158 | description: "A description of how to fix the issue." 159 | }]; 160 | optional string format = 3 [(sem_type) = { 161 | description: "A template expression to format finding for an issue." 162 | }]; 163 | optional string summary = 4 [(sem_type) = { 164 | description: "A short name or term used to describe the type of data." 165 | }]; 166 | optional uint64 max_results = 5 [(sem_type) = { 167 | description: "Maximum number of findings to include in results." 168 | }]; 169 | } 170 | 171 | // SECTION: Selecting targets. 172 | // --------------------------- 173 | message Target { 174 | repeated string cpe = 1 [(sem_type) = { 175 | description: "Restrict this check to hosts with any of these CPE ids." 176 | }]; 177 | repeated string os = 2 [(sem_type) = { 178 | description: "Restrict this check to hosts with any of these OS types." 179 | }]; 180 | repeated string label = 3 [(sem_type) = { 181 | description: "Restrict this check to hosts with any of these labels." 182 | }]; 183 | } 184 | -------------------------------------------------------------------------------- /anomaly.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. 2 | // source: anomaly.proto 3 | // DO NOT EDIT! 4 | 5 | package apiclient 6 | 7 | import proto "github.com/golang/protobuf/proto" 8 | import fmt "fmt" 9 | import math "math" 10 | 11 | // Reference imports to suppress errors if they are not otherwise used. 12 | var _ = proto.Marshal 13 | var _ = fmt.Errorf 14 | var _ = math.Inf 15 | 16 | type Anomaly_AnomalyLevel int32 17 | 18 | const ( 19 | Anomaly_UNKNOWN_ANOMALY_LEVEL Anomaly_AnomalyLevel = 0 20 | Anomaly_VERY_LOW Anomaly_AnomalyLevel = 1 21 | Anomaly_LOW Anomaly_AnomalyLevel = 2 22 | Anomaly_MEDIUM Anomaly_AnomalyLevel = 3 23 | Anomaly_HIGH Anomaly_AnomalyLevel = 4 24 | Anomaly_VERY_HIGH Anomaly_AnomalyLevel = 5 25 | ) 26 | 27 | var Anomaly_AnomalyLevel_name = map[int32]string{ 28 | 0: "UNKNOWN_ANOMALY_LEVEL", 29 | 1: "VERY_LOW", 30 | 2: "LOW", 31 | 3: "MEDIUM", 32 | 4: "HIGH", 33 | 5: "VERY_HIGH", 34 | } 35 | var Anomaly_AnomalyLevel_value = map[string]int32{ 36 | "UNKNOWN_ANOMALY_LEVEL": 0, 37 | "VERY_LOW": 1, 38 | "LOW": 2, 39 | "MEDIUM": 3, 40 | "HIGH": 4, 41 | "VERY_HIGH": 5, 42 | } 43 | 44 | func (x Anomaly_AnomalyLevel) Enum() *Anomaly_AnomalyLevel { 45 | p := new(Anomaly_AnomalyLevel) 46 | *p = x 47 | return p 48 | } 49 | func (x Anomaly_AnomalyLevel) String() string { 50 | return proto.EnumName(Anomaly_AnomalyLevel_name, int32(x)) 51 | } 52 | func (x *Anomaly_AnomalyLevel) UnmarshalJSON(data []byte) error { 53 | value, err := proto.UnmarshalJSONEnum(Anomaly_AnomalyLevel_value, data, "Anomaly_AnomalyLevel") 54 | if err != nil { 55 | return err 56 | } 57 | *x = Anomaly_AnomalyLevel(value) 58 | return nil 59 | } 60 | func (Anomaly_AnomalyLevel) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 0} } 61 | 62 | type Anomaly_AnomalyType int32 63 | 64 | const ( 65 | Anomaly_UNKNOWN_ANOMALY_TYPE Anomaly_AnomalyType = 0 66 | Anomaly_PARSER_ANOMALY Anomaly_AnomalyType = 1 67 | Anomaly_ANALYSIS_ANOMALY Anomaly_AnomalyType = 2 68 | Anomaly_MANUAL_ANOMALY Anomaly_AnomalyType = 3 69 | ) 70 | 71 | var Anomaly_AnomalyType_name = map[int32]string{ 72 | 0: "UNKNOWN_ANOMALY_TYPE", 73 | 1: "PARSER_ANOMALY", 74 | 2: "ANALYSIS_ANOMALY", 75 | 3: "MANUAL_ANOMALY", 76 | } 77 | var Anomaly_AnomalyType_value = map[string]int32{ 78 | "UNKNOWN_ANOMALY_TYPE": 0, 79 | "PARSER_ANOMALY": 1, 80 | "ANALYSIS_ANOMALY": 2, 81 | "MANUAL_ANOMALY": 3, 82 | } 83 | 84 | func (x Anomaly_AnomalyType) Enum() *Anomaly_AnomalyType { 85 | p := new(Anomaly_AnomalyType) 86 | *p = x 87 | return p 88 | } 89 | func (x Anomaly_AnomalyType) String() string { 90 | return proto.EnumName(Anomaly_AnomalyType_name, int32(x)) 91 | } 92 | func (x *Anomaly_AnomalyType) UnmarshalJSON(data []byte) error { 93 | value, err := proto.UnmarshalJSONEnum(Anomaly_AnomalyType_value, data, "Anomaly_AnomalyType") 94 | if err != nil { 95 | return err 96 | } 97 | *x = Anomaly_AnomalyType(value) 98 | return nil 99 | } 100 | func (Anomaly_AnomalyType) EnumDescriptor() ([]byte, []int) { return fileDescriptor2, []int{0, 1} } 101 | 102 | // type?, labels 103 | type Anomaly struct { 104 | Type *Anomaly_AnomalyType `protobuf:"varint,1,opt,name=type,enum=Anomaly_AnomalyType" json:"type,omitempty"` 105 | Severity *Anomaly_AnomalyLevel `protobuf:"varint,2,opt,name=severity,enum=Anomaly_AnomalyLevel" json:"severity,omitempty"` 106 | Confidence *Anomaly_AnomalyLevel `protobuf:"varint,3,opt,name=confidence,enum=Anomaly_AnomalyLevel" json:"confidence,omitempty"` 107 | Symptom *string `protobuf:"bytes,4,opt,name=symptom" json:"symptom,omitempty"` 108 | Explanation *string `protobuf:"bytes,5,opt,name=explanation" json:"explanation,omitempty"` 109 | GeneratedBy *string `protobuf:"bytes,6,opt,name=generated_by" json:"generated_by,omitempty"` 110 | ReferencePathspec *PathSpec `protobuf:"bytes,7,opt,name=reference_pathspec" json:"reference_pathspec,omitempty"` 111 | AnomalyReferenceId []string `protobuf:"bytes,8,rep,name=anomaly_reference_id" json:"anomaly_reference_id,omitempty"` 112 | Finding []string `protobuf:"bytes,9,rep,name=finding" json:"finding,omitempty"` 113 | XXX_unrecognized []byte `json:"-"` 114 | } 115 | 116 | func (m *Anomaly) Reset() { *m = Anomaly{} } 117 | func (m *Anomaly) String() string { return proto.CompactTextString(m) } 118 | func (*Anomaly) ProtoMessage() {} 119 | func (*Anomaly) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } 120 | 121 | func (m *Anomaly) GetType() Anomaly_AnomalyType { 122 | if m != nil && m.Type != nil { 123 | return *m.Type 124 | } 125 | return Anomaly_UNKNOWN_ANOMALY_TYPE 126 | } 127 | 128 | func (m *Anomaly) GetSeverity() Anomaly_AnomalyLevel { 129 | if m != nil && m.Severity != nil { 130 | return *m.Severity 131 | } 132 | return Anomaly_UNKNOWN_ANOMALY_LEVEL 133 | } 134 | 135 | func (m *Anomaly) GetConfidence() Anomaly_AnomalyLevel { 136 | if m != nil && m.Confidence != nil { 137 | return *m.Confidence 138 | } 139 | return Anomaly_UNKNOWN_ANOMALY_LEVEL 140 | } 141 | 142 | func (m *Anomaly) GetSymptom() string { 143 | if m != nil && m.Symptom != nil { 144 | return *m.Symptom 145 | } 146 | return "" 147 | } 148 | 149 | func (m *Anomaly) GetExplanation() string { 150 | if m != nil && m.Explanation != nil { 151 | return *m.Explanation 152 | } 153 | return "" 154 | } 155 | 156 | func (m *Anomaly) GetGeneratedBy() string { 157 | if m != nil && m.GeneratedBy != nil { 158 | return *m.GeneratedBy 159 | } 160 | return "" 161 | } 162 | 163 | func (m *Anomaly) GetReferencePathspec() *PathSpec { 164 | if m != nil { 165 | return m.ReferencePathspec 166 | } 167 | return nil 168 | } 169 | 170 | func (m *Anomaly) GetAnomalyReferenceId() []string { 171 | if m != nil { 172 | return m.AnomalyReferenceId 173 | } 174 | return nil 175 | } 176 | 177 | func (m *Anomaly) GetFinding() []string { 178 | if m != nil { 179 | return m.Finding 180 | } 181 | return nil 182 | } 183 | 184 | func init() { 185 | proto.RegisterType((*Anomaly)(nil), "Anomaly") 186 | proto.RegisterEnum("Anomaly_AnomalyLevel", Anomaly_AnomalyLevel_name, Anomaly_AnomalyLevel_value) 187 | proto.RegisterEnum("Anomaly_AnomalyType", Anomaly_AnomalyType_name, Anomaly_AnomalyType_value) 188 | } 189 | 190 | func init() { proto.RegisterFile("anomaly.proto", fileDescriptor2) } 191 | 192 | var fileDescriptor2 = []byte{ 193 | // 675 bytes of a gzipped FileDescriptorProto 194 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x7c, 0x93, 0xdd, 0x6e, 0x1a, 0x39, 195 | 0x14, 0xc7, 0x43, 0x20, 0x01, 0x9c, 0x0f, 0x21, 0x8b, 0x48, 0xb3, 0x7b, 0x65, 0xb1, 0x5a, 0x09, 196 | 0x69, 0x57, 0xb3, 0x4a, 0xf6, 0x22, 0x8a, 0xb4, 0xda, 0xec, 0xb0, 0xcb, 0x26, 0x51, 0x07, 0x82, 197 | 0x42, 0x3e, 0xc4, 0x4d, 0x89, 0x67, 0xe6, 0x0c, 0x38, 0x1a, 0x6c, 0xcb, 0x36, 0xa4, 0xa8, 0x52, 198 | 0x9f, 0xae, 0x0f, 0xd0, 0x67, 0x68, 0x5f, 0xa3, 0x17, 0x95, 0xcd, 0x40, 0x21, 0xad, 0x7a, 0x85, 199 | 0xcf, 0x99, 0xff, 0xf9, 0xff, 0x8e, 0x8f, 0x0f, 0xe8, 0x80, 0x72, 0x31, 0xa1, 0xd9, 0xdc, 0x97, 200 | 0x4a, 0x18, 0xf1, 0x33, 0x7a, 0x12, 0x91, 0xce, 0xcf, 0x87, 0x1a, 0x26, 0x94, 0x1b, 0x16, 0x2f, 201 | 0xe2, 0xc6, 0x87, 0x0a, 0x2a, 0x07, 0x0b, 0x35, 0x0e, 0x51, 0xc9, 0xcc, 0x25, 0x78, 0x05, 0x52, 202 | 0x68, 0x1e, 0x9e, 0xd4, 0xfd, 0x3c, 0xbf, 0xfc, 0xbd, 0x9d, 0x4b, 0x68, 0x35, 0x3f, 0x7e, 0xfe, 203 | 0xf4, 0xbe, 0xd0, 0xc0, 0xc4, 0x46, 0x44, 0xa4, 0x24, 0x47, 0x11, 0x33, 0x66, 0x9a, 0x28, 0x90, 204 | 0x0a, 0x34, 0x70, 0xa3, 0x7d, 0x1c, 0xa1, 0x8a, 0x86, 0x19, 0x28, 0x66, 0xe6, 0xde, 0xb6, 0x73, 205 | 0x3c, 0x7a, 0xe9, 0x18, 0xc2, 0x0c, 0xb2, 0xd6, 0x99, 0xb3, 0xfc, 0x13, 0x1f, 0xf7, 0x73, 0xb9, 206 | 0xb5, 0x35, 0x63, 0x58, 0x59, 0xb3, 0x94, 0x30, 0x43, 0x98, 0x26, 0x94, 0x18, 0x35, 0x05, 0x22, 207 | 0x85, 0x66, 0x86, 0xcd, 0xc0, 0x32, 0x50, 0x2c, 0x78, 0xca, 0x12, 0xe0, 0x31, 0x78, 0xc5, 0x1f, 208 | 0x51, 0x4e, 0x1d, 0xe5, 0x18, 0xff, 0xf1, 0xef, 0xaa, 0x80, 0x98, 0x31, 0x35, 0x9b, 0xa4, 0xef, 209 | 0x30, 0xfe, 0x42, 0x65, 0x3d, 0x9f, 0x48, 0x23, 0x26, 0x5e, 0x89, 0x14, 0x9a, 0xd5, 0xd6, 0x6f, 210 | 0xce, 0xe9, 0x57, 0xfc, 0x4b, 0x40, 0x12, 0xd0, 0xb1, 0x62, 0xd2, 0x30, 0xc1, 0x6d, 0xd3, 0xcf, 211 | 0xd6, 0xcf, 0x7a, 0x38, 0x3b, 0x31, 0xd5, 0x3e, 0x7e, 0x8b, 0xf6, 0xe0, 0x8d, 0xcc, 0x28, 0xa7, 212 | 0x56, 0xe4, 0xed, 0x38, 0x87, 0xd4, 0x39, 0x3c, 0xe2, 0xd7, 0xdf, 0x38, 0x48, 0xa1, 0x35, 0x8b, 213 | 0x32, 0x20, 0x6b, 0x45, 0x9a, 0xa4, 0x42, 0xbd, 0x1c, 0x08, 0x4d, 0x12, 0x66, 0x3f, 0xd2, 0x8c, 214 | 0x30, 0x9e, 0x0a, 0x35, 0x71, 0x52, 0x07, 0x9f, 0x51, 0x96, 0xd1, 0x28, 0x03, 0x1f, 0xbf, 0x43, 215 | 0xfb, 0x23, 0xe0, 0xa0, 0xa8, 0x81, 0x64, 0x18, 0xcd, 0xbd, 0x5d, 0x47, 0x1f, 0x3b, 0x7a, 0x84, 216 | 0x1f, 0xfb, 0x46, 0x31, 0x3e, 0xca, 0x5b, 0x88, 0xec, 0xd1, 0x5d, 0x60, 0x55, 0xb2, 0xce, 0xfc, 217 | 0x7d, 0xf1, 0xc0, 0x4c, 0x13, 0x6e, 0x61, 0x99, 0x7b, 0x71, 0x20, 0x9c, 0x4e, 0x16, 0x5b, 0x40, 218 | 0x24, 0x55, 0x1a, 0x14, 0x11, 0x8a, 0x50, 0x65, 0x58, 0x4a, 0x63, 0xe3, 0xe3, 0x09, 0xc2, 0x0a, 219 | 0x52, 0x50, 0x76, 0xd8, 0x43, 0x49, 0xcd, 0x58, 0x4b, 0x88, 0xbd, 0x32, 0x29, 0x34, 0xf7, 0x4e, 220 | 0xaa, 0x7e, 0x8f, 0x9a, 0x71, 0x5f, 0x42, 0xdc, 0xfa, 0xdf, 0x35, 0xf4, 0x0f, 0xfe, 0x3b, 0x20, 221 | 0x4b, 0x11, 0x91, 0x82, 0x71, 0x63, 0x5b, 0x32, 0xc2, 0x81, 0x44, 0xf4, 0x04, 0xb1, 0x21, 0xcf, 222 | 0x63, 0x50, 0xb0, 0x31, 0x8b, 0x67, 0x6a, 0xe7, 0x33, 0xe5, 0x89, 0x8f, 0x01, 0xd5, 0xf3, 0xec, 223 | 0xf0, 0x2b, 0x96, 0x25, 0x5e, 0x85, 0x14, 0x9b, 0xd5, 0xd6, 0x85, 0xa3, 0x04, 0xf8, 0x3c, 0x20, 224 | 0x7a, 0x71, 0xf1, 0xa9, 0xb6, 0x77, 0x14, 0x64, 0x25, 0xde, 0x1c, 0x32, 0x77, 0x61, 0xbe, 0x44, 225 | 0x24, 0xa1, 0x86, 0x46, 0x54, 0x83, 0x8f, 0x7b, 0xa8, 0x9c, 0x32, 0x9e, 0x30, 0x3e, 0xf2, 0xaa, 226 | 0xce, 0xf9, 0xdc, 0x39, 0x9f, 0xe1, 0xd3, 0x8d, 0x81, 0xca, 0xc5, 0xdb, 0x89, 0xd4, 0x95, 0xe6, 227 | 0xbb, 0xa6, 0xd8, 0x68, 0x04, 0x2a, 0x1f, 0xed, 0x72, 0x4f, 0x1b, 0x80, 0xf6, 0xd7, 0x77, 0x15, 228 | 0xff, 0x84, 0x8e, 0xee, 0xba, 0xaf, 0xba, 0xd7, 0x0f, 0xdd, 0x61, 0xd0, 0xbd, 0xee, 0x04, 0xe1, 229 | 0x60, 0x18, 0xb6, 0xef, 0xdb, 0x61, 0x6d, 0x0b, 0xef, 0xa3, 0xca, 0x7d, 0xfb, 0x66, 0x30, 0x0c, 230 | 0xaf, 0x1f, 0x6a, 0x05, 0x5c, 0x46, 0x45, 0x7b, 0xd8, 0xc6, 0x08, 0xed, 0x76, 0xda, 0xff, 0x5d, 231 | 0xdd, 0x75, 0x6a, 0x45, 0x5c, 0x41, 0xa5, 0xcb, 0xab, 0x8b, 0xcb, 0x5a, 0x09, 0x1f, 0xa0, 0xaa, 232 | 0x13, 0xbb, 0x70, 0xa7, 0x01, 0x68, 0x6f, 0xed, 0xaf, 0x8c, 0x3d, 0x54, 0x7f, 0x49, 0xb9, 0x1d, 233 | 0xf4, 0xda, 0xb5, 0x2d, 0x8c, 0xd1, 0x61, 0x2f, 0xb8, 0xe9, 0xb7, 0x6f, 0x96, 0x1f, 0x6a, 0x05, 234 | 0x5c, 0x47, 0xb5, 0xa0, 0x1b, 0x84, 0x83, 0xfe, 0x55, 0x7f, 0x95, 0xdd, 0xb6, 0xca, 0x4e, 0xd0, 235 | 0xbd, 0x0b, 0xc2, 0x55, 0xae, 0xf8, 0x25, 0x00, 0x00, 0xff, 0xff, 0x9c, 0xa5, 0x14, 0xc3, 0x7e, 236 | 0x04, 0x00, 0x00, 237 | } 238 | -------------------------------------------------------------------------------- /knowledge_base.proto: -------------------------------------------------------------------------------- 1 | // These are protobufs used in the artifact knowledgebase 2 | // 3 | // Uses: 4 | // - Variables that can be interpolated into artifact paths must be defined 5 | // in this file. 6 | // - These fields can also be used to filter artifact execution, e.g. Artifact 7 | // X only runs on os:Windows. 8 | // - In processing, the processor for a specific registry key needs to know the 9 | // timezone the system is in. 10 | // 11 | // Adding additional fields should be carefully considered as systems 12 | // implementing artifacts bear the burden of implementing support for all of 13 | // them. 14 | // 15 | // Fields are defined as semantic protobufs including type, detailed 16 | // descriptions of what valid values are should be specified. 17 | // 18 | // Naming conventions: 19 | // - All fields should be lower case 20 | // - Should lower_case_with_underscore except where the field name has specific 21 | // meaning e.g. systemroot in windows is not split because that is the name 22 | // used in the environment variable it relates to. 23 | // 24 | // Data formats: 25 | // - Generally data should be stored in the format that it came back from the 26 | // system and not normalized. E.g. windows paths are in C:\Windows\foo format 27 | // 28 | // 29 | 30 | syntax = "proto2"; 31 | 32 | import "semantic.proto"; 33 | 34 | 35 | 36 | message PwEntry { 37 | enum PwStore { 38 | UNKNOWN = 0; 39 | PASSWD = 1; 40 | SHADOW = 2; 41 | GROUP = 3; 42 | GSHADOW = 4; 43 | } 44 | 45 | optional PwStore store = 1 [(sem_type) = { 46 | description: "Where the user password is stored.", 47 | }, default = UNKNOWN]; 48 | 49 | // The hash functions used for password hashes. See man crypt(3) 50 | enum PwHash { 51 | DES = 0; 52 | MD5 = 1; 53 | BLOWFISH = 2; 54 | NTHASH = 3; 55 | UNUSED = 4; 56 | SHA256 = 5; 57 | SHA512 = 6; 58 | UNSET = 13; 59 | DISABLED = 14; 60 | EMPTY = 15; 61 | } 62 | 63 | optional PwHash hash_type = 2 [(sem_type) = { 64 | description: "How the password is hashed.", 65 | }]; 66 | 67 | optional uint32 age = 3 [(sem_type) = { 68 | description: "The password age in days.", 69 | }]; 70 | 71 | optional uint32 max_age = 4 [(sem_type) = { 72 | description: "The maximum password age in days.", 73 | }]; 74 | } 75 | 76 | 77 | message Group { 78 | optional string name = 1 [(sem_type) = { 79 | description: "The name of the group. ", 80 | }]; 81 | 82 | repeated string members = 2 [(sem_type) = { 83 | description: "The members of the group, as usernames. ", 84 | }]; 85 | 86 | // Posix specific values. 87 | optional uint32 gid = 3 [(sem_type) = { 88 | description: "The gid of the the group, e.g.: 1001.", 89 | }]; 90 | 91 | optional PwEntry pw_entry = 4 [(sem_type) = { 92 | description: "The password state of the group, e.g.: shadow+sha512.", 93 | }]; 94 | 95 | } 96 | 97 | 98 | message User { 99 | optional string username = 1 [(sem_type) = { 100 | description: "The name of the user.", 101 | }]; 102 | 103 | optional string temp = 2 [(sem_type) = { 104 | description: "Temporary directory for the user.", 105 | }]; 106 | 107 | optional string desktop = 4 [(sem_type) = { 108 | description: "The desktop directory of the user. E.g. " 109 | "c:\\Documents and Settings\\foo\\Desktop", 110 | }]; 111 | 112 | optional uint64 last_logon = 5 [(sem_type) = { 113 | type: "RDFDatetime", 114 | description: "The last logon time for this user." 115 | }]; 116 | 117 | optional string full_name = 6 [(sem_type) = { 118 | description: "Full name of the user." 119 | }]; 120 | 121 | // Windows specific values. 122 | optional string userdomain = 10 [(sem_type) = { 123 | description: "The domain name of the user. E.g. MICROSOFT.", 124 | }]; 125 | 126 | optional string sid = 12 [(sem_type) = { 127 | description: "The SID of the user as reported by the system. E.g. " 128 | "S-1-5-80-859482183-879914841-863379149-1145462774-2388618682", 129 | }]; 130 | 131 | optional string userprofile = 13 [(sem_type) = { 132 | description: "The profile directory of the user. E.g." 133 | "c:\\Documents and Settings\\foo.", 134 | }]; 135 | 136 | optional string appdata = 14 [(sem_type) = { 137 | description: "The %APPDATA% directory of the user as reported by the " 138 | "system. E.g. c:\\Documents and Settings\\foo\\AppData\\Roaming", 139 | }]; 140 | 141 | optional string localappdata = 15 [(sem_type) = { 142 | description: "The %LOCALAPPDATA% directory of the user as reported by the" 143 | " system. E.g. c:\\Documents and Settings\\foo\\AppData\\Local", 144 | }]; 145 | 146 | optional string internet_cache = 16 [(sem_type) = { 147 | description: "The cache directory of the user. E.g. " 148 | "c:\\Documents and Settings\\foo\\AppData\\Local" 149 | "\\Temporary Internet Files.", 150 | }]; 151 | 152 | optional string cookies = 17 [(sem_type) = { 153 | description: "The cookies directory of the user. E.g. " 154 | "c:\\Documents and Settings\\foo\\Cookies", 155 | }]; 156 | 157 | optional string recent = 18 [(sem_type) = { 158 | description: "The recent directory of the user. E.g. " 159 | "c:\\Documents and Settings\\foo\\Recent.", 160 | }]; 161 | 162 | optional string personal = 19 [(sem_type) = { 163 | description: "The Personal directory of the user. E.g. " 164 | "c:\\Documents and Settings\\foo\\Documents.", 165 | }]; 166 | 167 | // ID 20 previously used by local_settings. 168 | 169 | optional string startup = 21 [(sem_type) = { 170 | description: "The Startup directory of the user. E.g. " 171 | "c:\\Documents and Settings\\foo\\Startup.", 172 | }]; 173 | 174 | optional string localappdata_low = 22 [(sem_type) = { 175 | description: "The LocalLow application data directory for data that" 176 | " doesn't roam with the user. E.g." 177 | " %USERPROFILE%\\AppData\\LocalLow. Vista and above.", 178 | }]; 179 | 180 | 181 | // Posix specific values. 182 | optional string homedir = 30 [(sem_type) = { 183 | description: "The homedir of the user as reported by the system. E.g. " 184 | "/home/foo", 185 | }]; 186 | 187 | optional uint32 uid = 31 [(sem_type) = { 188 | description: "The uid of the of the user. E.g. 0.", 189 | }]; 190 | 191 | optional uint32 gid = 32 [(sem_type) = { 192 | description: "The gid of the the user. E.g. 5001.", 193 | }]; 194 | 195 | optional string shell = 33 [(sem_type) = { 196 | description: "The shell of the the user. E.g. /bin/sh.", 197 | }]; 198 | 199 | optional PwEntry pw_entry = 34 [(sem_type) = { 200 | description: "The password state of the user, e.g.: shadow+sha512.", 201 | }]; 202 | 203 | repeated uint32 gids = 35 [(sem_type) = { 204 | description: "Additional group ids the user is a member of.", 205 | }]; 206 | }; 207 | 208 | 209 | // Next ID: 33 210 | message KnowledgeBase { 211 | repeated User users = 32; 212 | 213 | optional string hostname = 2 [(sem_type) = { 214 | description: "The fully qualified domain name reported by the OS. E.g. " 215 | "host1.ad.foo.com", 216 | }]; 217 | 218 | optional string time_zone = 3 [(sem_type) = { 219 | description: "The timezone in Olson format E.g. Pacific/Galapagos. " 220 | "http://en.wikipedia.org/wiki/Tz_database.", 221 | }]; 222 | 223 | optional string os = 4 [(sem_type) = { 224 | description: "The operating system. Case is important, must be one of " 225 | "Windows Linux Darwin FreeBSD OpenBSD NetBSD", 226 | }]; 227 | 228 | optional uint32 os_major_version = 5 [(sem_type) = { 229 | description: "The major version of the OS, e.g. 7", 230 | }]; 231 | 232 | optional uint32 os_minor_version = 6 [(sem_type) = { 233 | description: "The minor version of the OS, e.g. 7", 234 | }]; 235 | 236 | optional string environ_path = 7 [(sem_type) = { 237 | description: "The system configured path variable.", 238 | }]; 239 | 240 | optional string environ_temp = 8 [(sem_type) = { 241 | description: "The system temporary directory.", 242 | }]; 243 | 244 | // 245 | // Linux specific distribution information. 246 | // See: lsb_release(1) man page, or the LSB Specification under the 'Command 247 | // Behaviour' section. 248 | // 249 | optional string os_release = 9 [(sem_type) = { 250 | description: "Linux distribution name.", 251 | }]; 252 | 253 | // 254 | // Windows specific system level parameters. 255 | // 256 | optional string environ_systemroot = 20 [(sem_type) = { 257 | description: "The value of the %SystemRoot% parameter, E.g. c:\\Windows", 258 | }]; 259 | 260 | optional string environ_windir = 21 [(sem_type) = { 261 | description: "The value of the %WINDIR% parameter. As returned by " 262 | "the system, e.g. C:", 263 | }]; 264 | 265 | optional string environ_programfiles = 22 [(sem_type) = { 266 | description: "The value of the %PROGRAMFILES% parameter as returned by " 267 | "the system, e.g. C:\\Program Files", 268 | }]; 269 | 270 | optional string environ_programfilesx86 = 23 [(sem_type) = { 271 | description: "The value of the %PROGRAMFILES(X86)% parameter as returned" 272 | " by the system, e.g. C:\\Program Files (x86)", 273 | }]; 274 | 275 | optional string environ_systemdrive = 24 [(sem_type) = { 276 | description: "The value of the %SystemDrive% parameter. As returned by " 277 | "the system, e.g. C:", 278 | }]; 279 | 280 | optional string environ_allusersprofile = 26 [(sem_type) = { 281 | description: "The value of the %AllUsersProfile% parameter. As returned " 282 | "by the system, e.g. c:\\Documents and Settings\\All Users", 283 | }]; 284 | 285 | optional string environ_allusersappdata = 27 [(sem_type) = { 286 | description: "The value of the %AllUsersAppData% parameter. As returned " 287 | "by the system, e.g. c:\\Documents and Settings\\All Users\\Application" 288 | " Data.", 289 | }]; 290 | 291 | optional string current_control_set = 28 [(sem_type) = { 292 | description: "The current value of the system CurrentControlSet " 293 | "e.g. HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001", 294 | }]; 295 | 296 | optional string code_page = 30 [(sem_type) = { 297 | description: "The current code page of the system. Comes from " 298 | "HKLM\\CurrentControlSet\\Control\\Nls\\CodePage e.g. cp1252.", 299 | }]; 300 | 301 | optional string domain = 31 [(sem_type) = { 302 | description: "The domain the machine is connected to. E.g. MICROSOFT.", 303 | }]; 304 | 305 | // This field is deprecated due to a type switch from jobs.User to 306 | // knowledge_base.User. 307 | repeated bytes DEPRECATED_users = 1; 308 | } 309 | -------------------------------------------------------------------------------- /analysis.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. 2 | // source: analysis.proto 3 | // DO NOT EDIT! 4 | 5 | package apiclient 6 | 7 | import proto "github.com/golang/protobuf/proto" 8 | import fmt "fmt" 9 | import math "math" 10 | 11 | // Reference imports to suppress errors if they are not otherwise used. 12 | var _ = proto.Marshal 13 | var _ = fmt.Errorf 14 | var _ = math.Inf 15 | 16 | // A graph is a way to represent data. 17 | type Sample struct { 18 | Label *string `protobuf:"bytes,1,opt,name=label" json:"label,omitempty"` 19 | XValue *uint64 `protobuf:"varint,2,opt,name=x_value" json:"x_value,omitempty"` 20 | YValue *uint64 `protobuf:"varint,3,opt,name=y_value" json:"y_value,omitempty"` 21 | XXX_unrecognized []byte `json:"-"` 22 | } 23 | 24 | func (m *Sample) Reset() { *m = Sample{} } 25 | func (m *Sample) String() string { return proto.CompactTextString(m) } 26 | func (*Sample) ProtoMessage() {} 27 | func (*Sample) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} } 28 | 29 | func (m *Sample) GetLabel() string { 30 | if m != nil && m.Label != nil { 31 | return *m.Label 32 | } 33 | return "" 34 | } 35 | 36 | func (m *Sample) GetXValue() uint64 { 37 | if m != nil && m.XValue != nil { 38 | return *m.XValue 39 | } 40 | return 0 41 | } 42 | 43 | func (m *Sample) GetYValue() uint64 { 44 | if m != nil && m.YValue != nil { 45 | return *m.YValue 46 | } 47 | return 0 48 | } 49 | 50 | type SampleFloat struct { 51 | Label *string `protobuf:"bytes,1,opt,name=label" json:"label,omitempty"` 52 | XValue *float32 `protobuf:"fixed32,2,opt,name=x_value" json:"x_value,omitempty"` 53 | YValue *float32 `protobuf:"fixed32,3,opt,name=y_value" json:"y_value,omitempty"` 54 | XXX_unrecognized []byte `json:"-"` 55 | } 56 | 57 | func (m *SampleFloat) Reset() { *m = SampleFloat{} } 58 | func (m *SampleFloat) String() string { return proto.CompactTextString(m) } 59 | func (*SampleFloat) ProtoMessage() {} 60 | func (*SampleFloat) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} } 61 | 62 | func (m *SampleFloat) GetLabel() string { 63 | if m != nil && m.Label != nil { 64 | return *m.Label 65 | } 66 | return "" 67 | } 68 | 69 | func (m *SampleFloat) GetXValue() float32 { 70 | if m != nil && m.XValue != nil { 71 | return *m.XValue 72 | } 73 | return 0 74 | } 75 | 76 | func (m *SampleFloat) GetYValue() float32 { 77 | if m != nil && m.YValue != nil { 78 | return *m.YValue 79 | } 80 | return 0 81 | } 82 | 83 | type Graph struct { 84 | Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` 85 | Xtitle *string `protobuf:"bytes,2,opt,name=xtitle" json:"xtitle,omitempty"` 86 | Ytitle *string `protobuf:"bytes,3,opt,name=ytitle" json:"ytitle,omitempty"` 87 | Data []*Sample `protobuf:"bytes,4,rep,name=data" json:"data,omitempty"` 88 | XScale *uint32 `protobuf:"varint,5,opt,name=x_scale,def=1" json:"x_scale,omitempty"` 89 | YScale *uint32 `protobuf:"varint,6,opt,name=y_scale,def=1" json:"y_scale,omitempty"` 90 | XXX_unrecognized []byte `json:"-"` 91 | } 92 | 93 | func (m *Graph) Reset() { *m = Graph{} } 94 | func (m *Graph) String() string { return proto.CompactTextString(m) } 95 | func (*Graph) ProtoMessage() {} 96 | func (*Graph) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} } 97 | 98 | const Default_Graph_XScale uint32 = 1 99 | const Default_Graph_YScale uint32 = 1 100 | 101 | func (m *Graph) GetTitle() string { 102 | if m != nil && m.Title != nil { 103 | return *m.Title 104 | } 105 | return "" 106 | } 107 | 108 | func (m *Graph) GetXtitle() string { 109 | if m != nil && m.Xtitle != nil { 110 | return *m.Xtitle 111 | } 112 | return "" 113 | } 114 | 115 | func (m *Graph) GetYtitle() string { 116 | if m != nil && m.Ytitle != nil { 117 | return *m.Ytitle 118 | } 119 | return "" 120 | } 121 | 122 | func (m *Graph) GetData() []*Sample { 123 | if m != nil { 124 | return m.Data 125 | } 126 | return nil 127 | } 128 | 129 | func (m *Graph) GetXScale() uint32 { 130 | if m != nil && m.XScale != nil { 131 | return *m.XScale 132 | } 133 | return Default_Graph_XScale 134 | } 135 | 136 | func (m *Graph) GetYScale() uint32 { 137 | if m != nil && m.YScale != nil { 138 | return *m.YScale 139 | } 140 | return Default_Graph_YScale 141 | } 142 | 143 | type GraphFloat struct { 144 | Title *string `protobuf:"bytes,1,opt,name=title" json:"title,omitempty"` 145 | Xtitle *string `protobuf:"bytes,2,opt,name=xtitle" json:"xtitle,omitempty"` 146 | Ytitle *string `protobuf:"bytes,3,opt,name=ytitle" json:"ytitle,omitempty"` 147 | Data []*SampleFloat `protobuf:"bytes,4,rep,name=data" json:"data,omitempty"` 148 | XScale *uint32 `protobuf:"varint,5,opt,name=x_scale,def=1" json:"x_scale,omitempty"` 149 | YScale *uint32 `protobuf:"varint,6,opt,name=y_scale,def=1" json:"y_scale,omitempty"` 150 | XXX_unrecognized []byte `json:"-"` 151 | } 152 | 153 | func (m *GraphFloat) Reset() { *m = GraphFloat{} } 154 | func (m *GraphFloat) String() string { return proto.CompactTextString(m) } 155 | func (*GraphFloat) ProtoMessage() {} 156 | func (*GraphFloat) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} } 157 | 158 | const Default_GraphFloat_XScale uint32 = 1 159 | const Default_GraphFloat_YScale uint32 = 1 160 | 161 | func (m *GraphFloat) GetTitle() string { 162 | if m != nil && m.Title != nil { 163 | return *m.Title 164 | } 165 | return "" 166 | } 167 | 168 | func (m *GraphFloat) GetXtitle() string { 169 | if m != nil && m.Xtitle != nil { 170 | return *m.Xtitle 171 | } 172 | return "" 173 | } 174 | 175 | func (m *GraphFloat) GetYtitle() string { 176 | if m != nil && m.Ytitle != nil { 177 | return *m.Ytitle 178 | } 179 | return "" 180 | } 181 | 182 | func (m *GraphFloat) GetData() []*SampleFloat { 183 | if m != nil { 184 | return m.Data 185 | } 186 | return nil 187 | } 188 | 189 | func (m *GraphFloat) GetXScale() uint32 { 190 | if m != nil && m.XScale != nil { 191 | return *m.XScale 192 | } 193 | return Default_GraphFloat_XScale 194 | } 195 | 196 | func (m *GraphFloat) GetYScale() uint32 { 197 | if m != nil && m.YScale != nil { 198 | return *m.YScale 199 | } 200 | return Default_GraphFloat_YScale 201 | } 202 | 203 | // The following relate to the timelining functionality. 204 | type Event struct { 205 | Timestamp *uint64 `protobuf:"varint,1,opt,name=timestamp" json:"timestamp,omitempty"` 206 | Source *string `protobuf:"bytes,2,opt,name=source" json:"source,omitempty"` 207 | // The name of the object which this event is talking about. 208 | Subject *string `protobuf:"bytes,3,opt,name=subject" json:"subject,omitempty"` 209 | // The type of this event. 210 | Type *string `protobuf:"bytes,4,opt,name=type" json:"type,omitempty"` 211 | Stat *StatEntry `protobuf:"bytes,5,opt,name=stat" json:"stat,omitempty"` 212 | // The sequential number of this event as stored in the time series. 213 | Id *uint32 `protobuf:"varint,6,opt,name=id" json:"id,omitempty"` 214 | XXX_unrecognized []byte `json:"-"` 215 | } 216 | 217 | func (m *Event) Reset() { *m = Event{} } 218 | func (m *Event) String() string { return proto.CompactTextString(m) } 219 | func (*Event) ProtoMessage() {} 220 | func (*Event) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} } 221 | 222 | func (m *Event) GetTimestamp() uint64 { 223 | if m != nil && m.Timestamp != nil { 224 | return *m.Timestamp 225 | } 226 | return 0 227 | } 228 | 229 | func (m *Event) GetSource() string { 230 | if m != nil && m.Source != nil { 231 | return *m.Source 232 | } 233 | return "" 234 | } 235 | 236 | func (m *Event) GetSubject() string { 237 | if m != nil && m.Subject != nil { 238 | return *m.Subject 239 | } 240 | return "" 241 | } 242 | 243 | func (m *Event) GetType() string { 244 | if m != nil && m.Type != nil { 245 | return *m.Type 246 | } 247 | return "" 248 | } 249 | 250 | func (m *Event) GetStat() *StatEntry { 251 | if m != nil { 252 | return m.Stat 253 | } 254 | return nil 255 | } 256 | 257 | func (m *Event) GetId() uint32 { 258 | if m != nil && m.Id != nil { 259 | return *m.Id 260 | } 261 | return 0 262 | } 263 | 264 | func init() { 265 | proto.RegisterType((*Sample)(nil), "Sample") 266 | proto.RegisterType((*SampleFloat)(nil), "SampleFloat") 267 | proto.RegisterType((*Graph)(nil), "Graph") 268 | proto.RegisterType((*GraphFloat)(nil), "GraphFloat") 269 | proto.RegisterType((*Event)(nil), "Event") 270 | } 271 | 272 | func init() { proto.RegisterFile("analysis.proto", fileDescriptor1) } 273 | 274 | var fileDescriptor1 = []byte{ 275 | // 371 bytes of a gzipped FileDescriptorProto 276 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x91, 0xcf, 0xce, 0x93, 0x40, 277 | 0x14, 0xc5, 0x03, 0x05, 0xbe, 0x7c, 0x97, 0xaf, 0x35, 0x99, 0x68, 0x42, 0xba, 0x9a, 0xe0, 0x06, 278 | 0x37, 0x24, 0xed, 0xce, 0x3f, 0x31, 0xb1, 0x69, 0xeb, 0xce, 0xc4, 0x56, 0xd7, 0xe6, 0x96, 0x4e, 279 | 0xcb, 0x34, 0x03, 0x43, 0x98, 0x4b, 0x53, 0x56, 0xbe, 0x9c, 0xaf, 0xe1, 0x46, 0x5f, 0xc3, 0x85, 280 | 0x19, 0xa0, 0x8d, 0xba, 0x51, 0x77, 0x9c, 0x73, 0xf9, 0xcd, 0x39, 0x77, 0x06, 0x26, 0x58, 0xa2, 281 | 0x6a, 0x8d, 0x34, 0x69, 0x55, 0x6b, 0xd2, 0x53, 0x38, 0xe9, 0xdd, 0xf5, 0x7b, 0x62, 0x44, 0x81, 282 | 0x25, 0xc9, 0xac, 0xd7, 0xf1, 0x73, 0x08, 0xb6, 0x58, 0x54, 0x4a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, 0x97, 0x10, 0x6c, 0x96, 0xeb, 0x8f, 294 | 0x9b, 0x77, 0x6c, 0x66, 0xa9, 0xa6, 0x2e, 0xb9, 0x3e, 0x70, 0xca, 0x05, 0xd7, 0xb5, 0x3c, 0xca, 295 | 0x12, 0x49, 0x96, 0x47, 0xae, 0x77, 0x27, 0x91, 0x11, 0x3f, 0xe8, 0x9a, 0x53, 0x2e, 0x4d, 0x7f, 296 | 0x78, 0x6a, 0xdf, 0xc8, 0x34, 0xdd, 0x68, 0xd8, 0xf7, 0x01, 0x3c, 0x6a, 0x2b, 0x11, 0x79, 0x9d, 297 | 0x8a, 0xc0, 0x33, 0x84, 0xd4, 0xad, 0x17, 0xce, 0x21, 0xdd, 0x12, 0xd2, 0xaa, 0xa4, 0xba, 0x65, 298 | 0x00, 0xae, 0xdc, 0xf7, 0x2b, 0xfe, 0x0c, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x76, 0x29, 0x75, 0x7f, 299 | 0x02, 0x00, 0x00, 300 | } 301 | -------------------------------------------------------------------------------- /semantic.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. 2 | // source: semantic.proto 3 | // DO NOT EDIT! 4 | 5 | package apiclient 6 | 7 | import proto "github.com/golang/protobuf/proto" 8 | import fmt "fmt" 9 | import math "math" 10 | import google_protobuf "github.com/golang/protobuf/protoc-gen-go/descriptor" 11 | 12 | // Reference imports to suppress errors if they are not otherwise used. 13 | var _ = proto.Marshal 14 | var _ = fmt.Errorf 15 | var _ = math.Inf 16 | 17 | type SemanticDescriptor_Labels int32 18 | 19 | const ( 20 | SemanticDescriptor_ADVANCED SemanticDescriptor_Labels = 1 21 | // only. 22 | SemanticDescriptor_HIDDEN SemanticDescriptor_Labels = 2 23 | ) 24 | 25 | var SemanticDescriptor_Labels_name = map[int32]string{ 26 | 1: "ADVANCED", 27 | 2: "HIDDEN", 28 | } 29 | var SemanticDescriptor_Labels_value = map[string]int32{ 30 | "ADVANCED": 1, 31 | "HIDDEN": 2, 32 | } 33 | 34 | func (x SemanticDescriptor_Labels) Enum() *SemanticDescriptor_Labels { 35 | p := new(SemanticDescriptor_Labels) 36 | *p = x 37 | return p 38 | } 39 | func (x SemanticDescriptor_Labels) String() string { 40 | return proto.EnumName(SemanticDescriptor_Labels_name, int32(x)) 41 | } 42 | func (x *SemanticDescriptor_Labels) UnmarshalJSON(data []byte) error { 43 | value, err := proto.UnmarshalJSONEnum(SemanticDescriptor_Labels_value, data, "SemanticDescriptor_Labels") 44 | if err != nil { 45 | return err 46 | } 47 | *x = SemanticDescriptor_Labels(value) 48 | return nil 49 | } 50 | func (SemanticDescriptor_Labels) EnumDescriptor() ([]byte, []int) { 51 | return fileDescriptor14, []int{1, 0} 52 | } 53 | 54 | type AnyValue struct { 55 | TypeUrl *string `protobuf:"bytes,1,opt,name=type_url" json:"type_url,omitempty"` 56 | Value []byte `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` 57 | XXX_unrecognized []byte `json:"-"` 58 | } 59 | 60 | func (m *AnyValue) Reset() { *m = AnyValue{} } 61 | func (m *AnyValue) String() string { return proto.CompactTextString(m) } 62 | func (*AnyValue) ProtoMessage() {} 63 | func (*AnyValue) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{0} } 64 | 65 | func (m *AnyValue) GetTypeUrl() string { 66 | if m != nil && m.TypeUrl != nil { 67 | return *m.TypeUrl 68 | } 69 | return "" 70 | } 71 | 72 | func (m *AnyValue) GetValue() []byte { 73 | if m != nil { 74 | return m.Value 75 | } 76 | return nil 77 | } 78 | 79 | type SemanticDescriptor struct { 80 | // The semantic name of the SemanticValue contained in this field. 81 | Type *string `protobuf:"bytes,1,opt,name=type" json:"type,omitempty"` 82 | // The type of this field can be specified dynamically. This is the name of 83 | // the attribute to use to retrieve the SemanticValue class to be used for 84 | // parsing this field. 85 | DynamicType *string `protobuf:"bytes,5,opt,name=dynamic_type" json:"dynamic_type,omitempty"` 86 | Description *string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` 87 | Label []SemanticDescriptor_Labels `protobuf:"varint,3,rep,name=label,enum=SemanticDescriptor_Labels" json:"label,omitempty"` 88 | // A friendly name for this field - to be used in GUIs etc. 89 | FriendlyName *string `protobuf:"bytes,4,opt,name=friendly_name" json:"friendly_name,omitempty"` 90 | XXX_unrecognized []byte `json:"-"` 91 | } 92 | 93 | func (m *SemanticDescriptor) Reset() { *m = SemanticDescriptor{} } 94 | func (m *SemanticDescriptor) String() string { return proto.CompactTextString(m) } 95 | func (*SemanticDescriptor) ProtoMessage() {} 96 | func (*SemanticDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{1} } 97 | 98 | func (m *SemanticDescriptor) GetType() string { 99 | if m != nil && m.Type != nil { 100 | return *m.Type 101 | } 102 | return "" 103 | } 104 | 105 | func (m *SemanticDescriptor) GetDynamicType() string { 106 | if m != nil && m.DynamicType != nil { 107 | return *m.DynamicType 108 | } 109 | return "" 110 | } 111 | 112 | func (m *SemanticDescriptor) GetDescription() string { 113 | if m != nil && m.Description != nil { 114 | return *m.Description 115 | } 116 | return "" 117 | } 118 | 119 | func (m *SemanticDescriptor) GetLabel() []SemanticDescriptor_Labels { 120 | if m != nil { 121 | return m.Label 122 | } 123 | return nil 124 | } 125 | 126 | func (m *SemanticDescriptor) GetFriendlyName() string { 127 | if m != nil && m.FriendlyName != nil { 128 | return *m.FriendlyName 129 | } 130 | return "" 131 | } 132 | 133 | type SemanticMessageDescriptor struct { 134 | // Describe the purpose of this protobuf. 135 | Description *string `protobuf:"bytes,1,opt,name=description" json:"description,omitempty"` 136 | // Certain RDFValues have union-like semantics. I.e. they are essentially 137 | // selectors of a number of other predefined RDFValues. They have a single 138 | // field that identifies the type of the selected "subvalue" and 139 | // nested fields corresponding to different selections. For examples: 140 | // 141 | // message FileFinderFilter { 142 | // option (semantic) = { 143 | // union_field: "filter_type" 144 | // }; 145 | // enum Type { 146 | // MODIFICATION_TIME = 0 [(description) = "Modification time"]; 147 | // ACCESS_TIME = 1 [(description) = "Access time"]; 148 | // } 149 | // 150 | // optional Type filter_type = 1; 151 | // optional FileFinderModificationTimeFilter modification_time = 2; 152 | // optional FileFinderAccessTimeFilter access_time = 3; 153 | // } 154 | // 155 | // Field specified in union_field is used to determine which nested fields is 156 | // actually used. Field identified by union_field has to be Enum. 157 | // Corresponding nested values have to have names equal to enum values names, 158 | // but in lower case. 159 | // 160 | // At the moment setting union_field attribute on an RDFValue only affects the 161 | // UI rendering. RDFValues with union_field set are rendered with a select 162 | // box that allows users to switch between different available types. 163 | // 164 | // TODO(user): Suggestion from bgalehouse: We can just have "is_union" 165 | // boolean attribute instead of a string "union_field", because for 166 | // union-like structures we can understand the type of the structure by 167 | // inspecting its data fields. 168 | UnionField *string `protobuf:"bytes,2,opt,name=union_field" json:"union_field,omitempty"` 169 | XXX_unrecognized []byte `json:"-"` 170 | } 171 | 172 | func (m *SemanticMessageDescriptor) Reset() { *m = SemanticMessageDescriptor{} } 173 | func (m *SemanticMessageDescriptor) String() string { return proto.CompactTextString(m) } 174 | func (*SemanticMessageDescriptor) ProtoMessage() {} 175 | func (*SemanticMessageDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor14, []int{2} } 176 | 177 | func (m *SemanticMessageDescriptor) GetDescription() string { 178 | if m != nil && m.Description != nil { 179 | return *m.Description 180 | } 181 | return "" 182 | } 183 | 184 | func (m *SemanticMessageDescriptor) GetUnionField() string { 185 | if m != nil && m.UnionField != nil { 186 | return *m.UnionField 187 | } 188 | return "" 189 | } 190 | 191 | var E_SemType = &proto.ExtensionDesc{ 192 | ExtendedType: (*google_protobuf.FieldOptions)(nil), 193 | ExtensionType: (*SemanticDescriptor)(nil), 194 | Field: 51584972, 195 | Name: "sem_type", 196 | Tag: "bytes,51584972,opt,name=sem_type", 197 | Filename: "semantic.proto", 198 | } 199 | 200 | var E_Semantic = &proto.ExtensionDesc{ 201 | ExtendedType: (*google_protobuf.MessageOptions)(nil), 202 | ExtensionType: (*SemanticMessageDescriptor)(nil), 203 | Field: 51584971, 204 | Name: "semantic", 205 | Tag: "bytes,51584971,opt,name=semantic", 206 | Filename: "semantic.proto", 207 | } 208 | 209 | var E_Description = &proto.ExtensionDesc{ 210 | ExtendedType: (*google_protobuf.EnumValueOptions)(nil), 211 | ExtensionType: (*string)(nil), 212 | Field: 48651165, 213 | Name: "description", 214 | Tag: "bytes,48651165,opt,name=description", 215 | Filename: "semantic.proto", 216 | } 217 | 218 | var E_Label = &proto.ExtensionDesc{ 219 | ExtendedType: (*google_protobuf.EnumValueOptions)(nil), 220 | ExtensionType: ([]SemanticDescriptor_Labels)(nil), 221 | Field: 48651166, 222 | Name: "label", 223 | Tag: "varint,48651166,rep,name=label,enum=SemanticDescriptor_Labels", 224 | Filename: "semantic.proto", 225 | } 226 | 227 | func init() { 228 | proto.RegisterType((*AnyValue)(nil), "AnyValue") 229 | proto.RegisterType((*SemanticDescriptor)(nil), "SemanticDescriptor") 230 | proto.RegisterType((*SemanticMessageDescriptor)(nil), "SemanticMessageDescriptor") 231 | proto.RegisterEnum("SemanticDescriptor_Labels", SemanticDescriptor_Labels_name, SemanticDescriptor_Labels_value) 232 | proto.RegisterExtension(E_SemType) 233 | proto.RegisterExtension(E_Semantic) 234 | proto.RegisterExtension(E_Description) 235 | proto.RegisterExtension(E_Label) 236 | } 237 | 238 | func init() { proto.RegisterFile("semantic.proto", fileDescriptor14) } 239 | 240 | var fileDescriptor14 = []byte{ 241 | // 357 bytes of a gzipped FileDescriptorProto 242 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x91, 0xcd, 0x4a, 0xc3, 0x40, 243 | 0x14, 0x85, 0x49, 0xff, 0x48, 0x6f, 0xd3, 0x52, 0xa6, 0x8a, 0xb1, 0x20, 0xc6, 0xac, 0x22, 0x42, 244 | 0x0a, 0xdd, 0xd9, 0x5d, 0x31, 0xf1, 0x07, 0xb4, 0x15, 0x84, 0x6e, 0x43, 0xda, 0x4c, 0x4b, 0x60, 245 | 0x32, 0x53, 0x32, 0x89, 0x90, 0x47, 0x71, 0xa1, 0x2f, 0xe1, 0xc2, 0xa5, 0x0f, 0x60, 0x1f, 0x4a, 246 | 0x32, 0xcd, 0xf8, 0x17, 0x41, 0x97, 0xb9, 0x39, 0xe7, 0x9b, 0x73, 0xee, 0x85, 0x0e, 0xc7, 0x91, 247 | 0x4f, 0x93, 0x70, 0x61, 0xaf, 0x63, 0x96, 0xb0, 0xbe, 0xb1, 0x62, 0x6c, 0x45, 0xf0, 0x40, 0x7c, 248 | 0xcd, 0xd3, 0xe5, 0x20, 0xc0, 0x7c, 0x11, 0x87, 0xeb, 0x84, 0xc5, 0x5b, 0x85, 0x79, 0x02, 0xea, 249 | 0x98, 0x66, 0x33, 0x9f, 0xa4, 0x18, 0x75, 0x41, 0x4d, 0xb2, 0x35, 0xf6, 0xd2, 0x98, 0xe8, 0x8a, 250 | 0xa1, 0x58, 0x4d, 0xd4, 0x86, 0xfa, 0x7d, 0xfe, 0x4b, 0xaf, 0x18, 0x8a, 0xa5, 0x99, 0xcf, 0x0a, 251 | 0xa0, 0xbb, 0xe2, 0x05, 0xe7, 0x83, 0x84, 0x34, 0xa8, 0xe5, 0xbe, 0xc2, 0xb3, 0x03, 0x5a, 0x90, 252 | 0x51, 0x3f, 0x0a, 0x17, 0x9e, 0x98, 0xd6, 0xc5, 0xb4, 0x07, 0x2d, 0xf9, 0x76, 0xc8, 0xa8, 0xe0, 253 | 0x35, 0xd1, 0x31, 0xd4, 0x89, 0x3f, 0xc7, 0x44, 0xaf, 0x1a, 0x55, 0xab, 0x33, 0xec, 0xdb, 0x65, 254 | 0xb8, 0x7d, 0x9d, 0x0b, 0x38, 0xda, 0x85, 0xf6, 0x32, 0x0e, 0x31, 0x0d, 0x48, 0xe6, 0x51, 0x3f, 255 | 0xc2, 0x7a, 0x2d, 0x27, 0x98, 0x26, 0x34, 0x0a, 0x81, 0x06, 0xea, 0xd8, 0x99, 0x8d, 0x27, 0x67, 256 | 0xae, 0xd3, 0x55, 0x10, 0x40, 0xe3, 0xf2, 0xca, 0x71, 0xdc, 0x49, 0xb7, 0x62, 0xba, 0xb0, 0x2f, 257 | 0xb9, 0x37, 0x98, 0x73, 0x7f, 0x85, 0xbf, 0x64, 0xff, 0x91, 0x4b, 0x91, 0x61, 0x53, 0x1a, 0x32, 258 | 0xea, 0x2d, 0x43, 0x4c, 0x82, 0x6d, 0xd8, 0xd1, 0x05, 0xa8, 0x1c, 0x47, 0xa2, 0x13, 0x3a, 0xb0, 259 | 0xb7, 0x8b, 0xb5, 0xe5, 0x62, 0xed, 0xf3, 0x5c, 0x39, 0x15, 0x10, 0xae, 0x6f, 0x5e, 0x37, 0xba, 260 | 0xa1, 0x58, 0xad, 0x61, 0xef, 0x97, 0x46, 0xa3, 0x5b, 0x01, 0x12, 0x53, 0x74, 0x58, 0x02, 0x15, 261 | 0x11, 0x25, 0xea, 0x4d, 0xa2, 0x3e, 0x97, 0x53, 0x2a, 0x31, 0x3a, 0xfd, 0x56, 0x02, 0x1d, 0x95, 262 | 0xa0, 0x2e, 0x4d, 0x23, 0x71, 0x63, 0x89, 0x7d, 0x7c, 0x79, 0xd8, 0x13, 0xad, 0xa6, 0xc5, 0x09, 263 | 0xfe, 0x63, 0x7a, 0xca, 0x4d, 0x7f, 0x1c, 0xea, 0x3d, 0x00, 0x00, 0xff, 0xff, 0xda, 0x3e, 0x9a, 264 | 0x5b, 0x83, 0x02, 0x00, 0x00, 265 | } 266 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /acls.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. 2 | // source: acls.proto 3 | // DO NOT EDIT! 4 | 5 | /* 6 | Package apiclient is a generated protocol buffer package. 7 | 8 | It is generated from these files: 9 | acls.proto 10 | analysis.proto 11 | anomaly.proto 12 | api.proto 13 | artifact.proto 14 | checks.proto 15 | config_file.proto 16 | data_server.proto 17 | data_store.proto 18 | export.proto 19 | flows.proto 20 | jobs.proto 21 | knowledge_base.proto 22 | output_plugin.proto 23 | semantic.proto 24 | sysinfo.proto 25 | 26 | It has these top-level messages: 27 | ClientApprovalAuthorization 28 | Sample 29 | SampleFloat 30 | Graph 31 | GraphFloat 32 | Event 33 | Anomaly 34 | ApiAuthorization 35 | ApiSearchClientsArgs 36 | ApiSearchClientsResult 37 | ApiGetClientArgs 38 | ApiGetClientResult 39 | ApiGetClientVersionTimesArgs 40 | ApiGetClientVersionTimesResult 41 | ApiInterrogateClientArgs 42 | ApiInterrogateClientResult 43 | ApiGetInterrogateOperationStateArgs 44 | ApiGetInterrogateOperationStateResult 45 | ApiGetLastClientIPAddressArgs 46 | ApiGetLastClientIPAddressResult 47 | ApiGetFlowArgs 48 | ApiCreateFlowArgs 49 | ApiCancelFlowArgs 50 | ApiListFlowResultsArgs 51 | ApiListFlowResultsResult 52 | ApiListFlowLogsArgs 53 | ApiListFlowLogsResult 54 | ApiGetFlowResultsExportCommandArgs 55 | ApiGetFlowResultsExportCommandResult 56 | ApiListFlowOutputPluginsArgs 57 | ApiListFlowOutputPluginsResult 58 | ApiListFlowOutputPluginLogsArgs 59 | ApiListFlowOutputPluginLogsResult 60 | ApiListFlowOutputPluginErrorsArgs 61 | ApiListFlowOutputPluginErrorsResult 62 | ApiGetFlowFilesArchiveArgs 63 | ApiListFlowDescriptorsArgs 64 | ApiListFlowDescriptorsResult 65 | ApiListFlowsArgs 66 | ApiListFlowsResult 67 | ApiAddClientsLabelsArgs 68 | ApiRemoveClientsLabelsArgs 69 | ApiListClientsLabelsResult 70 | ApiListKbFieldsResult 71 | ApiListHuntsArgs 72 | ApiListHuntsResult 73 | ApiGetHuntArgs 74 | ApiGetHuntClientCompletionStatsArgs 75 | ApiGetHuntClientCompletionStatsResult 76 | ApiListHuntLogsArgs 77 | ApiListHuntLogsResult 78 | ApiListHuntErrorsArgs 79 | ApiListHuntErrorsResult 80 | ApiListHuntCrashesArgs 81 | ApiListHuntCrashesResult 82 | ApiListHuntResultsArgs 83 | ApiListHuntResultsResult 84 | ApiGetHuntResultsExportCommandArgs 85 | ApiGetHuntResultsExportCommandResult 86 | ApiListHuntOutputPluginsArgs 87 | ApiListHuntOutputPluginsResult 88 | ApiListHuntOutputPluginLogsArgs 89 | ApiListHuntOutputPluginLogsResult 90 | ApiListHuntOutputPluginErrorsArgs 91 | ApiListHuntOutputPluginErrorsResult 92 | ApiGetHuntFilesArchiveArgs 93 | ApiGetHuntFileArgs 94 | ApiGetHuntStatsArgs 95 | ApiGetHuntStatsResult 96 | ApiListHuntClientsArgs 97 | ApiHuntClient 98 | ApiListHuntClientsResult 99 | ApiDataObject 100 | ApiDataObjectKeyValuePair 101 | ApiGetHuntContextArgs 102 | ApiGetHuntContextResult 103 | ApiCreateHuntArgs 104 | ApiGetRDFValueDescriptorArgs 105 | ApiListStatsStoreMetricsMetadataArgs 106 | ApiListCronJobsArgs 107 | ApiListCronJobsResult 108 | ApiDeleteCronJobArgs 109 | ApiGetStatsStoreMetricArgs 110 | ApiListArtifactsArgs 111 | ApiListArtifactsResult 112 | ApiUploadArtifactArgs 113 | ApiDeleteArtifactsArgs 114 | ApiGetConfigResult 115 | ApiGetConfigOptionArgs 116 | ApiListUserHuntApprovalsArgs 117 | ApiListUserHuntApprovalsResult 118 | ApiListUserCronApprovalsArgs 119 | ApiListUserCronApprovalsResult 120 | ApiCreateUserClientApprovalArgs 121 | ApiGetUserClientApprovalArgs 122 | ApiListUserClientApprovalsArgs 123 | ApiListUserClientApprovalsResult 124 | ApiStartRobotGetFilesOperationArgs 125 | ApiStartRobotGetFilesOperationResult 126 | ApiGetRobotGetFilesOperationStateArgs 127 | ApiGetRobotGetFilesOperationStateResult 128 | ApiAFF4ObjectRendererArgs 129 | ApiGRRHuntRendererArgs 130 | ApiRDFValueCollectionRendererArgs 131 | ApiGrrUserInterfaceTraits 132 | ApiGrrUser 133 | ApiConfigOption 134 | ApiConfigSection 135 | ApiFlowDescriptor 136 | ApiUserHuntApproval 137 | ApiUserCronApproval 138 | ApiUserClientApproval 139 | ApiClient 140 | ApiFlow 141 | ApiFlowResult 142 | ApiHunt 143 | ApiHuntResult 144 | ApiCronJob 145 | ApiOutputPlugin 146 | ApiFile 147 | ApiGetFileDetailsArgs 148 | ApiGetFileDetailsResult 149 | ApiAff4ObjectRepresentation 150 | ApiAff4ObjectType 151 | ApiAff4ObjectAttribute 152 | ApiAff4ObjectAttributeValue 153 | ApiListFilesArgs 154 | ApiListFilesResult 155 | ApiGetFileTextArgs 156 | ApiGetFileTextResult 157 | ApiListKnownEncodingsResult 158 | ApiGetFileBlobArgs 159 | ApiGetFileVersionTimesArgs 160 | ApiGetFileVersionTimesResult 161 | ApiGetFileDownloadCommandArgs 162 | ApiGetFileDownloadCommandResult 163 | ApiCreateVfsRefreshOperationArgs 164 | ApiGetVfsTimelineArgs 165 | ApiGetVfsTimelineResult 166 | ApiGetVfsTimelineAsCsvArgs 167 | ApiVfsTimelineItem 168 | ApiCreateVfsRefreshOperationResult 169 | ApiGetVfsRefreshOperationStateArgs 170 | ApiGetVfsRefreshOperationStateResult 171 | ApiUpdateVfsFileContentArgs 172 | ApiUpdateVfsFileContentResult 173 | ApiGetVfsFileContentUpdateStateArgs 174 | ApiGetVfsFileContentUpdateStateResult 175 | ApiGetPendingUserNotificationsCountResult 176 | ApiDeletePendingUserNotificationArgs 177 | ApiListAndResetUserNotificationsArgs 178 | ApiListAndResetUserNotificationsResult 179 | ApiListPendingUserNotificationsArgs 180 | ApiListPendingUserNotificationsResult 181 | ApiNotification 182 | ApiNotificationReference 183 | ApiNotificationDiscoveryReference 184 | ApiNotificationFileDownloadReference 185 | ApiNotificationArchiveGenerationFinishedReference 186 | ApiNotificationHuntReference 187 | ApiNotificationCronReference 188 | ApiNotificationFlowReference 189 | ApiNotificationVfsReference 190 | ApiNotificationFlowStatusReference 191 | ApiNotificationGrantAccessReference 192 | ApiListPendingGlobalNotificationsResult 193 | ApiDeletePendingGlobalNotificationArgs 194 | ArtifactSource 195 | Artifact 196 | ArtifactProcessorDescriptor 197 | ArtifactDescriptor 198 | Check 199 | Method 200 | Probe 201 | Filter 202 | CheckResult 203 | CheckResults 204 | Hint 205 | Target 206 | LogTarget 207 | LogConfig 208 | NfsClient 209 | NfsExport 210 | SshdMatchBlock 211 | SshdConfig 212 | NtpConfig 213 | PamConfigEntry 214 | PamConfig 215 | SudoersAlias 216 | SudoersDefault 217 | SudoersEntry 218 | SudoersConfig 219 | DataStoreCommand 220 | DataServerInterval 221 | DataServerState 222 | DataServerInformation 223 | DataServerMapping 224 | DataServerClientInformation 225 | DataServerEncryptedCreds 226 | DataServerClientCredentials 227 | DataServerRebalance 228 | DataServerFileCopy 229 | DataStoreAuthToken 230 | DataStoreRegistrationRequest 231 | TimestampSpec 232 | DataStoreValue 233 | DataStoreRequest 234 | QueryASTNode 235 | DataStoreQuery 236 | ResultSet 237 | DataStoreResponse 238 | ExportOptions 239 | ExportedMetadata 240 | ExportedClient 241 | ExportedNetworkInterface 242 | ExportedDNSClientConfiguration 243 | ExportedFile 244 | ExportedRegistryKey 245 | ExportedProcess 246 | ExportedNetworkConnection 247 | ExportedAnomaly 248 | ExportedCheckResult 249 | ExportedOpenFile 250 | ExportedFileStoreHash 251 | ExportedMatch 252 | ExportedBytes 253 | ExportedArtifactFilesDownloaderResult 254 | ExportedRekallProcess 255 | ExportedRekallWindowsLoadedModule 256 | ExportedWindowsHandle 257 | ExportedLinuxSyscallTableEntry 258 | ExportedRekallLinuxTask 259 | ExportedRekallLinuxTaskOp 260 | ExportedRekallLinuxProcOp 261 | ACLToken 262 | GUISettings 263 | FlowRunnerArgs 264 | HuntRunnerArgs 265 | SampleHuntArgs 266 | FlowRequest 267 | VariableGenericHuntArgs 268 | GenericHuntArgs 269 | BareGrepSpec 270 | CAEnrolerArgs 271 | DeleteGRRTempFilesArgs 272 | UninstallArgs 273 | UpdateConfigurationArgs 274 | ExecutePythonHackArgs 275 | ExecuteCommandArgs 276 | OnlineNotificationArgs 277 | UpdateClientArgs 278 | KeepAliveArgs 279 | TerminateFlowArgs 280 | LaunchBinaryArgs 281 | WinUserActivityInvestigationArgs 282 | ArtifactCollectorFlowArgs 283 | ArtifactFilesDownloaderFlowArgs 284 | ArtifactFilesDownloaderResult 285 | InterrogateArgs 286 | FingerprintFileArgs 287 | FingerprintFileResult 288 | SophosCollectorArgs 289 | MACTimesArgs 290 | FileCollectorArgs 291 | FirefoxHistoryArgs 292 | CacheGrepArgs 293 | ListDirectoryArgs 294 | RecursiveListDirectoryArgs 295 | FetchBufferForSparseImageArgs 296 | MakeNewAFF4SparseImageArgs 297 | UpdateSparseImageChunksArgs 298 | GrepArgs 299 | GlobArgs 300 | SearchFileContentArgs 301 | FindFilesArgs 302 | GetFileArgs 303 | GetMBRArgs 304 | ChromeHistoryArgs 305 | ClientActionArgs 306 | ConsoleDebugFlowArgs 307 | CreateGenericHuntFlowArgs 308 | CreateCronJobFlowArgs 309 | ModifyHuntFlowArgs 310 | ManageCronJobFlowArgs 311 | PlistValueFilterArgs 312 | RunReportFlowArgs 313 | EnumerateServicesArgs 314 | ChromePluginsArgs 315 | RequestApprovalWithReasonFlowArgs 316 | GrantApprovalWithReasonFlowArgs 317 | StartHuntFlowArgs 318 | DeleteHuntFlowArgs 319 | StopHuntFlowArgs 320 | CheckHuntAccessFlowArgs 321 | UpdateVFSFileArgs 322 | MultiGetFileArgs 323 | ProcessHuntResultCollectionsCronFlowArgs 324 | VerifyHuntOutputPluginsCronFlowArgs 325 | ListProcessesArgs 326 | ListVADBinariesArgs 327 | FileFinderModificationTimeCondition 328 | FileFinderAccessTimeCondition 329 | FileFinderInodeChangeTimeCondition 330 | FileFinderSizeCondition 331 | FileFinderContentsRegexMatchCondition 332 | FileFinderContentsLiteralMatchCondition 333 | FileFinderCondition 334 | FileFinderDownloadActionOptions 335 | FileFinderAction 336 | FileFinderArgs 337 | FileFinderResult 338 | FileReference 339 | RegistryFinderCondition 340 | RegistryFinderArgs 341 | MemoryCollectorArgs 342 | CollectArtifactDependenciesArgs 343 | ArtifactFallbackCollectorArgs 344 | KnowledgeBaseInitializationArgs 345 | ExportCollectionFilesAsArchiveArgs 346 | EndToEndTestFlowArgs 347 | DiskVolumeInfoArgs 348 | CheckFlowArgs 349 | DumpProcessMemoryArgs 350 | DumpFlashImageArgs 351 | HttpRequest 352 | GrrMessage 353 | MessageList 354 | SignedMessageList 355 | CipherProperties 356 | CipherMetadata 357 | ClientCommunication 358 | GrrStatus 359 | GrrNotification 360 | ClientCrash 361 | HuntNotification 362 | HuntResultNotification 363 | FlowNotification 364 | ClientInformation 365 | Task 366 | DataBlob 367 | BlobArray 368 | PrintStr 369 | CopyPathToFile 370 | BufferReference 371 | RequestState 372 | Flow 373 | CpuSeconds 374 | CpuSample 375 | IOSample 376 | ClientStats 377 | StartupInfo 378 | ExecuteRequest 379 | ExecuteResponse 380 | PathSpec 381 | ListDirRequest 382 | StatFSRequest 383 | StatEntry 384 | Collection 385 | WmiRequest 386 | KeyValue 387 | Dict 388 | AttributedDict 389 | Certificate 390 | Uname 391 | FolderInformation 392 | NetworkAddress 393 | Interface 394 | Hash 395 | AuthenticodeSignedData 396 | FingerprintTuple 397 | FingerprintRequest 398 | FingerprintResponse 399 | SignedBlob 400 | SymmetricCipher 401 | ExecutePythonRequest 402 | ExecutePythonResponse 403 | ClientComponentSummary 404 | ClientComponent 405 | LoadComponent 406 | ExecuteBinaryRequest 407 | ExecuteBinaryResponse 408 | DriverInstallTemplate 409 | SendFileRequest 410 | GrepSpec 411 | FindSpec 412 | PlistRequest 413 | GetClientStatsRequest 414 | ForemanClientRuleSet 415 | ForemanClientRule 416 | ForemanOsClientRule 417 | ForemanLabelClientRule 418 | ForemanRegexClientRule 419 | ForemanIntegerClientRule 420 | ForemanRuleAction 421 | ForemanRule 422 | HuntError 423 | FlowLog 424 | ClientResources 425 | StatsHistogram 426 | StatsHistogramBin 427 | RunningStats 428 | ClientResourcesStats 429 | Iterator 430 | IteratedStatResponse 431 | Notification 432 | GlobalNotification 433 | GlobalNotificationSet 434 | EmbeddedRDFValue 435 | AFF4ObjectSummary 436 | AuditEvent 437 | ClientSummary 438 | CronJobRunStatus 439 | MetricFieldDefinition 440 | MetricMetadata 441 | StatsStoreMetricsMetadata 442 | Distribution 443 | StatsStoreFieldValue 444 | StatsStoreValue 445 | AFF4ObjectLabel 446 | AFF4ObjectLabelsList 447 | SeekIndex 448 | SeekIndexPair 449 | PersistenceFile 450 | EndToEndTestResult 451 | EmptyMessage 452 | NSRLInformation 453 | PendingFlowTermination 454 | DumpProcessMemoryRequest 455 | PwEntry 456 | Group 457 | User 458 | KnowledgeBase 459 | OutputPluginDescriptor 460 | OutputPluginBatchProcessingStatus 461 | OutputPluginVerificationResult 462 | OutputPluginVerificationResultsList 463 | EmailOutputPluginArgs 464 | BigQueryOutputPluginArgs 465 | CSVOutputPluginArgs 466 | AnyValue 467 | SemanticDescriptor 468 | SemanticMessageDescriptor 469 | PackageRepository 470 | ManagementAgent 471 | PCIDevice 472 | Process 473 | NetworkEndpoint 474 | NetworkConnection 475 | Filesystem 476 | MRUFile 477 | RunKey 478 | WindowsServiceInformation 479 | OSXServiceInformation 480 | LinuxServiceInformation 481 | SoftwarePackage 482 | BrowserHistoryItem 483 | Volume 484 | WindowsVolume 485 | UnixVolume 486 | DiskUsage 487 | DNSClientConfiguration 488 | HardwareInfo 489 | PlistStringDictEntry 490 | PlistBoolDictEntry 491 | LaunchdStartCalendarIntervalEntry 492 | LaunchdKeepAlive 493 | LaunchdPlist 494 | CronTabEntry 495 | CronTabFile 496 | URI 497 | WMIActiveScriptEventConsumer 498 | WMICommandLineEventConsumer 499 | */ 500 | package apiclient 501 | 502 | import proto "github.com/golang/protobuf/proto" 503 | import fmt "fmt" 504 | import math "math" 505 | 506 | // Reference imports to suppress errors if they are not otherwise used. 507 | var _ = proto.Marshal 508 | var _ = fmt.Errorf 509 | var _ = math.Inf 510 | 511 | // This is a compile-time assertion to ensure that this generated file 512 | // is compatible with the proto package it is being compiled against. 513 | // A compilation error at this line likely means your copy of the 514 | // proto package needs to be updated. 515 | const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package 516 | 517 | type ClientApprovalAuthorization struct { 518 | Label *string `protobuf:"bytes,1,opt,name=label" json:"label,omitempty"` 519 | RequesterMustBeAuthorized *bool `protobuf:"varint,2,opt,name=requester_must_be_authorized,def=0" json:"requester_must_be_authorized,omitempty"` 520 | NumApproversRequired *uint64 `protobuf:"varint,3,opt,name=num_approvers_required,def=1" json:"num_approvers_required,omitempty"` 521 | Users []string `protobuf:"bytes,4,rep,name=users" json:"users,omitempty"` 522 | Groups []string `protobuf:"bytes,5,rep,name=groups" json:"groups,omitempty"` 523 | XXX_unrecognized []byte `json:"-"` 524 | } 525 | 526 | func (m *ClientApprovalAuthorization) Reset() { *m = ClientApprovalAuthorization{} } 527 | func (m *ClientApprovalAuthorization) String() string { return proto.CompactTextString(m) } 528 | func (*ClientApprovalAuthorization) ProtoMessage() {} 529 | func (*ClientApprovalAuthorization) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } 530 | 531 | const Default_ClientApprovalAuthorization_RequesterMustBeAuthorized bool = false 532 | const Default_ClientApprovalAuthorization_NumApproversRequired uint64 = 1 533 | 534 | func (m *ClientApprovalAuthorization) GetLabel() string { 535 | if m != nil && m.Label != nil { 536 | return *m.Label 537 | } 538 | return "" 539 | } 540 | 541 | func (m *ClientApprovalAuthorization) GetRequesterMustBeAuthorized() bool { 542 | if m != nil && m.RequesterMustBeAuthorized != nil { 543 | return *m.RequesterMustBeAuthorized 544 | } 545 | return Default_ClientApprovalAuthorization_RequesterMustBeAuthorized 546 | } 547 | 548 | func (m *ClientApprovalAuthorization) GetNumApproversRequired() uint64 { 549 | if m != nil && m.NumApproversRequired != nil { 550 | return *m.NumApproversRequired 551 | } 552 | return Default_ClientApprovalAuthorization_NumApproversRequired 553 | } 554 | 555 | func (m *ClientApprovalAuthorization) GetUsers() []string { 556 | if m != nil { 557 | return m.Users 558 | } 559 | return nil 560 | } 561 | 562 | func (m *ClientApprovalAuthorization) GetGroups() []string { 563 | if m != nil { 564 | return m.Groups 565 | } 566 | return nil 567 | } 568 | 569 | func init() { 570 | proto.RegisterType((*ClientApprovalAuthorization)(nil), "ClientApprovalAuthorization") 571 | } 572 | 573 | func init() { proto.RegisterFile("acls.proto", fileDescriptor0) } 574 | 575 | var fileDescriptor0 = []byte{ 576 | // 403 bytes of a gzipped FileDescriptorProto 577 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x8c, 0x91, 0xb1, 0x8e, 0xd4, 0x30, 578 | 0x10, 0x86, 0x65, 0x6e, 0x17, 0x71, 0x29, 0x28, 0x5c, 0xa0, 0x08, 0x28, 0x46, 0x54, 0x2b, 0x74, 579 | 0x8a, 0x04, 0x0d, 0xb0, 0x0d, 0xec, 0x5e, 0x85, 0x74, 0x1c, 0x14, 0x50, 0x47, 0x4e, 0x32, 0xb9, 580 | 0x58, 0x72, 0x3c, 0xc1, 0x33, 0xe6, 0x58, 0x1e, 0x02, 0x89, 0x8e, 0x07, 0x02, 0x1e, 0x04, 0x5e, 581 | 0x83, 0x02, 0xd9, 0xd9, 0x65, 0xdb, 0x2b, 0xad, 0x5f, 0xf3, 0xfd, 0x9f, 0x67, 0x8a, 0xc2, 0xb4, 582 | 0x8e, 0xab, 0x29, 0x90, 0xd0, 0xfd, 0xbb, 0x8c, 0xa3, 0xf1, 0x62, 0xdb, 0xf9, 0xfd, 0xe8, 0xe7, 583 | 0xa2, 0x78, 0x70, 0xee, 0x2c, 0x7a, 0xd9, 0x4c, 0x53, 0xa0, 0x4f, 0xc6, 0x6d, 0xa2, 0x0c, 0x14, 584 | 0xec, 0x17, 0x23, 0x96, 0xbc, 0xde, 0x14, 0x4b, 0x67, 0x1a, 0x74, 0xa5, 0x02, 0xb5, 0x3a, 0xdd, 585 | 0x3e, 0xfd, 0xfd, 0xf7, 0xcf, 0x0f, 0x75, 0xa6, 0x1f, 0xcf, 0x33, 0x90, 0x33, 0x90, 0xc1, 0x32, 586 | 0x98, 0xfd, 0x3c, 0x6c, 0xce, 0x2f, 0xd2, 0xc3, 0x59, 0x64, 0x10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x95, 0xbe, 0x2c, 0x96, 0xd9, 0xa1, 598 | 0x5c, 0xc0, 0xc9, 0xea, 0x74, 0xfb, 0x32, 0xb7, 0xbc, 0xd0, 0xcf, 0x2e, 0x2c, 0x4b, 0xea, 0xc8, 599 | 0xe1, 0xf1, 0x3b, 0x07, 0x60, 0x9b, 0x8f, 0xc4, 0x70, 0x6d, 0x65, 0x98, 0xbb, 0xf3, 0xbd, 0x2a, 600 | 0xfd, 0xae, 0xb8, 0x7d, 0x15, 0x28, 0x4e, 0x5c, 0x2e, 0x33, 0xf0, 0x55, 0x06, 0xae, 0xf5, 0xf3, 601 | 0x03, 0x70, 0x4e, 0x6f, 0x4e, 0xfc, 0x17, 0x00, 0x00, 0xff, 0xff, 0x21, 0x37, 0x9d, 0xab, 0x64, 602 | 0x02, 0x00, 0x00, 603 | } 604 | -------------------------------------------------------------------------------- /artifact.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. 2 | // source: artifact.proto 3 | // DO NOT EDIT! 4 | 5 | package apiclient 6 | 7 | import proto "github.com/golang/protobuf/proto" 8 | import fmt "fmt" 9 | import math "math" 10 | 11 | // Reference imports to suppress errors if they are not otherwise used. 12 | var _ = proto.Marshal 13 | var _ = fmt.Errorf 14 | var _ = math.Inf 15 | 16 | type ArtifactSource_SourceType int32 17 | 18 | const ( 19 | ArtifactSource_COLLECTOR_TYPE_UNKNOWN ArtifactSource_SourceType = 0 20 | ArtifactSource_FILE ArtifactSource_SourceType = 1 21 | ArtifactSource_REGISTRY_KEY ArtifactSource_SourceType = 2 22 | ArtifactSource_REGISTRY_VALUE ArtifactSource_SourceType = 3 23 | ArtifactSource_WMI ArtifactSource_SourceType = 4 24 | // ARTIFACT has been deprecated in favor of ARTIFACT_GROUP. 25 | ArtifactSource_ARTIFACT ArtifactSource_SourceType = 5 26 | ArtifactSource_PATH ArtifactSource_SourceType = 6 27 | ArtifactSource_DIRECTORY ArtifactSource_SourceType = 7 28 | ArtifactSource_ARTIFACT_GROUP ArtifactSource_SourceType = 8 29 | // TODO(user): these types will likely be separated out from artifacts in 30 | // the future 31 | ArtifactSource_GRR_CLIENT_ACTION ArtifactSource_SourceType = 40 32 | ArtifactSource_LIST_FILES ArtifactSource_SourceType = 41 33 | ArtifactSource_ARTIFACT_FILES ArtifactSource_SourceType = 42 34 | ArtifactSource_GREP ArtifactSource_SourceType = 43 35 | ArtifactSource_COMMAND ArtifactSource_SourceType = 45 36 | ArtifactSource_REKALL_PLUGIN ArtifactSource_SourceType = 46 37 | ) 38 | 39 | var ArtifactSource_SourceType_name = map[int32]string{ 40 | 0: "COLLECTOR_TYPE_UNKNOWN", 41 | 1: "FILE", 42 | 2: "REGISTRY_KEY", 43 | 3: "REGISTRY_VALUE", 44 | 4: "WMI", 45 | 5: "ARTIFACT", 46 | 6: "PATH", 47 | 7: "DIRECTORY", 48 | 8: "ARTIFACT_GROUP", 49 | 40: "GRR_CLIENT_ACTION", 50 | 41: "LIST_FILES", 51 | 42: "ARTIFACT_FILES", 52 | 43: "GREP", 53 | 45: "COMMAND", 54 | 46: "REKALL_PLUGIN", 55 | } 56 | var ArtifactSource_SourceType_value = map[string]int32{ 57 | "COLLECTOR_TYPE_UNKNOWN": 0, 58 | "FILE": 1, 59 | "REGISTRY_KEY": 2, 60 | "REGISTRY_VALUE": 3, 61 | "WMI": 4, 62 | "ARTIFACT": 5, 63 | "PATH": 6, 64 | "DIRECTORY": 7, 65 | "ARTIFACT_GROUP": 8, 66 | "GRR_CLIENT_ACTION": 40, 67 | "LIST_FILES": 41, 68 | "ARTIFACT_FILES": 42, 69 | "GREP": 43, 70 | "COMMAND": 45, 71 | "REKALL_PLUGIN": 46, 72 | } 73 | 74 | func (x ArtifactSource_SourceType) Enum() *ArtifactSource_SourceType { 75 | p := new(ArtifactSource_SourceType) 76 | *p = x 77 | return p 78 | } 79 | func (x ArtifactSource_SourceType) String() string { 80 | return proto.EnumName(ArtifactSource_SourceType_name, int32(x)) 81 | } 82 | func (x *ArtifactSource_SourceType) UnmarshalJSON(data []byte) error { 83 | value, err := proto.UnmarshalJSONEnum(ArtifactSource_SourceType_value, data, "ArtifactSource_SourceType") 84 | if err != nil { 85 | return err 86 | } 87 | *x = ArtifactSource_SourceType(value) 88 | return nil 89 | } 90 | func (ArtifactSource_SourceType) EnumDescriptor() ([]byte, []int) { return fileDescriptor4, []int{0, 0} } 91 | 92 | // Proto representation of an ArtifactSource. 93 | type ArtifactSource struct { 94 | Type *ArtifactSource_SourceType `protobuf:"varint,1,opt,name=type,enum=ArtifactSource_SourceType" json:"type,omitempty"` 95 | Attributes *Dict `protobuf:"bytes,2,opt,name=attributes" json:"attributes,omitempty"` 96 | Conditions []string `protobuf:"bytes,3,rep,name=conditions" json:"conditions,omitempty"` 97 | ReturnedTypes []string `protobuf:"bytes,4,rep,name=returned_types" json:"returned_types,omitempty"` 98 | SupportedOs []string `protobuf:"bytes,5,rep,name=supported_os" json:"supported_os,omitempty"` 99 | XXX_unrecognized []byte `json:"-"` 100 | } 101 | 102 | func (m *ArtifactSource) Reset() { *m = ArtifactSource{} } 103 | func (m *ArtifactSource) String() string { return proto.CompactTextString(m) } 104 | func (*ArtifactSource) ProtoMessage() {} 105 | func (*ArtifactSource) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} } 106 | 107 | func (m *ArtifactSource) GetType() ArtifactSource_SourceType { 108 | if m != nil && m.Type != nil { 109 | return *m.Type 110 | } 111 | return ArtifactSource_COLLECTOR_TYPE_UNKNOWN 112 | } 113 | 114 | func (m *ArtifactSource) GetAttributes() *Dict { 115 | if m != nil { 116 | return m.Attributes 117 | } 118 | return nil 119 | } 120 | 121 | func (m *ArtifactSource) GetConditions() []string { 122 | if m != nil { 123 | return m.Conditions 124 | } 125 | return nil 126 | } 127 | 128 | func (m *ArtifactSource) GetReturnedTypes() []string { 129 | if m != nil { 130 | return m.ReturnedTypes 131 | } 132 | return nil 133 | } 134 | 135 | func (m *ArtifactSource) GetSupportedOs() []string { 136 | if m != nil { 137 | return m.SupportedOs 138 | } 139 | return nil 140 | } 141 | 142 | // Proto representation of an artifact. 143 | type Artifact struct { 144 | Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 145 | Conditions []string `protobuf:"bytes,2,rep,name=conditions" json:"conditions,omitempty"` 146 | Doc *string `protobuf:"bytes,3,opt,name=doc" json:"doc,omitempty"` 147 | Labels []string `protobuf:"bytes,4,rep,name=labels" json:"labels,omitempty"` 148 | SupportedOs []string `protobuf:"bytes,5,rep,name=supported_os" json:"supported_os,omitempty"` 149 | Urls []string `protobuf:"bytes,6,rep,name=urls" json:"urls,omitempty"` 150 | Provides []string `protobuf:"bytes,8,rep,name=provides" json:"provides,omitempty"` 151 | Sources []*ArtifactSource `protobuf:"bytes,9,rep,name=sources" json:"sources,omitempty"` 152 | ErrorMessage *string `protobuf:"bytes,10,opt,name=error_message" json:"error_message,omitempty"` 153 | XXX_unrecognized []byte `json:"-"` 154 | } 155 | 156 | func (m *Artifact) Reset() { *m = Artifact{} } 157 | func (m *Artifact) String() string { return proto.CompactTextString(m) } 158 | func (*Artifact) ProtoMessage() {} 159 | func (*Artifact) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} } 160 | 161 | func (m *Artifact) GetName() string { 162 | if m != nil && m.Name != nil { 163 | return *m.Name 164 | } 165 | return "" 166 | } 167 | 168 | func (m *Artifact) GetConditions() []string { 169 | if m != nil { 170 | return m.Conditions 171 | } 172 | return nil 173 | } 174 | 175 | func (m *Artifact) GetDoc() string { 176 | if m != nil && m.Doc != nil { 177 | return *m.Doc 178 | } 179 | return "" 180 | } 181 | 182 | func (m *Artifact) GetLabels() []string { 183 | if m != nil { 184 | return m.Labels 185 | } 186 | return nil 187 | } 188 | 189 | func (m *Artifact) GetSupportedOs() []string { 190 | if m != nil { 191 | return m.SupportedOs 192 | } 193 | return nil 194 | } 195 | 196 | func (m *Artifact) GetUrls() []string { 197 | if m != nil { 198 | return m.Urls 199 | } 200 | return nil 201 | } 202 | 203 | func (m *Artifact) GetProvides() []string { 204 | if m != nil { 205 | return m.Provides 206 | } 207 | return nil 208 | } 209 | 210 | func (m *Artifact) GetSources() []*ArtifactSource { 211 | if m != nil { 212 | return m.Sources 213 | } 214 | return nil 215 | } 216 | 217 | func (m *Artifact) GetErrorMessage() string { 218 | if m != nil && m.ErrorMessage != nil { 219 | return *m.ErrorMessage 220 | } 221 | return "" 222 | } 223 | 224 | type ArtifactProcessorDescriptor struct { 225 | Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 226 | Description *string `protobuf:"bytes,2,opt,name=description" json:"description,omitempty"` 227 | OutputTypes []string `protobuf:"bytes,3,rep,name=output_types" json:"output_types,omitempty"` 228 | XXX_unrecognized []byte `json:"-"` 229 | } 230 | 231 | func (m *ArtifactProcessorDescriptor) Reset() { *m = ArtifactProcessorDescriptor{} } 232 | func (m *ArtifactProcessorDescriptor) String() string { return proto.CompactTextString(m) } 233 | func (*ArtifactProcessorDescriptor) ProtoMessage() {} 234 | func (*ArtifactProcessorDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} } 235 | 236 | func (m *ArtifactProcessorDescriptor) GetName() string { 237 | if m != nil && m.Name != nil { 238 | return *m.Name 239 | } 240 | return "" 241 | } 242 | 243 | func (m *ArtifactProcessorDescriptor) GetDescription() string { 244 | if m != nil && m.Description != nil { 245 | return *m.Description 246 | } 247 | return "" 248 | } 249 | 250 | func (m *ArtifactProcessorDescriptor) GetOutputTypes() []string { 251 | if m != nil { 252 | return m.OutputTypes 253 | } 254 | return nil 255 | } 256 | 257 | type ArtifactDescriptor struct { 258 | Artifact *Artifact `protobuf:"bytes,1,opt,name=artifact" json:"artifact,omitempty"` 259 | Dependencies []string `protobuf:"bytes,2,rep,name=dependencies" json:"dependencies,omitempty"` 260 | PathDependencies []string `protobuf:"bytes,3,rep,name=path_dependencies" json:"path_dependencies,omitempty"` 261 | ArtifactSource *string `protobuf:"bytes,4,opt,name=artifact_source" json:"artifact_source,omitempty"` 262 | Processors []*ArtifactProcessorDescriptor `protobuf:"bytes,5,rep,name=processors" json:"processors,omitempty"` 263 | IsCustom *bool `protobuf:"varint,6,opt,name=is_custom" json:"is_custom,omitempty"` 264 | ErrorMessage *string `protobuf:"bytes,7,opt,name=error_message" json:"error_message,omitempty"` 265 | XXX_unrecognized []byte `json:"-"` 266 | } 267 | 268 | func (m *ArtifactDescriptor) Reset() { *m = ArtifactDescriptor{} } 269 | func (m *ArtifactDescriptor) String() string { return proto.CompactTextString(m) } 270 | func (*ArtifactDescriptor) ProtoMessage() {} 271 | func (*ArtifactDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} } 272 | 273 | func (m *ArtifactDescriptor) GetArtifact() *Artifact { 274 | if m != nil { 275 | return m.Artifact 276 | } 277 | return nil 278 | } 279 | 280 | func (m *ArtifactDescriptor) GetDependencies() []string { 281 | if m != nil { 282 | return m.Dependencies 283 | } 284 | return nil 285 | } 286 | 287 | func (m *ArtifactDescriptor) GetPathDependencies() []string { 288 | if m != nil { 289 | return m.PathDependencies 290 | } 291 | return nil 292 | } 293 | 294 | func (m *ArtifactDescriptor) GetArtifactSource() string { 295 | if m != nil && m.ArtifactSource != nil { 296 | return *m.ArtifactSource 297 | } 298 | return "" 299 | } 300 | 301 | func (m *ArtifactDescriptor) GetProcessors() []*ArtifactProcessorDescriptor { 302 | if m != nil { 303 | return m.Processors 304 | } 305 | return nil 306 | } 307 | 308 | func (m *ArtifactDescriptor) GetIsCustom() bool { 309 | if m != nil && m.IsCustom != nil { 310 | return *m.IsCustom 311 | } 312 | return false 313 | } 314 | 315 | func (m *ArtifactDescriptor) GetErrorMessage() string { 316 | if m != nil && m.ErrorMessage != nil { 317 | return *m.ErrorMessage 318 | } 319 | return "" 320 | } 321 | 322 | func init() { 323 | proto.RegisterType((*ArtifactSource)(nil), "ArtifactSource") 324 | proto.RegisterType((*Artifact)(nil), "Artifact") 325 | proto.RegisterType((*ArtifactProcessorDescriptor)(nil), "ArtifactProcessorDescriptor") 326 | proto.RegisterType((*ArtifactDescriptor)(nil), "ArtifactDescriptor") 327 | proto.RegisterEnum("ArtifactSource_SourceType", ArtifactSource_SourceType_name, ArtifactSource_SourceType_value) 328 | } 329 | 330 | func init() { proto.RegisterFile("artifact.proto", fileDescriptor4) } 331 | 332 | var fileDescriptor4 = []byte{ 333 | // 1202 bytes of a gzipped FileDescriptorProto 334 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xac, 0x55, 0xdd, 0x6e, 0xdb, 0x46, 335 | 0x13, 0xfd, 0x64, 0xc9, 0xb6, 0xb4, 0x76, 0x14, 0x66, 0x3e, 0xa4, 0x65, 0x93, 0x34, 0x5d, 0xb8, 336 | 0x6d, 0xa2, 0x34, 0x09, 0x83, 0x18, 0xf9, 0x6d, 0x82, 0x14, 0xfa, 0x8b, 0xaa, 0x58, 0x91, 0x04, 337 | 0x99, 0x4e, 0x6a, 0xa0, 0x00, 0x41, 0x91, 0x2b, 0x69, 0x53, 0x8a, 0xcb, 0xec, 0x2e, 0x63, 0xe8, 338 | 0xb2, 0x8f, 0xd0, 0xfb, 0xbe, 0x43, 0x9f, 0xa1, 0x40, 0x9f, 0xa4, 0x7d, 0x82, 0xde, 0xf7, 0xa2, 339 | 0xd8, 0x5d, 0x51, 0xb4, 0x8c, 0xc0, 0x57, 0xbd, 0xb2, 0xc5, 0x9d, 0x39, 0x67, 0xce, 0xce, 0x99, 340 | 0x59, 0x54, 0xf5, 0xb9, 0xa4, 0x13, 0x3f, 0x90, 0x4e, 0xc2, 0x99, 0x64, 0x57, 0xd0, 0x3b, 0x36, 341 | 0x16, 0xcb, 0xff, 0xab, 0x82, 0xcc, 0xfd, 0x58, 0xd2, 0xc0, 0xfc, 0xde, 0xfb, 0x75, 0x0b, 0x55, 342 | 0xeb, 0xcb, 0xf0, 0x43, 0x96, 0xf2, 0x80, 0x40, 0x1b, 0x95, 0xe4, 0x22, 0x21, 0x76, 0x01, 0x17, 343 | 0x6a, 0xd5, 0xfd, 0x2b, 0xce, 0xfa, 0xb1, 0x63, 0xfe, 0xb8, 0x8b, 0x84, 0x34, 0xae, 0xfe, 0xf9, 344 | 0xcf, 0x5f, 0x7f, 0x14, 0x2e, 0xc3, 0xff, 0xdd, 0x19, 0xc1, 0x2a, 0x07, 0xb3, 0x09, 0x16, 0x26, 345 | 0x0c, 0x7e, 0x44, 0xc8, 0x97, 0x92, 0xd3, 0x71, 0x2a, 0x89, 0xb0, 0x37, 0x70, 0xa1, 0xb6, 0xb3, 346 | 0xbf, 0xe9, 0xb4, 0x68, 0x20, 0x1b, 0x75, 0x9d, 0xf7, 0x0c, 0x9e, 0xaa, 0xbc, 0x3c, 0x08, 0xcb, 347 | 0x99, 0x2f, 0x71, 0x48, 0x44, 0xc0, 0xe9, 0x98, 0x60, 0x39, 0x23, 0x19, 0x18, 0x26, 0xce, 0xd4, 348 | 0xc1, 0x13, 0x1a, 0x11, 0x9c, 0xf8, 0x72, 0x26, 0x1c, 0x78, 0x87, 0x50, 0xc0, 0xe2, 0x90, 0x4a, 349 | 0xca, 0x62, 0x61, 0x17, 0x71, 0xb1, 0x56, 0x69, 0xbc, 0xd1, 0xb0, 0x43, 0xe8, 0x0f, 0xc6, 0xef, 350 | 0x48, 0x20, 0x55, 0xbc, 0x24, 0x1c, 0xe7, 0x71, 0x19, 0x41, 0x40, 0x43, 0x82, 0xe9, 0x04, 0xcb, 351 | 0x19, 0x15, 0x4b, 0x0a, 0xec, 0x27, 0x49, 0x44, 0x55, 0x0d, 0x0c, 0xfb, 0x78, 0x4a, 0x3f, 0x90, 352 | 0x18, 0x8b, 0x85, 0x90, 0x64, 0xee, 0xc0, 0x2f, 0x05, 0x54, 0xe5, 0x44, 0xa6, 0x3c, 0x26, 0xa1, 353 | 0xa7, 0x64, 0x0a, 0xbb, 0xa4, 0x09, 0x17, 0x9a, 0x50, 0xc0, 0xfb, 0x3a, 0x8e, 0xa8, 0x90, 0x4a, 354 | 0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09, 409 | 0x00, 0x00, 410 | } 411 | -------------------------------------------------------------------------------- /output_plugin.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. 2 | // source: output_plugin.proto 3 | // DO NOT EDIT! 4 | 5 | package apiclient 6 | 7 | import proto "github.com/golang/protobuf/proto" 8 | import fmt "fmt" 9 | import math "math" 10 | 11 | // Reference imports to suppress errors if they are not otherwise used. 12 | var _ = proto.Marshal 13 | var _ = fmt.Errorf 14 | var _ = math.Inf 15 | 16 | type OutputPluginBatchProcessingStatus_Status int32 17 | 18 | const ( 19 | OutputPluginBatchProcessingStatus_SUCCESS OutputPluginBatchProcessingStatus_Status = 0 20 | OutputPluginBatchProcessingStatus_ERROR OutputPluginBatchProcessingStatus_Status = 1 21 | ) 22 | 23 | var OutputPluginBatchProcessingStatus_Status_name = map[int32]string{ 24 | 0: "SUCCESS", 25 | 1: "ERROR", 26 | } 27 | var OutputPluginBatchProcessingStatus_Status_value = map[string]int32{ 28 | "SUCCESS": 0, 29 | "ERROR": 1, 30 | } 31 | 32 | func (x OutputPluginBatchProcessingStatus_Status) Enum() *OutputPluginBatchProcessingStatus_Status { 33 | p := new(OutputPluginBatchProcessingStatus_Status) 34 | *p = x 35 | return p 36 | } 37 | func (x OutputPluginBatchProcessingStatus_Status) String() string { 38 | return proto.EnumName(OutputPluginBatchProcessingStatus_Status_name, int32(x)) 39 | } 40 | func (x *OutputPluginBatchProcessingStatus_Status) UnmarshalJSON(data []byte) error { 41 | value, err := proto.UnmarshalJSONEnum(OutputPluginBatchProcessingStatus_Status_value, data, "OutputPluginBatchProcessingStatus_Status") 42 | if err != nil { 43 | return err 44 | } 45 | *x = OutputPluginBatchProcessingStatus_Status(value) 46 | return nil 47 | } 48 | func (OutputPluginBatchProcessingStatus_Status) EnumDescriptor() ([]byte, []int) { 49 | return fileDescriptor13, []int{1, 0} 50 | } 51 | 52 | type OutputPluginVerificationResult_Status int32 53 | 54 | const ( 55 | OutputPluginVerificationResult_N_A OutputPluginVerificationResult_Status = 0 56 | OutputPluginVerificationResult_SUCCESS OutputPluginVerificationResult_Status = 1 57 | OutputPluginVerificationResult_WARNING OutputPluginVerificationResult_Status = 2 58 | OutputPluginVerificationResult_FAILURE OutputPluginVerificationResult_Status = 3 59 | ) 60 | 61 | var OutputPluginVerificationResult_Status_name = map[int32]string{ 62 | 0: "N_A", 63 | 1: "SUCCESS", 64 | 2: "WARNING", 65 | 3: "FAILURE", 66 | } 67 | var OutputPluginVerificationResult_Status_value = map[string]int32{ 68 | "N_A": 0, 69 | "SUCCESS": 1, 70 | "WARNING": 2, 71 | "FAILURE": 3, 72 | } 73 | 74 | func (x OutputPluginVerificationResult_Status) Enum() *OutputPluginVerificationResult_Status { 75 | p := new(OutputPluginVerificationResult_Status) 76 | *p = x 77 | return p 78 | } 79 | func (x OutputPluginVerificationResult_Status) String() string { 80 | return proto.EnumName(OutputPluginVerificationResult_Status_name, int32(x)) 81 | } 82 | func (x *OutputPluginVerificationResult_Status) UnmarshalJSON(data []byte) error { 83 | value, err := proto.UnmarshalJSONEnum(OutputPluginVerificationResult_Status_value, data, "OutputPluginVerificationResult_Status") 84 | if err != nil { 85 | return err 86 | } 87 | *x = OutputPluginVerificationResult_Status(value) 88 | return nil 89 | } 90 | func (OutputPluginVerificationResult_Status) EnumDescriptor() ([]byte, []int) { 91 | return fileDescriptor13, []int{2, 0} 92 | } 93 | 94 | type OutputPluginDescriptor struct { 95 | PluginName *string `protobuf:"bytes,1,opt,name=plugin_name" json:"plugin_name,omitempty"` 96 | PluginArgs []byte `protobuf:"bytes,2,opt,name=plugin_args" json:"plugin_args,omitempty"` 97 | XXX_unrecognized []byte `json:"-"` 98 | } 99 | 100 | func (m *OutputPluginDescriptor) Reset() { *m = OutputPluginDescriptor{} } 101 | func (m *OutputPluginDescriptor) String() string { return proto.CompactTextString(m) } 102 | func (*OutputPluginDescriptor) ProtoMessage() {} 103 | func (*OutputPluginDescriptor) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{0} } 104 | 105 | func (m *OutputPluginDescriptor) GetPluginName() string { 106 | if m != nil && m.PluginName != nil { 107 | return *m.PluginName 108 | } 109 | return "" 110 | } 111 | 112 | func (m *OutputPluginDescriptor) GetPluginArgs() []byte { 113 | if m != nil { 114 | return m.PluginArgs 115 | } 116 | return nil 117 | } 118 | 119 | // Next id: 7 120 | type OutputPluginBatchProcessingStatus struct { 121 | Status *OutputPluginBatchProcessingStatus_Status `protobuf:"varint,1,opt,name=status,enum=OutputPluginBatchProcessingStatus_Status,def=0" json:"status,omitempty"` 122 | PluginDescriptor *OutputPluginDescriptor `protobuf:"bytes,6,opt,name=plugin_descriptor" json:"plugin_descriptor,omitempty"` 123 | Summary *string `protobuf:"bytes,3,opt,name=summary" json:"summary,omitempty"` 124 | BatchIndex *uint64 `protobuf:"varint,4,opt,name=batch_index" json:"batch_index,omitempty"` 125 | BatchSize *uint64 `protobuf:"varint,5,opt,name=batch_size" json:"batch_size,omitempty"` 126 | XXX_unrecognized []byte `json:"-"` 127 | } 128 | 129 | func (m *OutputPluginBatchProcessingStatus) Reset() { *m = OutputPluginBatchProcessingStatus{} } 130 | func (m *OutputPluginBatchProcessingStatus) String() string { return proto.CompactTextString(m) } 131 | func (*OutputPluginBatchProcessingStatus) ProtoMessage() {} 132 | func (*OutputPluginBatchProcessingStatus) Descriptor() ([]byte, []int) { 133 | return fileDescriptor13, []int{1} 134 | } 135 | 136 | const Default_OutputPluginBatchProcessingStatus_Status OutputPluginBatchProcessingStatus_Status = OutputPluginBatchProcessingStatus_SUCCESS 137 | 138 | func (m *OutputPluginBatchProcessingStatus) GetStatus() OutputPluginBatchProcessingStatus_Status { 139 | if m != nil && m.Status != nil { 140 | return *m.Status 141 | } 142 | return Default_OutputPluginBatchProcessingStatus_Status 143 | } 144 | 145 | func (m *OutputPluginBatchProcessingStatus) GetPluginDescriptor() *OutputPluginDescriptor { 146 | if m != nil { 147 | return m.PluginDescriptor 148 | } 149 | return nil 150 | } 151 | 152 | func (m *OutputPluginBatchProcessingStatus) GetSummary() string { 153 | if m != nil && m.Summary != nil { 154 | return *m.Summary 155 | } 156 | return "" 157 | } 158 | 159 | func (m *OutputPluginBatchProcessingStatus) GetBatchIndex() uint64 { 160 | if m != nil && m.BatchIndex != nil { 161 | return *m.BatchIndex 162 | } 163 | return 0 164 | } 165 | 166 | func (m *OutputPluginBatchProcessingStatus) GetBatchSize() uint64 { 167 | if m != nil && m.BatchSize != nil { 168 | return *m.BatchSize 169 | } 170 | return 0 171 | } 172 | 173 | type OutputPluginVerificationResult struct { 174 | PluginId *string `protobuf:"bytes,1,opt,name=plugin_id" json:"plugin_id,omitempty"` 175 | PluginDescriptor *OutputPluginDescriptor `protobuf:"bytes,2,opt,name=plugin_descriptor" json:"plugin_descriptor,omitempty"` 176 | Status *OutputPluginVerificationResult_Status `protobuf:"varint,3,opt,name=status,enum=OutputPluginVerificationResult_Status" json:"status,omitempty"` 177 | StatusMessage *string `protobuf:"bytes,4,opt,name=status_message" json:"status_message,omitempty"` 178 | Timestamp *uint64 `protobuf:"varint,5,opt,name=timestamp" json:"timestamp,omitempty"` 179 | XXX_unrecognized []byte `json:"-"` 180 | } 181 | 182 | func (m *OutputPluginVerificationResult) Reset() { *m = OutputPluginVerificationResult{} } 183 | func (m *OutputPluginVerificationResult) String() string { return proto.CompactTextString(m) } 184 | func (*OutputPluginVerificationResult) ProtoMessage() {} 185 | func (*OutputPluginVerificationResult) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{2} } 186 | 187 | func (m *OutputPluginVerificationResult) GetPluginId() string { 188 | if m != nil && m.PluginId != nil { 189 | return *m.PluginId 190 | } 191 | return "" 192 | } 193 | 194 | func (m *OutputPluginVerificationResult) GetPluginDescriptor() *OutputPluginDescriptor { 195 | if m != nil { 196 | return m.PluginDescriptor 197 | } 198 | return nil 199 | } 200 | 201 | func (m *OutputPluginVerificationResult) GetStatus() OutputPluginVerificationResult_Status { 202 | if m != nil && m.Status != nil { 203 | return *m.Status 204 | } 205 | return OutputPluginVerificationResult_N_A 206 | } 207 | 208 | func (m *OutputPluginVerificationResult) GetStatusMessage() string { 209 | if m != nil && m.StatusMessage != nil { 210 | return *m.StatusMessage 211 | } 212 | return "" 213 | } 214 | 215 | func (m *OutputPluginVerificationResult) GetTimestamp() uint64 { 216 | if m != nil && m.Timestamp != nil { 217 | return *m.Timestamp 218 | } 219 | return 0 220 | } 221 | 222 | type OutputPluginVerificationResultsList struct { 223 | Results []*OutputPluginVerificationResult `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` 224 | XXX_unrecognized []byte `json:"-"` 225 | } 226 | 227 | func (m *OutputPluginVerificationResultsList) Reset() { *m = OutputPluginVerificationResultsList{} } 228 | func (m *OutputPluginVerificationResultsList) String() string { return proto.CompactTextString(m) } 229 | func (*OutputPluginVerificationResultsList) ProtoMessage() {} 230 | func (*OutputPluginVerificationResultsList) Descriptor() ([]byte, []int) { 231 | return fileDescriptor13, []int{3} 232 | } 233 | 234 | func (m *OutputPluginVerificationResultsList) GetResults() []*OutputPluginVerificationResult { 235 | if m != nil { 236 | return m.Results 237 | } 238 | return nil 239 | } 240 | 241 | type EmailOutputPluginArgs struct { 242 | EmailAddress *string `protobuf:"bytes,1,opt,name=email_address" json:"email_address,omitempty"` 243 | EmailsLimit *uint64 `protobuf:"varint,2,opt,name=emails_limit,def=100" json:"emails_limit,omitempty"` 244 | XXX_unrecognized []byte `json:"-"` 245 | } 246 | 247 | func (m *EmailOutputPluginArgs) Reset() { *m = EmailOutputPluginArgs{} } 248 | func (m *EmailOutputPluginArgs) String() string { return proto.CompactTextString(m) } 249 | func (*EmailOutputPluginArgs) ProtoMessage() {} 250 | func (*EmailOutputPluginArgs) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{4} } 251 | 252 | const Default_EmailOutputPluginArgs_EmailsLimit uint64 = 100 253 | 254 | func (m *EmailOutputPluginArgs) GetEmailAddress() string { 255 | if m != nil && m.EmailAddress != nil { 256 | return *m.EmailAddress 257 | } 258 | return "" 259 | } 260 | 261 | func (m *EmailOutputPluginArgs) GetEmailsLimit() uint64 { 262 | if m != nil && m.EmailsLimit != nil { 263 | return *m.EmailsLimit 264 | } 265 | return Default_EmailOutputPluginArgs_EmailsLimit 266 | } 267 | 268 | type BigQueryOutputPluginArgs struct { 269 | ExportOptions *ExportOptions `protobuf:"bytes,2,opt,name=export_options" json:"export_options,omitempty"` 270 | ConvertValues *bool `protobuf:"varint,3,opt,name=convert_values,def=1" json:"convert_values,omitempty"` 271 | XXX_unrecognized []byte `json:"-"` 272 | } 273 | 274 | func (m *BigQueryOutputPluginArgs) Reset() { *m = BigQueryOutputPluginArgs{} } 275 | func (m *BigQueryOutputPluginArgs) String() string { return proto.CompactTextString(m) } 276 | func (*BigQueryOutputPluginArgs) ProtoMessage() {} 277 | func (*BigQueryOutputPluginArgs) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{5} } 278 | 279 | const Default_BigQueryOutputPluginArgs_ConvertValues bool = true 280 | 281 | func (m *BigQueryOutputPluginArgs) GetExportOptions() *ExportOptions { 282 | if m != nil { 283 | return m.ExportOptions 284 | } 285 | return nil 286 | } 287 | 288 | func (m *BigQueryOutputPluginArgs) GetConvertValues() bool { 289 | if m != nil && m.ConvertValues != nil { 290 | return *m.ConvertValues 291 | } 292 | return Default_BigQueryOutputPluginArgs_ConvertValues 293 | } 294 | 295 | type CSVOutputPluginArgs struct { 296 | ExportOptions *ExportOptions `protobuf:"bytes,2,opt,name=export_options" json:"export_options,omitempty"` 297 | ConvertValues *bool `protobuf:"varint,3,opt,name=convert_values,def=1" json:"convert_values,omitempty"` 298 | XXX_unrecognized []byte `json:"-"` 299 | } 300 | 301 | func (m *CSVOutputPluginArgs) Reset() { *m = CSVOutputPluginArgs{} } 302 | func (m *CSVOutputPluginArgs) String() string { return proto.CompactTextString(m) } 303 | func (*CSVOutputPluginArgs) ProtoMessage() {} 304 | func (*CSVOutputPluginArgs) Descriptor() ([]byte, []int) { return fileDescriptor13, []int{6} } 305 | 306 | const Default_CSVOutputPluginArgs_ConvertValues bool = true 307 | 308 | func (m *CSVOutputPluginArgs) GetExportOptions() *ExportOptions { 309 | if m != nil { 310 | return m.ExportOptions 311 | } 312 | return nil 313 | } 314 | 315 | func (m *CSVOutputPluginArgs) GetConvertValues() bool { 316 | if m != nil && m.ConvertValues != nil { 317 | return *m.ConvertValues 318 | } 319 | return Default_CSVOutputPluginArgs_ConvertValues 320 | } 321 | 322 | func init() { 323 | proto.RegisterType((*OutputPluginDescriptor)(nil), "OutputPluginDescriptor") 324 | proto.RegisterType((*OutputPluginBatchProcessingStatus)(nil), "OutputPluginBatchProcessingStatus") 325 | proto.RegisterType((*OutputPluginVerificationResult)(nil), "OutputPluginVerificationResult") 326 | proto.RegisterType((*OutputPluginVerificationResultsList)(nil), "OutputPluginVerificationResultsList") 327 | proto.RegisterType((*EmailOutputPluginArgs)(nil), "EmailOutputPluginArgs") 328 | proto.RegisterType((*BigQueryOutputPluginArgs)(nil), "BigQueryOutputPluginArgs") 329 | proto.RegisterType((*CSVOutputPluginArgs)(nil), "CSVOutputPluginArgs") 330 | proto.RegisterEnum("OutputPluginBatchProcessingStatus_Status", OutputPluginBatchProcessingStatus_Status_name, OutputPluginBatchProcessingStatus_Status_value) 331 | proto.RegisterEnum("OutputPluginVerificationResult_Status", OutputPluginVerificationResult_Status_name, OutputPluginVerificationResult_Status_value) 332 | } 333 | 334 | func init() { proto.RegisterFile("output_plugin.proto", fileDescriptor13) } 335 | 336 | var fileDescriptor13 = []byte{ 337 | // 871 bytes of a gzipped FileDescriptorProto 338 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xd4, 0x54, 0x4f, 0x73, 0xdb, 0x44, 339 | 0x14, 0xaf, 0xe2, 0xb4, 0xc1, 0xeb, 0x60, 0xcc, 0x66, 0x68, 0x55, 0x0e, 0x65, 0x51, 0x21, 0x75, 340 | 0xa1, 0x15, 0x26, 0x9d, 0x16, 0x26, 0x05, 0x32, 0x56, 0xec, 0x74, 0x32, 0x13, 0x9c, 0x62, 0xa7, 341 | 0xcd, 0x81, 0x83, 0x66, 0x2d, 0x3d, 0xdb, 0x5b, 0xa4, 0x95, 0x66, 0x77, 0x55, 0xe2, 0xde, 0xf9, 342 | 0x0c, 0x7c, 0x04, 0x3e, 0x01, 0x17, 0xce, 0x7c, 0x0d, 0x2e, 0x70, 0xe2, 0x3b, 0x70, 0x60, 0xf6, 343 | 0x8f, 0x9d, 0xd0, 0x64, 0xd2, 0x33, 0x27, 0x69, 0x9f, 0xde, 0xef, 0xbd, 0xdf, 0xef, 0xfd, 0x9e, 344 | 0x16, 0x6d, 0x14, 0x95, 0x2a, 0x2b, 0x15, 0x97, 0x59, 0x35, 0x65, 0x3c, 0x2c, 0x45, 0xa1, 0x8a, 345 | 0xf7, 0xd7, 0xe1, 0xa4, 0x2c, 0x84, 0x72, 0xa7, 0xa6, 0x84, 0x9c, 0x72, 0xc5, 0x12, 0x7b, 0x0e, 346 | 0xfe, 0xf0, 0xd0, 0xf5, 0x43, 0x83, 0x7a, 0x6a, 0x40, 0x3d, 0x90, 0x89, 0x60, 0xa5, 0x2a, 0x04, 347 | 0x7e, 0x8c, 0x1a, 0xb6, 0x50, 0xcc, 0x69, 0x0e, 0xbe, 0x47, 0xbc, 0x76, 0x3d, 0xda, 0xfc, 0xf3, 348 | 0x9f, 0xbf, 0x7e, 0xf7, 0x08, 0xbe, 0x75, 0x34, 0x03, 0xa2, 0xe3, 0xa4, 0x98, 0x10, 0x35, 0x03, 349 | 0x62, 0x5b, 0x13, 0xd7, 0x1a, 0xff, 0xe4, 0x2d, 0xd1, 0x54, 0x4c, 0xa5, 0xbf, 0x42, 0xbc, 0xf6, 350 | 0x7a, 0x54, 0x1a, 0xf4, 0x0b, 0x7c, 0xa4, 0xd1, 0x25, 0x15, 0x34, 0x07, 0x05, 0x42, 0x92, 0x49, 351 | 0x21, 0x88, 0x9a, 0x31, 0xb9, 0x80, 0x93, 0x6f, 0x2b, 0xa9, 0xc8, 0x18, 0x08, 0xe5, 0x84, 0x71, 352 | 0xa9, 0x28, 0x4f, 0x96, 0x8d, 0x74, 0xd3, 0xd4, 0x25, 0xde, 0x91, 0x44, 0x57, 0x8f, 0xd5, 0xbc, 353 | 0x84, 0xf0, 0x13, 0xfc, 0x04, 0x9c, 0x8a, 0xae, 0x98, 0xca, 0xdd, 0x8c, 0x4a, 0x19, 0xfc, 0x5d, 354 | 0x43, 0x1f, 0x9e, 0xd5, 0x17, 0x51, 0x95, 0xcc, 0x9e, 0x8a, 0x22, 0x01, 0x29, 0x19, 0x9f, 0x8e, 355 | 0x14, 0x55, 0x95, 0xc4, 0x73, 0x74, 0x4d, 0x9a, 0x37, 0xa3, 0xb2, 0xb9, 0x75, 0x37, 0x7c, 0x23, 356 | 0x26, 0xb4, 0x8f, 0xed, 0xb5, 0xd1, 0xb3, 0xdd, 0xdd, 0xfe, 0x68, 0x14, 0x3d, 0x34, 0xda, 0x3e, 357 | 0xc3, 0xf7, 0x8f, 0xa9, 0xb4, 0x62, 0xc6, 0x1a, 0x47, 0x64, 0x95, 0x68, 0xe0, 0xa4, 0xca, 0xb2, 358 | 0x39, 0x29, 0x6d, 0x15, 0x48, 0x49, 0x21, 0x08, 0x2f, 0xd4, 0x0e, 0x3e, 0x41, 0xef, 0xba, 0x39, 359 | 0xa5, 0xcb, 0xd1, 0xfb, 0xd7, 0x88, 0xd7, 0x6e, 0x6c, 0xdd, 0x08, 0x2f, 0x76, 0x26, 0xea, 0x99, 360 | 0x56, 0xdf, 0xe0, 0xaf, 0x4e, 0x63, 0x17, 0xda, 0x40, 0x04, 0xc8, 0xb2, 0xe0, 0x92, 0x8d, 0x33, 361 | 0x38, 0x9d, 0xb1, 0x00, 0x59, 0x65, 0x2a, 0xc4, 0x77, 0xd1, 0x9a, 0xac, 0xf2, 0x9c, 0x8a, 0xb9, 362 | 0x5f, 0x33, 0xde, 0xfa, 0xa6, 0x2c, 0xc6, 0xad, 0x91,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, 0x7d, 0xde, 0xe9, 0x04, 0xbf, 0x79, 385 | 0xc8, 0x8f, 0xd8, 0xf4, 0xbb, 0x0a, 0xc4, 0xfc, 0x1c, 0xb9, 0x2e, 0x6a, 0xda, 0x5b, 0x3a, 0x2e, 386 | 0x4a, 0xad, 0x46, 0xba, 0x1d, 0x6a, 0x86, 0x7d, 0x13, 0x3e, 0xb4, 0xd1, 0xe8, 0xa6, 0x61, 0xbb, 387 | 0x81, 0xdf, 0xb1, 0x61, 0xe2, 0xb2, 0x43, 0xdf, 0xc3, 0xdf, 0xa3, 0x66, 0x52, 0xf0, 0x97, 0x20, 388 | 0x54, 0xfc, 0x92, 0x66, 0x15, 0xd8, 0x2d, 0x79, 0x6b, 0x7b, 0x55, 0x89, 0x0a, 0xa2, 0xaf, 0x0d, 389 | 0xf0, 0x0b, 0xfc, 0x60, 0x7f, 0x42, 0x74, 0xe0, 0x1e, 0x71, 0xc9, 0xc4, 0x26, 0x9b, 0xdb, 0xc1, 390 | 0x52, 0xb8, 0x3f, 0x11, 0x0c, 0x78, 0x9a, 0xcd, 0x75, 0x2c, 0xa7, 0x2a, 0xf4, 0x57, 0x82, 0x5f, 391 | 0x3d, 0xb4, 0xb1, 0x3b, 0x7a, 0xfe, 0x7f, 0xe3, 0xfd, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x25, 392 | 0xdc, 0x6b, 0x61, 0x11, 0x07, 0x00, 0x00, 393 | } 394 | -------------------------------------------------------------------------------- /export.proto: -------------------------------------------------------------------------------- 1 | // Protobufs used to export data from AFF4 to the outside world. 2 | 3 | syntax = "proto2"; 4 | 5 | import "anomaly.proto"; 6 | import "jobs.proto"; 7 | import "sysinfo.proto"; 8 | import "semantic.proto"; 9 | 10 | 11 | message ExportOptions { 12 | optional bool export_files_contents = 1 [ default = false, (sem_type) = { 13 | description: "If this is true, open files and export their full or " 14 | "partial contents. Note: this may require additional datastore " 15 | "roundtrips and slow down the export process, also exporting file " 16 | "contents may significantly increase size of the exported data." 17 | }]; 18 | optional bool follow_urns = 2 [ default = false, (sem_type) = { 19 | description: "If this is true, follow urns and try to export not only " 20 | "the urns themselves, but also the data they are pointing to. Note: " 21 | "this may require additional datastore roundtrips and slow down the " 22 | "export process." 23 | }]; 24 | optional bool export_files_hashes = 3 [ default = true, (sem_type) = { 25 | description: "If this is true, export hashes when dealing with " 26 | "file-related values. The files won't be hashed during the " 27 | "export, hashes will only be exported if they were collected before " 28 | "the export. This option affects exporting VFSFile and StatEntry " 29 | "RDFValues. This is true by default even though it requires extra " 30 | " datastore roundtrips because it's very useful and users expect the " 31 | "hashes to be there." 32 | }]; 33 | repeated string annotations = 4 [(sem_type) = { 34 | description: "Annotations to add to exported data. This field can be " 35 | "used to differentiate sets of exported data inside a " 36 | "particular exported type. e.g. data collected by users " 37 | "vs. data collected by cronjob." 38 | }]; 39 | 40 | } 41 | 42 | message ExportedMetadata { 43 | // Next field ID: 16 44 | 45 | optional string client_urn = 1 [(sem_type) = { 46 | type: "ClientURN", 47 | description: "Client ID of a client that contains this entry." 48 | }]; 49 | optional string hostname = 2 [(sem_type) = { 50 | description: "Client hostname." 51 | }]; 52 | optional string os = 3 [(sem_type) = { 53 | description: "Client Operating System class (Windows|Darwin|Linux)." 54 | }]; 55 | optional uint64 client_age = 4 [(sem_type) = { 56 | type: "RDFDatetime", 57 | description: "Age of the client." 58 | }]; 59 | optional string uname = 5 [(sem_type) = { 60 | description: "Uname string." 61 | }]; 62 | optional string os_release = 6 [(sem_type) = { 63 | description: "The OS release identifier e.g. 7, OSX, debian." 64 | }]; 65 | optional string os_version = 7 [(sem_type) = { 66 | description: "The OS version ID e.g. 6.1.7601SP1, 10.9.2, 14.04." 67 | }]; 68 | optional string usernames = 8 [(sem_type) = { 69 | description: "Username." 70 | }]; 71 | optional string mac_address = 9 [(sem_type) = { 72 | description: "MAC address." 73 | }]; 74 | optional uint64 timestamp = 10 [(sem_type) = { 75 | type: "RDFDatetime", 76 | description: "When data was exported." 77 | }]; 78 | 79 | optional uint64 original_timestamp = 15 [(sem_type) = { 80 | type: "RDFDatetime", 81 | description: "When original data was generated." 82 | }]; 83 | 84 | // BEGIN DEPRECATED 85 | optional string deprecated_session_id = 11 [(sem_type) = { 86 | type: "SessionID", 87 | description: "Deprecated session id of a hunt that collected the data." 88 | }, deprecated=true]; 89 | // END_DEPRECATED 90 | 91 | optional string labels = 12 [(sem_type) = { 92 | description: "CSV list of client labels." 93 | }]; 94 | 95 | optional string source_urn = 13 [(sem_type) = { 96 | type: "RDFURN", 97 | description: "URN of a source of exported data." 98 | }]; 99 | 100 | optional string annotations = 14 [(sem_type) = { 101 | description: "CSV list of annotations for this data. This field can be " 102 | "used to differentiate sets of exported data inside a " 103 | "particular exported type. e.g. data collected by users " 104 | "vs. data collected by cronjob." 105 | }]; 106 | 107 | } 108 | 109 | message ExportedClient { 110 | optional ExportedMetadata metadata = 1; 111 | } 112 | 113 | message ExportedNetworkInterface { 114 | optional ExportedMetadata metadata = 1; 115 | 116 | optional string mac_address = 2; 117 | optional string ifname = 3; 118 | optional string ip4_addresses = 4; 119 | optional string ip6_addresses = 5; 120 | } 121 | 122 | message ExportedDNSClientConfiguration { 123 | optional ExportedMetadata metadata = 1; 124 | 125 | optional string dns_servers = 2; 126 | optional string dns_suffixes = 3; 127 | } 128 | 129 | message ExportedFile { 130 | optional ExportedMetadata metadata = 1; 131 | 132 | optional string urn = 2 [(sem_type) = { 133 | type: "RDFURN", 134 | description: "The location of this file in the AFF4 space." 135 | }]; 136 | 137 | optional string basename = 3 [(sem_type) = { 138 | description: "Basename of the file." 139 | }]; 140 | 141 | optional uint64 st_mode = 4 [(sem_type) = { 142 | type: "StatMode", 143 | description: "A unix file permission mode." 144 | }]; 145 | 146 | optional uint32 st_ino = 5; 147 | optional uint32 st_dev = 6; 148 | optional uint32 st_nlink = 7; 149 | optional uint32 st_uid = 8; 150 | optional uint32 st_gid = 9; 151 | optional uint64 st_size = 10; 152 | optional uint64 st_atime = 11 [(sem_type) = { 153 | type: "RDFDatetimeSeconds", 154 | description: "Last access time." 155 | }]; 156 | 157 | optional uint64 st_mtime = 12 [(sem_type) = { 158 | type: "RDFDatetimeSeconds", 159 | description: "Last modified time." 160 | }]; 161 | 162 | optional uint64 st_ctime = 13 [(sem_type) = { 163 | type: "RDFDatetimeSeconds", 164 | description: "Last inode change time." 165 | }]; 166 | 167 | optional uint32 st_blocks = 14; 168 | optional uint32 st_blksize = 15; 169 | optional uint32 st_rdev = 16; 170 | optional string symlink = 17; 171 | 172 | optional bytes content = 18 [(sem_type) = { 173 | description: "Actual content of the file if available." 174 | }]; 175 | optional string content_sha256 = 19 [(sem_type) = { 176 | description: "SHA256 of content" 177 | }]; 178 | 179 | // client reported values for the hashes 180 | optional string hash_md5 = 20; 181 | optional string hash_sha1 = 21; 182 | optional string hash_sha256 = 22; 183 | 184 | // pecoff hashes 185 | optional string pecoff_hash_md5 = 23; 186 | optional string pecoff_hash_sha1 = 24; 187 | 188 | // certificates data 189 | optional string cert_hasher_name = 25; 190 | optional string cert_program_name = 26; 191 | optional string cert_program_url = 27; 192 | optional string cert_signing_id = 28; 193 | optional string cert_chain_head_issuer = 29; 194 | optional string cert_countersignature_chain_head_issuer = 30; 195 | optional string cert_certificates = 31; 196 | } 197 | 198 | message ExportedRegistryKey { 199 | optional ExportedMetadata metadata = 1; 200 | 201 | optional string urn = 2 [(sem_type) = { 202 | type: "RDFURN", 203 | description: "URN of the registry key." 204 | }]; 205 | optional uint64 last_modified = 3 [(sem_type) = { 206 | type: "RDFDatetimeSeconds", 207 | description: "Last modified timestamp." 208 | }]; 209 | optional StatEntry.RegistryType type = 4; 210 | optional bytes data = 5; 211 | } 212 | 213 | message ExportedProcess { 214 | optional ExportedMetadata metadata = 1; 215 | 216 | optional uint32 pid = 2; 217 | optional uint32 ppid = 3; 218 | optional string name = 4; 219 | optional string exe = 5; 220 | optional string cmdline = 6; 221 | optional uint64 ctime = 7; 222 | optional uint32 real_uid = 8; 223 | optional uint32 effective_uid = 9; 224 | optional uint32 saved_uid = 10; 225 | optional uint32 real_gid = 11; 226 | optional uint32 effective_gid = 12; 227 | optional uint32 saved_gid = 13; 228 | optional string username = 14; 229 | optional string terminal = 15; 230 | optional string status = 16; 231 | optional int32 nice = 17; 232 | optional string cwd = 18; 233 | optional uint32 num_threads = 19; 234 | optional float user_cpu_time = 20; 235 | optional float system_cpu_time = 21; 236 | optional float cpu_percent = 22; 237 | optional uint64 rss_size = 23; 238 | optional uint64 vms_size = 24; 239 | optional float memory_percent = 25; 240 | } 241 | 242 | message ExportedNetworkConnection { 243 | optional ExportedMetadata metadata = 1; 244 | 245 | optional NetworkConnection.Family family = 2; 246 | optional NetworkConnection.Type type = 3 [default = UNKNOWN_SOCKET]; 247 | optional NetworkEndpoint local_address = 4; 248 | optional NetworkEndpoint remote_address = 5; 249 | optional NetworkConnection.State state = 6 [default = UNKNOWN]; 250 | optional uint32 pid = 7; 251 | optional uint64 ctime = 8; 252 | } 253 | 254 | message ExportedAnomaly { 255 | optional Anomaly.AnomalyType type = 1 [(sem_type) = { 256 | description: "Type of anomaly this represents.", 257 | }]; 258 | 259 | optional Anomaly.AnomalyLevel severity = 2 [(sem_type) = { 260 | description: "Severity of the anomaly if it is a true positive.", 261 | }]; 262 | 263 | optional Anomaly.AnomalyLevel confidence = 3 [(sem_type) = { 264 | description: "Confidence that the anomaly is a true positive.", 265 | }]; 266 | 267 | optional string symptom = 4 [(sem_type) = { 268 | description: "A description of what is anomalous.", 269 | }]; 270 | 271 | optional string explanation = 5 [(sem_type) = { 272 | description: "A description of possible explanations for the anomaly if " 273 | "additional information is available.", 274 | }]; 275 | 276 | optional string generated_by = 6 [(sem_type) = { 277 | description: "String describing what generated the anomaly, this is " 278 | "normally the name of a parser or artifact.", 279 | }]; 280 | 281 | // Not exporting PathSpec due to its recursive nature. 282 | 283 | optional string anomaly_reference_id = 8 [(sem_type) = { 284 | description: "A string used to reference the anomaly in the Anomaly " 285 | "database." 286 | }]; 287 | 288 | optional string finding = 9 [(sem_type) = { 289 | description: "String descriptions of data that triggered the Anomaly." 290 | }]; 291 | } 292 | 293 | message ExportedCheckResult { 294 | optional ExportedMetadata metadata = 1; 295 | 296 | optional string check_id = 2 [(sem_type) = { 297 | description: "The check id, identifies what check is being reported." 298 | }]; 299 | optional ExportedAnomaly anomaly = 3 [(sem_type) = { 300 | description: "Specific finding indicating an issue exists." 301 | }]; 302 | } 303 | 304 | message ExportedOpenFile { 305 | optional ExportedMetadata metadata = 1; 306 | 307 | optional uint32 pid = 2; 308 | optional string path = 3; 309 | } 310 | 311 | message ExportedFileStoreHash { 312 | optional ExportedMetadata metadata = 1; 313 | 314 | optional string hash = 2; 315 | optional string hash_type = 3; 316 | optional string fingerprint_type = 4; 317 | optional string target_urn = 5 [(sem_type) = { 318 | type: "RDFURN", 319 | }]; 320 | } 321 | 322 | message ExportedMatch { 323 | optional ExportedMetadata metadata = 1; 324 | optional uint64 offset = 2; 325 | optional uint64 length = 3; 326 | optional bytes data = 4; 327 | optional string urn = 5 [(sem_type) = { 328 | type: "RDFURN", 329 | description: "The location of this file in the AFF4 space." 330 | }]; 331 | } 332 | 333 | message ExportedBytes { 334 | optional ExportedMetadata metadata = 1; 335 | 336 | optional bytes data = 2; 337 | optional uint64 length = 3; 338 | } 339 | 340 | 341 | // Next field id: 6 342 | message ExportedArtifactFilesDownloaderResult { 343 | optional ExportedMetadata metadata = 1; 344 | 345 | optional ExportedRegistryKey original_registry_key = 2; 346 | optional ExportedFile original_file = 5; 347 | 348 | optional string found_path = 3; 349 | optional ExportedFile downloaded_file = 4; 350 | } 351 | 352 | 353 | // Rekall-specific protobufs for reliable exporting of data from plugins. 354 | 355 | // Contains the minimum information necessary from a Windows process so 356 | // correlation with logs can be done easily. 357 | // Related plugins: pslist 358 | message ExportedRekallProcess { 359 | optional ExportedMetadata metadata = 1; 360 | 361 | optional uint64 pid = 2 [(sem_type) = { 362 | description: "Unique process ID of this process." 363 | }]; 364 | 365 | optional string name = 3 [(sem_type) = { 366 | description: "The process name." 367 | }]; 368 | 369 | optional string fullpath = 4 [(sem_type) = { 370 | description: "The full path of the executable that was loaded when the " 371 | "process was started." 372 | }]; 373 | 374 | optional uint64 creation_time = 5 [(sem_type) = { 375 | type: "RDFDatetime", 376 | description: "When the process was created. In microseconds from UNIX " 377 | "epoch. UTC." 378 | }]; 379 | 380 | optional uint64 exit_time = 6 [(sem_type) = { 381 | type: "RDFDatetime", 382 | description: "When the process exitted. In microseconds from UNIX " 383 | "epoch. UTC." 384 | }]; 385 | 386 | optional uint64 parent_pid = 7 [(sem_type) = { 387 | description: "Unique process ID of the parent process." 388 | }]; 389 | 390 | optional string commandline = 8 [(sem_type) = { 391 | description: "The commandline used to launch this process." 392 | }]; 393 | 394 | optional string trusted_fullpath = 9 [(sem_type) = { 395 | description: "The full path of the executable that was loaded when the " 396 | "process was started. Obtained via a trusted method that's " 397 | "not easily tampered with. If no such method exists, do not " 398 | "fill in this field." 399 | }]; 400 | 401 | }; 402 | 403 | // Represents a module (usually a dll or executable) loaded into a process' 404 | // address space in Windows. 405 | // Related plugins: ldrmodules 406 | message ExportedRekallWindowsLoadedModule { 407 | optional ExportedMetadata metadata = 1; 408 | 409 | optional ExportedRekallProcess process = 2; 410 | 411 | optional string fullpath = 3 [(sem_type) = { 412 | description: "The full path of the file backing this module." 413 | }]; 414 | 415 | optional uint64 address = 4 [(sem_type) = { 416 | description: "Base address where the module is loaded." 417 | }]; 418 | 419 | optional uint64 size = 5 [(sem_type) = { 420 | description: "Size of the module." 421 | }]; 422 | 423 | optional bool is_in_load_list = 6 [(sem_type) = { 424 | description: "Whether the module is referenced in the " 425 | "InLoadOrderLinksInLoadOrderModuleList of the Process " 426 | "Environment." 427 | }]; 428 | 429 | optional string in_load_fullpath = 7 [(sem_type) = { 430 | description: "The full path of the module in this list." 431 | }]; 432 | 433 | optional bool is_in_init_list = 8 [(sem_type) = { 434 | description: "Whether the module is referenced in the " 435 | "InInitializationOrderModuleList of the Process Environment " 436 | "Block." 437 | }]; 438 | 439 | optional string in_init_fullpath = 9 [(sem_type) = { 440 | description: "The full path of the module in this list." 441 | }]; 442 | 443 | optional bool is_in_mem_list = 10 [(sem_type) = { 444 | description: "Whether the module is referenced in the " 445 | "InMemoryOrderModuleList of the Process Environment Block." 446 | }]; 447 | 448 | optional string in_mem_fullpath = 11 [(sem_type) = { 449 | description: "The full path of the module in this list." 450 | }]; 451 | }; 452 | 453 | 454 | // Represents a handle held by a process. 455 | // Related plugins: handles 456 | message ExportedWindowsHandle { 457 | optional ExportedMetadata metadata = 1; 458 | optional ExportedRekallProcess process = 2; 459 | 460 | optional uint64 address = 3 [(sem_type) = { 461 | description: "The address of the OBJECT_HEADER of the handle." 462 | }]; 463 | 464 | // 465 | optional string type = 4 [(sem_type) = { 466 | description: "The type of handle (Process, Thread, Key, Event, " 467 | "Mutant...)." 468 | }]; 469 | 470 | // 471 | optional string name = 5 [(sem_type) = { 472 | description: "The name of the handle." 473 | }]; 474 | }; 475 | 476 | 477 | // Represents an entry in the syscall table 478 | // Related plugins: check_syscall 479 | message ExportedLinuxSyscallTableEntry { 480 | optional ExportedMetadata metadata = 1; 481 | 482 | optional string table = 2 [(sem_type) = { 483 | description: "The name of the syscall table." 484 | }]; 485 | 486 | optional uint64 index = 3 [(sem_type) = { 487 | description: "The index within the table. It's equivalent to the syscall " 488 | "number" 489 | }]; 490 | 491 | optional uint64 handler_address = 4 [(sem_type) = { 492 | description: "The address of the syscall handler." 493 | }]; 494 | 495 | optional string symbol = 5 [(sem_type) = { 496 | description: "The resolved symbol name for the handler " 497 | "(i.e: linux!sys_read)." 498 | }]; 499 | }; 500 | 501 | 502 | // Represents a Linux task. 503 | // Related plugins: pslist 504 | message ExportedRekallLinuxTask { 505 | optional ExportedMetadata metadata = 1; 506 | 507 | optional uint64 address = 2 [(sem_type) = { 508 | description: "The kernel address of this task_struct." 509 | }]; 510 | 511 | optional uint64 pid = 3 [(sem_type) = { 512 | description: "Unique process ID of this process." 513 | }]; 514 | 515 | optional string name = 4 [(sem_type) = { 516 | description: "The process name." 517 | }]; 518 | 519 | optional uint64 creation_time = 5 [(sem_type) = { 520 | type: "RDFDatetime", 521 | description: "When the process was created. In microseconds from UNIX " 522 | "epoch. UTC." 523 | }]; 524 | 525 | optional uint64 parent_pid = 6 [(sem_type) = { 526 | description: "Unique process ID of the parent process." 527 | }]; 528 | 529 | optional string commandline = 7 [(sem_type) = { 530 | description: "The commandline used to launch this process." 531 | }]; 532 | 533 | optional uint64 uid = 8 [(sem_type) = { 534 | description: "The current UID." 535 | }]; 536 | 537 | optional uint64 gid = 9 [(sem_type) = { 538 | description: "The current GID." 539 | }]; 540 | 541 | optional uint64 euid = 10 [(sem_type) = { 542 | description: "The current effective UID." 543 | }]; 544 | 545 | optional uint64 egid = 11 [(sem_type) = { 546 | description: "The current effective GID." 547 | }]; 548 | }; 549 | 550 | 551 | // Represents a task_ops entry. 552 | // Related plugins: check_task_fops, 553 | message ExportedRekallLinuxTaskOp { 554 | optional ExportedMetadata metadata = 1; 555 | 556 | optional ExportedRekallLinuxTask task = 2 [(sem_type) = { 557 | description: "The task this operation applies to." 558 | }]; 559 | 560 | optional string operation = 3 [(sem_type) = { 561 | description: "The name of the operation." 562 | }]; 563 | 564 | optional uint64 handler_address = 4 [(sem_type) = { 565 | description: "The address of the handler." 566 | }]; 567 | 568 | optional string module = 5 [(sem_type) = { 569 | description: "The name of the kernel module that holds the callback." 570 | }]; 571 | 572 | optional string symbol = 6 [(sem_type) = { 573 | description: "The name of the symbol at handler_address." 574 | }]; 575 | }; 576 | 577 | 578 | // Represents a proc_fops entry. 579 | // Related plugins: check_proc_fops 580 | message ExportedRekallLinuxProcOp { 581 | optional ExportedMetadata metadata = 1; 582 | 583 | optional string fullpath = 2 [(sem_type) = { 584 | description: "The fullpath to the proc entry this operation belongs to." 585 | }]; 586 | 587 | optional string operation = 3 [(sem_type) = { 588 | description: "The name of the operation." 589 | }]; 590 | 591 | optional uint64 handler_address = 4 [(sem_type) = { 592 | description: "The address of the handler." 593 | }]; 594 | 595 | optional string module = 5 [(sem_type) = { 596 | description: "The name of the kernel module that holds the callback." 597 | }]; 598 | 599 | optional string symbol = 6 [(sem_type) = { 600 | description: "The name of the symbol at handler_address." 601 | }]; 602 | }; 603 | -------------------------------------------------------------------------------- /data_store.pb.go: -------------------------------------------------------------------------------- 1 | // Code generated by protoc-gen-go. 2 | // source: data_store.proto 3 | // DO NOT EDIT! 4 | 5 | package apiclient 6 | 7 | import proto "github.com/golang/protobuf/proto" 8 | import fmt "fmt" 9 | import math "math" 10 | 11 | // Reference imports to suppress errors if they are not otherwise used. 12 | var _ = proto.Marshal 13 | var _ = fmt.Errorf 14 | var _ = math.Inf 15 | 16 | type TimestampSpec_Type int32 17 | 18 | const ( 19 | TimestampSpec_SPECIFIC_TIME TimestampSpec_Type = 0 20 | TimestampSpec_RANGED_TIME TimestampSpec_Type = 1 21 | TimestampSpec_ALL_TIMESTAMPS TimestampSpec_Type = 2 22 | TimestampSpec_NEWEST_TIMESTAMP TimestampSpec_Type = 3 23 | ) 24 | 25 | var TimestampSpec_Type_name = map[int32]string{ 26 | 0: "SPECIFIC_TIME", 27 | 1: "RANGED_TIME", 28 | 2: "ALL_TIMESTAMPS", 29 | 3: "NEWEST_TIMESTAMP", 30 | } 31 | var TimestampSpec_Type_value = map[string]int32{ 32 | "SPECIFIC_TIME": 0, 33 | "RANGED_TIME": 1, 34 | "ALL_TIMESTAMPS": 2, 35 | "NEWEST_TIMESTAMP": 3, 36 | } 37 | 38 | func (x TimestampSpec_Type) Enum() *TimestampSpec_Type { 39 | p := new(TimestampSpec_Type) 40 | *p = x 41 | return p 42 | } 43 | func (x TimestampSpec_Type) String() string { 44 | return proto.EnumName(TimestampSpec_Type_name, int32(x)) 45 | } 46 | func (x *TimestampSpec_Type) UnmarshalJSON(data []byte) error { 47 | value, err := proto.UnmarshalJSONEnum(TimestampSpec_Type_value, data, "TimestampSpec_Type") 48 | if err != nil { 49 | return err 50 | } 51 | *x = TimestampSpec_Type(value) 52 | return nil 53 | } 54 | func (TimestampSpec_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{0, 0} } 55 | 56 | // Options specific to the Value. 57 | type DataStoreValue_Option int32 58 | 59 | const ( 60 | DataStoreValue_DEFAULT DataStoreValue_Option = 0 61 | // The value should replace other values in the data store (Used for Set 62 | // operations). 63 | DataStoreValue_REPLACE DataStoreValue_Option = 1 64 | ) 65 | 66 | var DataStoreValue_Option_name = map[int32]string{ 67 | 0: "DEFAULT", 68 | 1: "REPLACE", 69 | } 70 | var DataStoreValue_Option_value = map[string]int32{ 71 | "DEFAULT": 0, 72 | "REPLACE": 1, 73 | } 74 | 75 | func (x DataStoreValue_Option) Enum() *DataStoreValue_Option { 76 | p := new(DataStoreValue_Option) 77 | *p = x 78 | return p 79 | } 80 | func (x DataStoreValue_Option) String() string { 81 | return proto.EnumName(DataStoreValue_Option_name, int32(x)) 82 | } 83 | func (x *DataStoreValue_Option) UnmarshalJSON(data []byte) error { 84 | value, err := proto.UnmarshalJSONEnum(DataStoreValue_Option_value, data, "DataStoreValue_Option") 85 | if err != nil { 86 | return err 87 | } 88 | *x = DataStoreValue_Option(value) 89 | return nil 90 | } 91 | func (DataStoreValue_Option) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{1, 0} } 92 | 93 | // Although we can relay exceptions they mess up the logs so we 94 | // explicitly return them here. 95 | type DataStoreResponse_Status int32 96 | 97 | const ( 98 | DataStoreResponse_OK DataStoreResponse_Status = 0 99 | DataStoreResponse_AUTHORIZATION_DENIED DataStoreResponse_Status = 1 100 | DataStoreResponse_DATA_STORE_ERROR DataStoreResponse_Status = 2 101 | DataStoreResponse_FLOW_ERROR DataStoreResponse_Status = 3 102 | DataStoreResponse_TIMEOUT_ERROR DataStoreResponse_Status = 4 103 | ) 104 | 105 | var DataStoreResponse_Status_name = map[int32]string{ 106 | 0: "OK", 107 | 1: "AUTHORIZATION_DENIED", 108 | 2: "DATA_STORE_ERROR", 109 | 3: "FLOW_ERROR", 110 | 4: "TIMEOUT_ERROR", 111 | } 112 | var DataStoreResponse_Status_value = map[string]int32{ 113 | "OK": 0, 114 | "AUTHORIZATION_DENIED": 1, 115 | "DATA_STORE_ERROR": 2, 116 | "FLOW_ERROR": 3, 117 | "TIMEOUT_ERROR": 4, 118 | } 119 | 120 | func (x DataStoreResponse_Status) Enum() *DataStoreResponse_Status { 121 | p := new(DataStoreResponse_Status) 122 | *p = x 123 | return p 124 | } 125 | func (x DataStoreResponse_Status) String() string { 126 | return proto.EnumName(DataStoreResponse_Status_name, int32(x)) 127 | } 128 | func (x *DataStoreResponse_Status) UnmarshalJSON(data []byte) error { 129 | value, err := proto.UnmarshalJSONEnum(DataStoreResponse_Status_value, data, "DataStoreResponse_Status") 130 | if err != nil { 131 | return err 132 | } 133 | *x = DataStoreResponse_Status(value) 134 | return nil 135 | } 136 | func (DataStoreResponse_Status) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{6, 0} } 137 | 138 | // Represent a timestamp specification. 139 | type TimestampSpec struct { 140 | Type *TimestampSpec_Type `protobuf:"varint,1,opt,name=type,enum=TimestampSpec_Type,def=3" json:"type,omitempty"` 141 | Start *uint64 `protobuf:"varint,2,opt,name=start" json:"start,omitempty"` 142 | End *uint64 `protobuf:"varint,3,opt,name=end" json:"end,omitempty"` 143 | XXX_unrecognized []byte `json:"-"` 144 | } 145 | 146 | func (m *TimestampSpec) Reset() { *m = TimestampSpec{} } 147 | func (m *TimestampSpec) String() string { return proto.CompactTextString(m) } 148 | func (*TimestampSpec) ProtoMessage() {} 149 | func (*TimestampSpec) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} } 150 | 151 | const Default_TimestampSpec_Type TimestampSpec_Type = TimestampSpec_NEWEST_TIMESTAMP 152 | 153 | func (m *TimestampSpec) GetType() TimestampSpec_Type { 154 | if m != nil && m.Type != nil { 155 | return *m.Type 156 | } 157 | return Default_TimestampSpec_Type 158 | } 159 | 160 | func (m *TimestampSpec) GetStart() uint64 { 161 | if m != nil && m.Start != nil { 162 | return *m.Start 163 | } 164 | return 0 165 | } 166 | 167 | func (m *TimestampSpec) GetEnd() uint64 { 168 | if m != nil && m.End != nil { 169 | return *m.End 170 | } 171 | return 0 172 | } 173 | 174 | type DataStoreValue struct { 175 | Attribute *string `protobuf:"bytes,1,opt,name=attribute" json:"attribute,omitempty"` 176 | Value *DataBlob `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` 177 | Timestamp *TimestampSpec `protobuf:"bytes,5,opt,name=timestamp" json:"timestamp,omitempty"` 178 | Option *DataStoreValue_Option `protobuf:"varint,4,opt,name=option,enum=DataStoreValue_Option" json:"option,omitempty"` 179 | XXX_unrecognized []byte `json:"-"` 180 | } 181 | 182 | func (m *DataStoreValue) Reset() { *m = DataStoreValue{} } 183 | func (m *DataStoreValue) String() string { return proto.CompactTextString(m) } 184 | func (*DataStoreValue) ProtoMessage() {} 185 | func (*DataStoreValue) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{1} } 186 | 187 | func (m *DataStoreValue) GetAttribute() string { 188 | if m != nil && m.Attribute != nil { 189 | return *m.Attribute 190 | } 191 | return "" 192 | } 193 | 194 | func (m *DataStoreValue) GetValue() *DataBlob { 195 | if m != nil { 196 | return m.Value 197 | } 198 | return nil 199 | } 200 | 201 | func (m *DataStoreValue) GetTimestamp() *TimestampSpec { 202 | if m != nil { 203 | return m.Timestamp 204 | } 205 | return nil 206 | } 207 | 208 | func (m *DataStoreValue) GetOption() DataStoreValue_Option { 209 | if m != nil && m.Option != nil { 210 | return *m.Option 211 | } 212 | return DataStoreValue_DEFAULT 213 | } 214 | 215 | type DataStoreRequest struct { 216 | Subject []string `protobuf:"bytes,1,rep,name=subject" json:"subject,omitempty"` 217 | Values []*DataStoreValue `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"` 218 | Timestamp *TimestampSpec `protobuf:"bytes,5,opt,name=timestamp" json:"timestamp,omitempty"` 219 | Token *ACLToken `protobuf:"bytes,6,opt,name=token" json:"token,omitempty"` 220 | Sync *bool `protobuf:"varint,7,opt,name=sync" json:"sync,omitempty"` 221 | Limit *uint32 `protobuf:"varint,8,opt,name=limit" json:"limit,omitempty"` 222 | XXX_unrecognized []byte `json:"-"` 223 | } 224 | 225 | func (m *DataStoreRequest) Reset() { *m = DataStoreRequest{} } 226 | func (m *DataStoreRequest) String() string { return proto.CompactTextString(m) } 227 | func (*DataStoreRequest) ProtoMessage() {} 228 | func (*DataStoreRequest) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{2} } 229 | 230 | func (m *DataStoreRequest) GetSubject() []string { 231 | if m != nil { 232 | return m.Subject 233 | } 234 | return nil 235 | } 236 | 237 | func (m *DataStoreRequest) GetValues() []*DataStoreValue { 238 | if m != nil { 239 | return m.Values 240 | } 241 | return nil 242 | } 243 | 244 | func (m *DataStoreRequest) GetTimestamp() *TimestampSpec { 245 | if m != nil { 246 | return m.Timestamp 247 | } 248 | return nil 249 | } 250 | 251 | func (m *DataStoreRequest) GetToken() *ACLToken { 252 | if m != nil { 253 | return m.Token 254 | } 255 | return nil 256 | } 257 | 258 | func (m *DataStoreRequest) GetSync() bool { 259 | if m != nil && m.Sync != nil { 260 | return *m.Sync 261 | } 262 | return false 263 | } 264 | 265 | func (m *DataStoreRequest) GetLimit() uint32 { 266 | if m != nil && m.Limit != nil { 267 | return *m.Limit 268 | } 269 | return 0 270 | } 271 | 272 | type QueryASTNode struct { 273 | Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` 274 | Args [][]byte `protobuf:"bytes,2,rep,name=args" json:"args,omitempty"` 275 | Children []*QueryASTNode `protobuf:"bytes,3,rep,name=children" json:"children,omitempty"` 276 | XXX_unrecognized []byte `json:"-"` 277 | } 278 | 279 | func (m *QueryASTNode) Reset() { *m = QueryASTNode{} } 280 | func (m *QueryASTNode) String() string { return proto.CompactTextString(m) } 281 | func (*QueryASTNode) ProtoMessage() {} 282 | func (*QueryASTNode) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{3} } 283 | 284 | func (m *QueryASTNode) GetName() string { 285 | if m != nil && m.Name != nil { 286 | return *m.Name 287 | } 288 | return "" 289 | } 290 | 291 | func (m *QueryASTNode) GetArgs() [][]byte { 292 | if m != nil { 293 | return m.Args 294 | } 295 | return nil 296 | } 297 | 298 | func (m *QueryASTNode) GetChildren() []*QueryASTNode { 299 | if m != nil { 300 | return m.Children 301 | } 302 | return nil 303 | } 304 | 305 | type DataStoreQuery struct { 306 | Attributes []string `protobuf:"bytes,1,rep,name=attributes" json:"attributes,omitempty"` 307 | Filter *QueryASTNode `protobuf:"bytes,2,opt,name=filter" json:"filter,omitempty"` 308 | SubjectPrefix *string `protobuf:"bytes,3,opt,name=subject_prefix" json:"subject_prefix,omitempty"` 309 | Subjects []string `protobuf:"bytes,4,rep,name=subjects" json:"subjects,omitempty"` 310 | Limit *uint32 `protobuf:"varint,5,opt,name=limit" json:"limit,omitempty"` 311 | LimitStart *uint32 `protobuf:"varint,6,opt,name=limit_start" json:"limit_start,omitempty"` 312 | Token *ACLToken `protobuf:"bytes,7,opt,name=token" json:"token,omitempty"` 313 | Timestamp *TimestampSpec `protobuf:"bytes,8,opt,name=timestamp" json:"timestamp,omitempty"` 314 | XXX_unrecognized []byte `json:"-"` 315 | } 316 | 317 | func (m *DataStoreQuery) Reset() { *m = DataStoreQuery{} } 318 | func (m *DataStoreQuery) String() string { return proto.CompactTextString(m) } 319 | func (*DataStoreQuery) ProtoMessage() {} 320 | func (*DataStoreQuery) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{4} } 321 | 322 | func (m *DataStoreQuery) GetAttributes() []string { 323 | if m != nil { 324 | return m.Attributes 325 | } 326 | return nil 327 | } 328 | 329 | func (m *DataStoreQuery) GetFilter() *QueryASTNode { 330 | if m != nil { 331 | return m.Filter 332 | } 333 | return nil 334 | } 335 | 336 | func (m *DataStoreQuery) GetSubjectPrefix() string { 337 | if m != nil && m.SubjectPrefix != nil { 338 | return *m.SubjectPrefix 339 | } 340 | return "" 341 | } 342 | 343 | func (m *DataStoreQuery) GetSubjects() []string { 344 | if m != nil { 345 | return m.Subjects 346 | } 347 | return nil 348 | } 349 | 350 | func (m *DataStoreQuery) GetLimit() uint32 { 351 | if m != nil && m.Limit != nil { 352 | return *m.Limit 353 | } 354 | return 0 355 | } 356 | 357 | func (m *DataStoreQuery) GetLimitStart() uint32 { 358 | if m != nil && m.LimitStart != nil { 359 | return *m.LimitStart 360 | } 361 | return 0 362 | } 363 | 364 | func (m *DataStoreQuery) GetToken() *ACLToken { 365 | if m != nil { 366 | return m.Token 367 | } 368 | return nil 369 | } 370 | 371 | func (m *DataStoreQuery) GetTimestamp() *TimestampSpec { 372 | if m != nil { 373 | return m.Timestamp 374 | } 375 | return nil 376 | } 377 | 378 | type ResultSet struct { 379 | Subject *string `protobuf:"bytes,1,opt,name=subject" json:"subject,omitempty"` 380 | Values []*DataStoreValue `protobuf:"bytes,2,rep,name=values" json:"values,omitempty"` 381 | SerializedResult []byte `protobuf:"bytes,3,opt,name=serialized_result" json:"serialized_result,omitempty"` 382 | XXX_unrecognized []byte `json:"-"` 383 | } 384 | 385 | func (m *ResultSet) Reset() { *m = ResultSet{} } 386 | func (m *ResultSet) String() string { return proto.CompactTextString(m) } 387 | func (*ResultSet) ProtoMessage() {} 388 | func (*ResultSet) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{5} } 389 | 390 | func (m *ResultSet) GetSubject() string { 391 | if m != nil && m.Subject != nil { 392 | return *m.Subject 393 | } 394 | return "" 395 | } 396 | 397 | func (m *ResultSet) GetValues() []*DataStoreValue { 398 | if m != nil { 399 | return m.Values 400 | } 401 | return nil 402 | } 403 | 404 | func (m *ResultSet) GetSerializedResult() []byte { 405 | if m != nil { 406 | return m.SerializedResult 407 | } 408 | return nil 409 | } 410 | 411 | type DataStoreResponse struct { 412 | Results []*ResultSet `protobuf:"bytes,1,rep,name=results" json:"results,omitempty"` 413 | // 414 | Count *uint32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"` 415 | Status *DataStoreResponse_Status `protobuf:"varint,3,opt,name=status,enum=DataStoreResponse_Status,def=0" json:"status,omitempty"` 416 | StatusDesc *string `protobuf:"bytes,4,opt,name=status_desc" json:"status_desc,omitempty"` 417 | FailedSubject *string `protobuf:"bytes,5,opt,name=failed_subject" json:"failed_subject,omitempty"` 418 | Request *DataStoreRequest `protobuf:"bytes,6,opt,name=request" json:"request,omitempty"` 419 | XXX_unrecognized []byte `json:"-"` 420 | } 421 | 422 | func (m *DataStoreResponse) Reset() { *m = DataStoreResponse{} } 423 | func (m *DataStoreResponse) String() string { return proto.CompactTextString(m) } 424 | func (*DataStoreResponse) ProtoMessage() {} 425 | func (*DataStoreResponse) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{6} } 426 | 427 | const Default_DataStoreResponse_Status DataStoreResponse_Status = DataStoreResponse_OK 428 | 429 | func (m *DataStoreResponse) GetResults() []*ResultSet { 430 | if m != nil { 431 | return m.Results 432 | } 433 | return nil 434 | } 435 | 436 | func (m *DataStoreResponse) GetCount() uint32 { 437 | if m != nil && m.Count != nil { 438 | return *m.Count 439 | } 440 | return 0 441 | } 442 | 443 | func (m *DataStoreResponse) GetStatus() DataStoreResponse_Status { 444 | if m != nil && m.Status != nil { 445 | return *m.Status 446 | } 447 | return Default_DataStoreResponse_Status 448 | } 449 | 450 | func (m *DataStoreResponse) GetStatusDesc() string { 451 | if m != nil && m.StatusDesc != nil { 452 | return *m.StatusDesc 453 | } 454 | return "" 455 | } 456 | 457 | func (m *DataStoreResponse) GetFailedSubject() string { 458 | if m != nil && m.FailedSubject != nil { 459 | return *m.FailedSubject 460 | } 461 | return "" 462 | } 463 | 464 | func (m *DataStoreResponse) GetRequest() *DataStoreRequest { 465 | if m != nil { 466 | return m.Request 467 | } 468 | return nil 469 | } 470 | 471 | func init() { 472 | proto.RegisterType((*TimestampSpec)(nil), "TimestampSpec") 473 | proto.RegisterType((*DataStoreValue)(nil), "DataStoreValue") 474 | proto.RegisterType((*DataStoreRequest)(nil), "DataStoreRequest") 475 | proto.RegisterType((*QueryASTNode)(nil), "QueryASTNode") 476 | proto.RegisterType((*DataStoreQuery)(nil), "DataStoreQuery") 477 | proto.RegisterType((*ResultSet)(nil), "ResultSet") 478 | proto.RegisterType((*DataStoreResponse)(nil), "DataStoreResponse") 479 | proto.RegisterEnum("TimestampSpec_Type", TimestampSpec_Type_name, TimestampSpec_Type_value) 480 | proto.RegisterEnum("DataStoreValue_Option", DataStoreValue_Option_name, DataStoreValue_Option_value) 481 | proto.RegisterEnum("DataStoreResponse_Status", DataStoreResponse_Status_name, DataStoreResponse_Status_value) 482 | } 483 | 484 | func init() { proto.RegisterFile("data_store.proto", fileDescriptor8) } 485 | 486 | var fileDescriptor8 = []byte{ 487 | // 1054 bytes of a gzipped FileDescriptorProto 488 | 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xb4, 0x95, 0xcd, 0x72, 0xe3, 0x44, 489 | 0x10, 0xc7, 0x57, 0xfe, 0x4a, 0xdc, 0x8e, 0xbd, 0xca, 0xec, 0xd6, 0x96, 0x80, 0x82, 0x9d, 0xf5, 490 | 0x81, 0xf2, 0x16, 0xa0, 0x2a, 0xcc, 0x9e, 0x72, 0x5a, 0xd9, 0x96, 0x37, 0xae, 0x78, 0xed, 0x20, 491 | 0x2b, 0x2c, 0x45, 0x15, 0x65, 0xc6, 0x52, 0x3b, 0x9e, 0x20, 0x4b, 0x8e, 0x66, 0x94, 0x60, 0x5e, 492 | 0x80, 0x17, 0xe0, 0x31, 0xe0, 0x2d, 0x38, 0x71, 0xe3, 0x15, 0xe0, 0x35, 0x28, 0x8a, 0x9a, 0x91, 493 | 0xe3, 0xc4, 0x59, 0x0e, 0x70, 0xe0, 0x36, 0x1f, 0x3d, 0xff, 0xee, 0xfe, 0x75, 0xab, 0x05, 0x66, 494 | 0xc8, 0x24, 0x9b, 0x0a, 0x99, 0xa4, 0x68, 0xaf, 0x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x11, 0xf6, 0xff, 0xa9, 0x08, 0xcd, 0x1f, 528 | 0x0a, 0x50, 0xf5, 0x50, 0x64, 0x91, 0x9c, 0xe0, 0xbd, 0xd6, 0x30, 0xfe, 0xa7, 0xd6, 0xf8, 0xd1, 529 | 0x80, 0x43, 0x81, 0x29, 0x67, 0x11, 0xff, 0x1e, 0xc3, 0x69, 0xaa, 0xbd, 0x6b, 0x62, 0x07, 0x9d, 530 | 0xb5, 0xf6, 0x27, 0xc8, 0xa5, 0xc7, 0xae, 0xe9, 0x9c, 0x63, 0x14, 0xd2, 0xeb, 0x05, 0x0f, 0x16, 531 | 0x74, 0x91, 0x44, 0xa1, 0xd0, 0x03, 0x40, 0x4d, 0x42, 0x7a, 0xfb, 0x9e, 0xf2, 0x98, 0x5e, 0x88, 532 | 0x24, 0x56, 0xbc, 0x96, 0x4c, 0xda, 0xfe, 0x82, 0x8b, 0xdc, 0xe6, 0x9a, 0x47, 0x11, 0x9d, 0x21, 533 | 0x65, 0x57, 0x8c, 0x47, 0x6c, 0x16, 0x21, 0xcd, 0x04, 0x8f, 0xcf, 0xb5, 0xc8, 0x8a, 0xad, 0xa3, 534 | 0x84, 0x85, 0x74, 0x5b, 0x69, 0xbb, 0xf9, 0x73, 0x09, 0x0e, 0xef, 0x7c, 0x2b, 0x62, 0x95, 0xc4, 535 | 0x02, 0xc9, 0x7b, 0xb0, 0x97, 0x07, 0x98, 0xb7, 0x42, 0xad, 0x0d, 0xf6, 0x2d, 0xae, 0xaf, 0xa1, 536 | 0x1c, 0x24, 0x59, 0x9c, 0xcf, 0xc4, 0x7a, 0x67, 0xa4, 0x83, 0x3f, 0x26, 0x7d, 0x3f, 0x91, 0x2c, 537 | 0xa2, 0x71, 0xb6, 0x9c, 0x61, 0xaa, 0xe6, 0xd6, 0x46, 0x81, 0x26, 0xb1, 0x76, 0x2e, 0x30, 0xbd, 538 | 0xc2, 0x94, 0xb6, 0xba, 0x2c, 0x56, 0xf1, 0x2d, 0x93, 0x14, 0xa9, 0x5c, 0xb0, 0x98, 0x46, 0x18, 539 | 0xb7, 0x36, 0xb6, 0xcf, 0x9f, 0xdb, 0xe4, 0x13, 0xa8, 0x08, 0xc9, 0x64, 0x26, 0x34, 0x9c, 0x46, 540 | 0xfb, 0x1d, 0xfb, 0xad, 0xf8, 0xec, 0x89, 0x36, 0x38, 0x2a, 0x8c, 0x4f, 0xc8, 0x18, 0x6a, 0xb9, 541 | 0xf9, 0x34, 0x44, 0x11, 0xe8, 0xe9, 0x51, 0xed, 0x1c, 0xe9, 0x98, 0x5e, 0x90, 0xb6, 0x13, 0x86, 542 | 0x5c, 0x4d, 0x0b, 0x16, 0xd1, 0x45, 0xb6, 0x64, 0x31, 0x4d, 0x91, 0x85, 0x9a, 0xca, 0x12, 0x85, 543 | 0x60, 0xe7, 0xa8, 0x00, 0xea, 0xf0, 0xe6, 0x8c, 0x47, 0x59, 0x8a, 0x36, 0xf9, 0x06, 0x1a, 0x6a, 544 | 0x8d, 0xe1, 0xf4, 0xa6, 0x29, 0xca, 0x5a, 0xf3, 0x58, 0x6b, 0x76, 0xc8, 0xcb, 0x41, 0x4c, 0x03, 545 | 0x26, 0x50, 0xa5, 0xb8, 0x79, 0xf4, 0x71, 0x9e, 0x60, 0x6e, 0xae, 0x92, 0x92, 0x34, 0x60, 0x99, 546 | 0xc0, 0x50, 0x9f, 0xa7, 0xf9, 0x04, 0xa2, 0x32, 0xd1, 0xf6, 0x36, 0x39, 0x53, 0x74, 0xf5, 0xd9, 547 | 0x66, 0x08, 0x1c, 0xda, 0xf7, 0xc7, 0xd5, 0x4d, 0x0b, 0x92, 0xe7, 0xfe, 0x1d, 0x85, 0xbc, 0x29, 548 | 0x30, 0xe2, 0x01, 0x97, 0x5a, 0x9c, 0x0b, 0x45, 0x39, 0x67, 0xd2, 0x0c, 0xa0, 0x92, 0x73, 0x21, 549 | 0x15, 0x28, 0x8c, 0x4f, 0xcc, 0x07, 0xc4, 0x82, 0xc7, 0xce, 0x99, 0x7f, 0x3c, 0xf6, 0x06, 0x5f, 550 | 0x39, 0xfe, 0x60, 0x3c, 0x9a, 0xf6, 0xdc, 0xd1, 0xc0, 0xed, 0x99, 0x86, 0x9a, 0xf3, 0x3d, 0xc7, 551 | 0x77, 0xa6, 0x13, 0x7f, 0xec, 0xb9, 0x53, 0xd7, 0xf3, 0xc6, 0x9e, 0x59, 0x20, 0x0d, 0x80, 0xfe, 552 | 0x70, 0xfc, 0x66, 0xb3, 0x2f, 0xaa, 0xbf, 0x88, 0xfa, 0x0d, 0x8c, 0xcf, 0xfc, 0xcd, 0x51, 0xe9, 553 | 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x79, 0xd9, 0x81, 0x93, 0x07, 0x00, 0x00, 554 | } 555 | --------------------------------------------------------------------------------