diff --git a/.goreleaser.yml b/.goreleaser.yml index 5a12a6a..e3dff37 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -6,7 +6,7 @@ builds: - env: - CGO_ENABLED=0 - GO111MODULE=on - main: ./cmd/fuzzit + main: ./main.go goos: - windows - linux diff --git a/README.md b/README.md index 76f6507..24589ff 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Also, you can use the following command to download and compile (This usually ta ```bash git clone git@github.com:fuzzitdev/fuzzit.git cd fuzzit -go build ./... +go build . ``` ## Usage @@ -34,6 +34,15 @@ Fuzzit CLI can be used either locally or from your CI. Run `fuzzit --help` to get a full list of commands or checkout our [docs](https://docs.fuzzit.dev). +## Examples + +Fuzzit currently supports C/C++ and Go + +* [C/C++ examples](https://github.com/fuzzitdev/example-c) +* [Go examples](https://github.com/fuzzitdev/example-go) + +More information can be at our [docs](https://docs.fuzzit.dev) + ## Contribution Contributions are welcome. If you need additional feature either open a github issue or a PR diff --git a/client/auth.go b/client/auth.go new file mode 100644 index 0000000..9f605b1 --- /dev/null +++ b/client/auth.go @@ -0,0 +1,95 @@ +package client + +import ( + "bytes" + "cloud.google.com/go/firestore" + "context" + "encoding/json" + "errors" + "fmt" + "golang.org/x/oauth2" + "google.golang.org/api/option" + "io/ioutil" + "os" + "time" +) + +func (c * fuzzitClient) ReAuthenticate(force bool) error { + if !force { + file, err := os.Open(CacheFile) + if err != nil { + return err + } + defer file.Close() + + err = json.NewDecoder(file).Decode(c) + if err != nil { + return err + } + } + + if c.ApiKey == "" { + return errors.New("API Key is no configured, please run fuzzit auth [api_key]") + } + + if c.IdToken == "" || (time.Now().Unix() - c.LastRefresh) > 60*45 { + createCustomTokenEndpoint := fmt.Sprintf("%s/createCustomToken?api_key=%s", FuzzitEndpoint, c.ApiKey) + r, err := c.httpClient.Get(createCustomTokenEndpoint) + if err != nil { + return err + } + defer r.Body.Close() + if r.StatusCode != 200 { + return errors.New("API Key is not valid") + } + + err = json.NewDecoder(r.Body).Decode(c) + if err != nil { + return err + } + + r, err = c.httpClient.Post( + "https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken?key=AIzaSyCs_Sm1VOKZwJZmTXdOCvs1wyn91vYMNSY", + "application/json", + bytes.NewBuffer([]byte(fmt.Sprintf(`{"token": "%s", "returnSecureToken": true}`, c.CustomToken)))) + if err != nil { + return err + } + defer r.Body.Close() + + err = json.NewDecoder(r.Body).Decode(c) + if err != nil { + return nil + } + c.LastRefresh = time.Now().Unix() + + cBytes, err := json.MarshalIndent(c, "", "") + if err != nil { + return err + } + err = ioutil.WriteFile(CacheFile, cBytes, 0644) + if err != nil { + return err + } + } + + token := oauth2.Token{ + AccessToken: c.IdToken, + RefreshToken: c.RefreshToken, + Expiry: time.Time{}, + TokenType: "Bearer", + } + + tokenSource := oauth2.StaticTokenSource(&token) + ctx := context.Background() + + // some known issue with go afaik + firestoreClient, err := firestore.NewClient(ctx, "fuzzit-b5fbf", option.WithTokenSource(tokenSource)) + c.firestoreClient = firestoreClient + + if err != nil { + return err + } + + return nil +} diff --git a/client/client.go b/client/client.go new file mode 100644 index 0000000..1cd51fb --- /dev/null +++ b/client/client.go @@ -0,0 +1,74 @@ +package client + +import ( + "cloud.google.com/go/firestore" + "net/http" + "time" +) + +const FuzzitEndpoint = "https://app.fuzzit.dev" +const CacheFile = "/tmp/.fuzzit.cache" + + +type Target struct { + Name string `firestore:"target_name"` +} + +type Job struct { + TargetId string `firestore:"target_id"` + Args string `firestore:"args"` + Type string `firestore:"type"` + Host string `firestore:"host"` + Revision string `firestore:"revision"` + Branch string `firestore:"branch"` + Parallelism uint16 `firestore:"parallelism"` + AsanOptions string `firestore:"asan_options"` + UbsanOptions string `firestore:"ubsan_options"` +} + + +// Internal struct +type job struct { + Completed uint16 `firestore:"completed"` + Status string `firestore:"status"` + Namespace string `firestore:"namespace"` + StartedAt time.Time `firestore:"started_at,serverTimestamp"` + OrgId string `firestore:"org_id"` + Job +} + + +type fuzzitClient struct { + Org string + Namespace string + ApiKey string + CustomToken string + Kind string `json:"kind"` + IdToken string `json:"idToken"` + RefreshToken string `json:"refreshToken"` + ExpiresIn string `json:"expiresIn"` + LastRefresh int64 + firestoreClient *firestore.Client `json:"-"` + httpClient *http.Client `json:"-"` +} + + +func NewFuzzitClient(apiKey string) *fuzzitClient { + c := &fuzzitClient{} + c.httpClient = &http.Client{Timeout: 60 * time.Second} + c.ApiKey = apiKey + + return c +} + +func LoadFuzzitFromCache() (*fuzzitClient, error) { + c := &fuzzitClient{} + c.httpClient = &http.Client{Timeout: 60 * time.Second} + err := c.ReAuthenticate(false) + if err != nil { + return nil, err + } + + return c, nil +} + diff --git a/client/commands.go b/client/commands.go new file mode 100644 index 0000000..c00372f --- /dev/null +++ b/client/commands.go @@ -0,0 +1,172 @@ +package client + +import ( + "bytes" + "cloud.google.com/go/firestore" + "context" + "encoding/json" + "fmt" + "github.com/google/uuid" + "github.com/mholt/archiver" + "google.golang.org/api/iterator" + "io/ioutil" + "log" + "net/http" + "os" + "strings" +) + +func (c * fuzzitClient) GetResource(resource string) error { + err := c.ReAuthenticate(false) + if err != nil { + return err + } + + ctx := context.Background() + rootColRef := "orgs/" + c.Org + "/" + if (len(strings.Split(resource, "/")) % 2) == 0 { + r := rootColRef + resource + docRef := c.firestoreClient.Doc(rootColRef + resource) + if docRef == nil { + return fmt.Errorf("invalid resource %s", r) + } + docsnap, err := docRef.Get(ctx) + if !docsnap.Exists() { + return fmt.Errorf("resource %s doesn't exist", resource) + } + if err != nil { + return err + } + + jsonString, err := json.MarshalIndent(docsnap.Data(), "", " ") + if err != nil { + return err + } + fmt.Println(string(jsonString)) + return nil + } else { + iter := c.firestoreClient.Collection(rootColRef + resource).Documents(ctx) + querySize := 0 + defer iter.Stop() + + for { + doc, err := iter.Next() + if err == iterator.Done { + break + } + if err != nil { + return err + } + data := doc.Data() + data["id"] = doc.Ref.ID + jsonString, err := json.MarshalIndent(data, "", " ") + if err != nil { + return err + } + fmt.Println(string(jsonString)) + querySize += 1 + } + if querySize == 0 { + return fmt.Errorf("no resources for %s", resource) + } + return nil + } +} + +func (c * fuzzitClient) CreateTarget(targetConfig Target, seedPath string) (*firestore.DocumentRef, error) { + ctx := context.Background() + collectionRef := c.firestoreClient.Collection("orgs/" + c.Org + "/targets") + doc, _, err := collectionRef.Add(ctx, + targetConfig) + if err != nil { + return nil, err + } + + if seedPath != "" { + storagePath := fmt.Sprintf("orgs/%s/targets/%s/seed", c.Org, doc.ID) + err := c.uploadFile(seedPath, storagePath, "application/gzip", "seed.tar.gz") + if err != nil { + return nil, err + } + } + return doc, nil +} + +func (c * fuzzitClient) CreateJob(jobConfig Job, files [] string) (*firestore.DocumentRef, error) { + ctx := context.Background() + collectionRef := c.firestoreClient.Collection("orgs/" + c.Org + "/targets/" + jobConfig.TargetId + "/jobs") + fullJob := job{} + fullJob.Job = jobConfig + fullJob.Completed = 0 + fullJob.OrgId = c.Org + fullJob.Namespace = c.Namespace + fullJob.Status = "in progress" + doc, _, err := collectionRef.Add(ctx, + fullJob) + if err != nil { + return nil, err + } + log.Println("Created new job ", doc.ID) + + fuzzerPath := files[0] + splits := strings.Split(fuzzerPath, "/") + filename := splits[len(splits) - 1] + if !strings.HasSuffix(filename, ".tar.gz") { + tmpDir, err := ioutil.TempDir("", "fuzzit") + if err != nil { + return nil, err + } + _, err = copyFile(fuzzerPath, tmpDir+"/fuzzer") + if err != nil { + return nil, err + } + + prefix, err := uuid.NewRandom() + if err != nil { + return nil, err + } + filesToArchive := append([]string{tmpDir + "/fuzzer"}, files[1:]...) + + tmpfile := os.TempDir() + "/" + prefix.String() + ".tar.gz" + z := archiver.NewTarGz() + err = z.Archive(filesToArchive, tmpfile) + if err != nil { + return nil, err + } + fuzzerPath = tmpfile + } + + storagePath := fmt.Sprintf("orgs/%s/targets/%s/jobs/%s/fuzzer", c.Org, jobConfig.TargetId, doc.ID) + err = c.uploadFile(fuzzerPath, storagePath, "application/gzip", "fuzzer.tar.gz") + if err != nil { + return nil, err + } + + jsonStr := []byte(fmt.Sprintf(`{"data": {"org_id": "%s", "target_id": "%s", "job_id": "%s"}}`, c.Org, jobConfig.TargetId, doc.ID)) + req, err := http.NewRequest("POST", + "https://us-central1-fuzzit-b5fbf.cloudfunctions.net/startJob", + bytes.NewBuffer(jsonStr)) + if err != nil { + return nil, err + } + req.Header.Set("Authorization", "Bearer " + c.IdToken) + req.Header.Set("Content-Type", "application/json") + + res, err := httpClient.Do(req) + if err != nil { + return nil, err + } + if res.StatusCode != http.StatusOK { + bodyBytes, err := ioutil.ReadAll(res.Body) + if err != nil { + log.Fatal(err) + } + bodyString := string(bodyBytes) + defer res.Body.Close() + return nil, fmt.Errorf(bodyString) + } + fmt.Printf("Job %s started succesfully\n", doc.ID) + defer res.Body.Close() + return doc, nil +} + diff --git a/cmd/fuzzit/storage.go b/client/storage.go similarity index 73% rename from cmd/fuzzit/storage.go rename to client/storage.go index be95618..3e5f874 100755 --- a/cmd/fuzzit/storage.go +++ b/client/storage.go @@ -1,4 +1,4 @@ -package main +package client import ( "encoding/json" @@ -12,8 +12,12 @@ import ( var httpClient = &http.Client{Timeout: 120 * time.Second} -func getStorageLink(storagePath string, apiKey string) (string, error) { - r, err := httpClient.Get(fmt.Sprintf("https://app.fuzzit.dev/getStorageLink?path=%s&api_key=%s", storagePath, apiKey)) +type storageLinkResponse struct { + StorageLink string `json:"storage_link"` +} + +func (c * fuzzitClient) getStorageLink(storagePath string) (string, error) { + r, err := httpClient.Get(fmt.Sprintf("https://app.fuzzit.dev/getStorageLink?path=%s&api_key=%s", storagePath, c.ApiKey)) if err != nil { return "", err } @@ -31,14 +35,14 @@ func getStorageLink(storagePath string, apiKey string) (string, error) { return res.StorageLink, nil } -func uploadFile(filePath string, storagePath string, apiKey string, contentType string, filename string) error { +func (c * fuzzitClient) uploadFile(filePath string, storagePath string, contentType string, filename string) error { data, err := os.Open(filePath) if err != nil { return err } defer data.Close() - storageLink, err := getStorageLink(storagePath, apiKey) + storageLink, err := c.getStorageLink(storagePath) if err != nil { return err } diff --git a/client/utils.go b/client/utils.go new file mode 100644 index 0000000..cdd964d --- /dev/null +++ b/client/utils.go @@ -0,0 +1,32 @@ +package client + +import ( + "fmt" + "io" + "os" +) + +func copyFile(src, dst string) (int64, error) { + sourceFileStat, err := os.Stat(src) + if err != nil { + return 0, err + } + + if !sourceFileStat.Mode().IsRegular() { + return 0, fmt.Errorf("%s is not a regular file", src) + } + + source, err := os.Open(src) + if err != nil { + return 0, err + } + defer source.Close() + + destination, err := os.Create(dst) + if err != nil { + return 0, err + } + defer destination.Close() + nBytes, err := io.Copy(destination, source) + return nBytes, err +} \ No newline at end of file diff --git a/cmd/auth.go b/cmd/auth.go new file mode 100644 index 0000000..fda204c --- /dev/null +++ b/cmd/auth.go @@ -0,0 +1,54 @@ +/* +Copyright © 2019 fuzzit.dev, inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package cmd + +import ( + "github.com/fuzzitdev/fuzzit/client" + "github.com/spf13/cobra" + "log" +) + + +// authCmd represents the auth command +var authCmd = &cobra.Command{ + Use: "auth [api_key]", + Short: "Authenticate with fuzzit servers", + Args: cobra.ExactArgs(1), + Run: func(cmd *cobra.Command, args []string) { + log.Println("Authenticating with fuzzit...") + c := client.NewFuzzitClient(args[0]) + err := c.ReAuthenticate(true) + if err != nil { + log.Fatal(err) + } + log.Println("Authenticated successfully") + }, +} + +func init() { + rootCmd.AddCommand(authCmd) + + // Here you will define your flags and configuration settings. + + // Cobra supports Persistent Flags which will work for this command + // and all subcommands, e.g.: + // authCmd.PersistentFlags().String("foo", "", "A help for foo") + + // Cobra supports local flags which will only run when this command + // is called directly, e.g.: + // authCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle") +} diff --git a/cmd/completion.go b/cmd/completion.go new file mode 100644 index 0000000..d90c944 --- /dev/null +++ b/cmd/completion.go @@ -0,0 +1,43 @@ +/* +Copyright © 2019 fuzzit.dev, inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "github.com/spf13/cobra" + "os" +) + +// completionCmd represents the completion command +var completionCmd = &cobra.Command{ + Use: "completion", + Short: "Generates bash completion scripts", + Long: `To load completion run + +. <(fuzzit completion) + +To configure your bash shell to load completions for each session add to your bashrc + +# ~/.bashrc or ~/.profile +. <(fuzzit completion) +`, + Run: func(cmd *cobra.Command, args []string) { + rootCmd.GenBashCompletion(os.Stdout); + }, +} + +func init() { + rootCmd.AddCommand(completionCmd) +} diff --git a/cmd/create.go b/cmd/create.go new file mode 100644 index 0000000..46329f3 --- /dev/null +++ b/cmd/create.go @@ -0,0 +1,30 @@ +/* +Copyright © 2019 fuzzit.dev, inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "github.com/spf13/cobra" +) + +// createCmd represents the create command +var createCmd = &cobra.Command{ + Use: "create", + Short: "Create a new Target or a Job", +} + +func init() { + rootCmd.AddCommand(createCmd) +} diff --git a/cmd/fuzzit/commands.go b/cmd/fuzzit/commands.go deleted file mode 100755 index 72f947c..0000000 --- a/cmd/fuzzit/commands.go +++ /dev/null @@ -1,315 +0,0 @@ -package main - -import ( - "bytes" - "cloud.google.com/go/firestore" - "context" - "encoding/json" - "fmt" - "github.com/google/uuid" - "github.com/mholt/archiver" - "golang.org/x/oauth2" - "google.golang.org/api/iterator" - "google.golang.org/api/option" - "io" - "io/ioutil" - "log" - "net/http" - "os" - "strings" - "time" -) - -type Target struct { - TargetName string `firestore:"target_name"` -} - -type Job struct { - Completed uint16 `firestore:"completed"` - Status string `firestore:"status"` - Args string `firestore:"args"` - Type string `firestore:"type"` - Host string `firestore:"host"` - Revision string `firestore:"revision"` - Branch string `firestore:"branch"` - Parallelism uint16 `firestore:"parallelism"` - Namespace string `firestore:"namespace"` - AsanOptions string `firestore:"asan_options"` - UbsanOptions string `firestore:"ubsan_options"` - StartedAt time.Time `firestore:"started_at,serverTimestamp"` - TargetId string `firestore:"target_id"` - OrgId string `firestore:"org_id"` -} - -type FuzzitCli struct { - Org string - Namespace string - ApiKey string - CustomToken string - Kind string `json:"kind"` - IdToken string `json:"idToken"` - RefreshToken string `json:"refreshToken"` - ExpiresIn string `json:"expiresIn"` - LastRefresh int64 - firestoreClient *firestore.Client `json:"-"` - httpClient *http.Client `json:"-"` -} - -func copy(src, dst string) (int64, error) { - sourceFileStat, err := os.Stat(src) - if err != nil { - return 0, err - } - - if !sourceFileStat.Mode().IsRegular() { - return 0, fmt.Errorf("%s is not a regular file", src) - } - - source, err := os.Open(src) - if err != nil { - return 0, err - } - defer source.Close() - - destination, err := os.Create(dst) - if err != nil { - return 0, err - } - defer destination.Close() - nBytes, err := io.Copy(destination, source) - return nBytes, err -} - -func loadFromFile(configFile string) (*FuzzitCli, error) { - if _, err := os.Stat(configFile); os.IsNotExist(err) { - return nil, fmt.Errorf("please run fuzzit auth ") - } - - file, err := os.Open(configFile) - if err != nil { - return nil, err - } - defer file.Close() - c := &FuzzitCli{} - err = json.NewDecoder(file).Decode(c) - if err != nil { - return nil, err - } - - c.httpClient = &http.Client{Timeout: 60 * time.Second} - - if time.Now().Unix() - c.LastRefresh < 300 || c.LastRefresh == 0 { - r, err := c.httpClient.Get("https://app.fuzzit.dev/createCustomToken?api_key=" + c.ApiKey) - if err != nil { - return nil, err - } - defer r.Body.Close() - if r.StatusCode != 200 { - return nil, fmt.Errorf("API Key is not valid") - } - err = json.NewDecoder(r.Body).Decode(c) - if err != nil { - return nil, err - } - - r, err = c.httpClient.Post("https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyCustomToken?key=AIzaSyCs_Sm1VOKZwJZmTXdOCvs1wyn91vYMNSY", - "application/json", - bytes.NewBuffer([]byte(fmt.Sprintf(`{"token": "%s", "returnSecureToken": true}`, c.CustomToken)))) - if err != nil { - return nil, err - } - defer r.Body.Close() - err = json.NewDecoder(r.Body).Decode(c) - if err != nil { - return nil, err - } - c.LastRefresh = time.Now().Unix() - - cBytes, err := json.MarshalIndent(c, "", "") - if err != nil { - return nil, err - } - err = ioutil.WriteFile(configFile, cBytes, 0644) - if err != nil { - return nil, err - } - } - - token := oauth2.Token{ - AccessToken: c.IdToken, - RefreshToken: c.RefreshToken, - Expiry: time.Time{}, - TokenType: "Bearer", - } - - tokenSource := oauth2.StaticTokenSource(&token) - ctx := context.Background() - c.firestoreClient, err = firestore.NewClient(ctx, "fuzzit-b5fbf", option.WithTokenSource(tokenSource)) - - if err != nil { - return nil, err - } - - return c, nil -} - -func (c * FuzzitCli) getResource(resource string) error{ - ctx := context.Background() - rootColRef := "orgs/" + c.Org + "/" - if (len(strings.Split(resource, "/")) % 2) == 0 { - r := rootColRef + resource - docRef := c.firestoreClient.Doc(rootColRef + resource) - if docRef == nil { - return fmt.Errorf("invalid resource %s", r) - } - docsnap, err := docRef.Get(ctx) - if !docsnap.Exists() { - return fmt.Errorf("resource %s doesn't exist", resource) - } - if err != nil { - return err - } - - jsonString, err := json.MarshalIndent(docsnap.Data(), "", " ") - if err != nil { - return err - } - fmt.Println(string(jsonString)) - return nil - } else { - iter := c.firestoreClient.Collection(rootColRef + resource).Documents(ctx) - querySize := 0 - defer iter.Stop() - - for { - doc, err := iter.Next() - if err == iterator.Done { - break - } - if err != nil { - return err - } - data := doc.Data() - data["id"] = doc.Ref.ID - jsonString, err := json.MarshalIndent(data, "", " ") - if err != nil { - return err - } - fmt.Println(string(jsonString)) - querySize += 1 - } - if querySize == 0 { - return fmt.Errorf("no resources for %s", resource) - } - return nil - } -} - -func (c * FuzzitCli) createTarget(name string, seedPath string) (*firestore.DocumentRef, error) { - ctx := context.Background() - collectionRef := c.firestoreClient.Collection("orgs/" + c.Org + "/targets") - doc, _, err := collectionRef.Add(ctx, - Target{ - TargetName: name, - }) - if err != nil { - return nil, err - } - - if seedPath != "" { - storagePath := fmt.Sprintf("orgs/%s/targets/%s/seed", c.Org, doc.ID) - err := uploadFile(seedPath, storagePath, c.ApiKey, "application/gzip", "seed.tar.gz") - if err != nil { - return nil, err - } - } - return doc, nil -} - -func (c * FuzzitCli) createJob(targetId string, jobType string, host string, - args string, asan_options string, ubsan_options string, - revision string, branch string, cpus uint16, files [] string) (*firestore.DocumentRef, error) { - ctx := context.Background() - collectionRef := c.firestoreClient.Collection("orgs/" + c.Org + "/targets/" + targetId + "/jobs") - doc, _, err := collectionRef.Add(ctx, - Job{ - Completed: 0, - Status: "in progress", - Host: host, - Args: args, - AsanOptions: asan_options, - UbsanOptions: ubsan_options, - Type: jobType, - Revision: revision, - Branch: branch, - Parallelism: cpus, - OrgId: c.Org, - TargetId: targetId, - Namespace: c.Namespace, - }) - if err != nil { - return nil, err - } - fmt.Println("Created new job ", doc.ID) - - fuzzerPath := files[0] - splits := strings.Split(fuzzerPath, "/") - filename := splits[len(splits) - 1] - if !strings.HasSuffix(filename, ".tar.gz") { - tmpDir, err := ioutil.TempDir("", "fuzzit") - if err != nil { - return nil, err - } - _, err = copy(fuzzerPath, tmpDir+"/fuzzer") - if err != nil { - return nil, err - } - - prefix, err := uuid.NewRandom() - if err != nil { - return nil, err - } - filesToArchive := append([]string{tmpDir + "/fuzzer"}, files[1:]...) - - tmpfile := os.TempDir() + "/" + prefix.String() + ".tar.gz" - z := archiver.NewTarGz() - err = z.Archive(filesToArchive, tmpfile) - if err != nil { - return nil, err - } - fuzzerPath = tmpfile - } - - storagePath := fmt.Sprintf("orgs/%s/targets/%s/jobs/%s/fuzzer", c.Org, targetId, doc.ID) - err = uploadFile(fuzzerPath, storagePath, c.ApiKey, "application/gzip", "fuzzer.tar.gz") - if err != nil { - return nil, err - } - - jsonStr := []byte(fmt.Sprintf(`{"data": {"org_id": "%s", "target_id": "%s", "job_id": "%s"}}`, c.Org, targetId, doc.ID)) - req, err := http.NewRequest("POST", - "https://us-central1-fuzzit-b5fbf.cloudfunctions.net/startJob", - bytes.NewBuffer(jsonStr)) - if err != nil { - return nil, err - } - req.Header.Set("Authorization", "Bearer " + c.IdToken) - req.Header.Set("Content-Type", "application/json") - - res, err := httpClient.Do(req) - if err != nil { - return nil, err - } - if res.StatusCode != http.StatusOK { - bodyBytes, err := ioutil.ReadAll(res.Body) - if err != nil { - log.Fatal(err) - } - bodyString := string(bodyBytes) - defer res.Body.Close() - return nil, fmt.Errorf(bodyString) - } - fmt.Printf("Job %s started succesfully\n", doc.ID) - defer res.Body.Close() - return doc, nil -} diff --git a/cmd/fuzzit/main.go b/cmd/fuzzit/main.go deleted file mode 100755 index 3d7d18b..0000000 --- a/cmd/fuzzit/main.go +++ /dev/null @@ -1,233 +0,0 @@ -package main - -import ( - "encoding/json" - "gopkg.in/urfave/cli.v1" - "io/ioutil" - "log" - "os" - "os/user" - "time" -) -import "fmt" - -var fuzzitCli *FuzzitCli - - -type storageLinkResponse struct { - StorageLink string `json:"storage_link"` -} - - -func loadConfig(c * cli.Context) error { - if len(c.Args()) == 0 { - return nil - } - - command := c.Args().First() - if command == "auth" { - return nil - } - - usr, err := user.Current() - if err != nil { - return err - } - // reload configuration - fuzzitCli, err = loadFromFile(usr.HomeDir + "/.fuzzit/conf") - if err != nil { - return err - } - - return nil -} - - -func main() { - - app := cli.NewApp() - app.EnableBashCompletion = true - app.Name = "Fuzzit" - app.Usage = "Continuous fuzzing made simple" - app.Version = "1.2.5" - app.Compiled = time.Now() - app.Authors = []cli.Author{ - cli.Author{ - Name: "fuzzit.dev", - Email: "info@fuzzit.dev", - }, - } - app.Copyright = "fuzzit.dev by (c) fuzzit.dev inc" - - app.Before = loadConfig - - app.Commands = []cli.Command{ - { - Name: "auth", - Aliases: []string{"a"}, - Usage: "Authenticate with Fuzzit servers", - ArgsUsage: "[API_KEY]", - Action: func(c *cli.Context) error { - if len(c.Args()) != 1 { - return cli.NewExitError("You must specify an ApiKey (available in the dashboard under settings)", 1) - } - - credsJson, err := json.MarshalIndent(map[string]string{"ApiKey": c.Args().First(), "Org": c.Args().Get(1)}, "", "") - if err != nil { - return err - } - - usr, err := user.Current() - if err != nil { - log.Fatal(err) - } - confDir := usr.HomeDir + "/.fuzzit" - confFile := confDir + "/conf" - - if _, err := os.Stat(confDir); os.IsNotExist(err) { - err = os.Mkdir(confDir, 0700) - if err != nil { - return err - } - } - - err = ioutil.WriteFile(confFile, credsJson, 0644) - if err != nil { - return err - } - // Test Reloading the creds - _, err = loadFromFile(confFile) - if err != nil { - return err - } - - fmt.Println("Authenticated successfully") - - return nil - }, - }, - { - Name: "get", - Aliases: []string{"g"}, - Usage: "Display specific resource", - Action: func(c *cli.Context) error { - if len(c.Args()) == 0 { - return cli.NewExitError("You must specify a resource", 1) - } - err := fuzzitCli.getResource(c.Args().First()) - if err != nil { - return err - } - - return nil - }, - }, - { - Name: "create", - Aliases: []string{"c"}, - Usage: "create a resource", - Subcommands: []cli.Command{ - { - Name: "target", - Usage: "create a new fuzzing target", - ArgsUsage: "[TARGET_NAME]", - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "seed", - Usage: "path to tar.gz seed corpus", - }, - }, - Action: func(c *cli.Context) error { - if len(c.Args()) == 0 { - return cli.NewExitError("You must specify a target name", 1) - } - name := c.Args().First() - docRef, err := fuzzitCli.createTarget(name, c.String("seed")) - if err != nil { - return err - } - fmt.Printf("Created new target: %s successfully with id: %s\n", name, docRef.ID) - return nil - }, - }, - { - Name: "job", - Usage: "create a new fuzzing job", - ArgsUsage: "[TARGET_ID] [FUZZER_PATH] [...additional files that should reside in the same path like shared libraries]", - Flags: []cli.Flag{ - cli.DurationFlag{ - Name: "max_total_time", - Usage: "maximum of seconds to run", - }, - cli.UintFlag{ - Name: "cpus", - Usage: "number of cpus to use (only relevant for fuzzing job)", - Value: 1, - }, - cli.StringFlag{ - Name: "type", - Usage: "choose one from (fuzzing, sanity, merge)", - Value: "fuzzing", - }, - cli.StringFlag{ - Name: "host", - Usage: "choose one from (stretch-llvm9, stretch-llvm8, bionic-llvm7)", - Value: "stretch-llvm9", - }, - cli.StringFlag{ - Name: "revision", - Usage: "optional revision tag", - Value: "", - }, - cli.StringFlag{ - Name: "branch", - Usage: "optional branch tag", - Value: "", - }, - cli.StringFlag{ - Name: "args", - Usage: "additional args to libFuzzer", - Value: "", - }, - cli.StringFlag{ - Name: "asan_options", - Usage: "additional args to ASAN_OPTIONS env variable", - Value: "", - }, - cli.StringFlag{ - Name: "ubsan_options", - Usage: "additional args to UBSAN_OPTIONS env variable", - Value: "", - }, - }, - Action: func(c *cli.Context) error { - if len(c.Args()) < 2 { - return cli.NewExitError("You must specify a target ID and a fuzzer path", 1) - } - - _, err := fuzzitCli.createJob(c.Args().First(), - c.String("type"), - c.String("host"), - c.String("args"), - c.String("asan_options"), - c.String("ubsan_options"), - c.String("revision"), - c.String("branch"), - uint16(c.Uint("cpus")), - c.Args()[1:]) - if err != nil { - return err - } - return nil - }, - }, - }, - }, - } - - err := app.Run(os.Args) - if err != nil { - log.Fatal(err) - } -} - diff --git a/cmd/get.go b/cmd/get.go new file mode 100644 index 0000000..b3ede01 --- /dev/null +++ b/cmd/get.go @@ -0,0 +1,49 @@ +/* +Copyright © 2019 fuzzit.dev, inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "github.com/fuzzitdev/fuzzit/client" + "log" + + "github.com/spf13/cobra" +) + +// getCmd represents the get command +var getCmd = &cobra.Command{ + Use: "get ", + Short: "get information about targets or jobs", + Long: `Example: + ./fuzzit get targets # retrieve all targets + ./fuzzit get targets/ # retrieve specific target + ./fuzzit get targets//jobs # retrieve all jobs for target + ./fuzzit get targets//jobs/ # retrieve specific job`, + Args: cobra.ExactArgs(1), + Run: func(cmd *cobra.Command, args []string) { + c, err := client.LoadFuzzitFromCache() + if err != nil { + log.Fatal(err) + } + err = c.GetResource(args[0]) + if err != nil { + log.Fatal(err) + } + }, +} + +func init() { + rootCmd.AddCommand(getCmd) +} diff --git a/cmd/job.go b/cmd/job.go new file mode 100644 index 0000000..c30c7fe --- /dev/null +++ b/cmd/job.go @@ -0,0 +1,58 @@ +/* +Copyright © 2019 fuzzit.dev, inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "github.com/fuzzitdev/fuzzit/client" + "log" + + "github.com/spf13/cobra" +) + +// jobCmd represents the job command + +var newJob = client.Job{} + +var jobCmd = &cobra.Command{ + Use: "job [target_id] [files...]", + Short: "create new fuzzing job", + Args: cobra.MinimumNArgs(2), + Run: func(cmd *cobra.Command, args []string) { + log.Println("Creating job...") + c, err := client.LoadFuzzitFromCache() + if err != nil { + log.Fatal(err) + } + newJob.TargetId = args[0] + _, err = c.CreateJob(newJob, args[1:]) + if err != nil { + log.Fatal(err) + } + log.Printf("Job created successfully") + }, +} + +func init() { + createCmd.AddCommand(jobCmd) + + jobCmd.Flags().StringVar(&newJob.Type, "type", "fuzzing", "fuzzing/sanity") + jobCmd.Flags().Uint16Var(&newJob.Parallelism, "cpus", 1, "number of cpus to use (only relevant for fuzzing job)") + jobCmd.Flags().StringVar(&newJob.Revision, "revision", "", "Revision tag of fuzzer") + jobCmd.Flags().StringVar(&newJob.Branch, "branch", "", "Branch of the fuzzer") + jobCmd.Flags().StringVar(&newJob.AsanOptions, "asan_options", "", "Additional args to ASAN_OPTIONS env VARIABLE") + jobCmd.Flags().StringVar(&newJob.UbsanOptions, "ubsan_options", "", "Additional args to UBSAN_OPTIONS env VARIABLE") + jobCmd.Flags().StringVar(&newJob.Args, "args", "", "Additional runtime args for the fuzzer") +} diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 0000000..387803a --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,51 @@ +/* +Copyright © 2019 fuzzit.dev, inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "fmt" + "github.com/spf13/cobra" + "os" +) + + +var cfgFile string + + +var rootCmd = &cobra.Command{ + Use: "Fuzzit", + Short: "Continuous fuzzing made simple CLI", + Version: "2.0.0", +} + +func Execute() { + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} + +func init() { + cobra.OnInitialize(initConfig) + +} + + +// initConfig reads in config file and ENV variables if set. +func initConfig() { + +} + diff --git a/cmd/target.go b/cmd/target.go new file mode 100644 index 0000000..f0ccbad --- /dev/null +++ b/cmd/target.go @@ -0,0 +1,55 @@ +/* +Copyright © 2019 fuzzit.dev, inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package cmd + +import ( + "github.com/fuzzitdev/fuzzit/client" + "log" + + "github.com/spf13/cobra" +) + +// targetCmd represents the target command +var targetCmd = &cobra.Command{ + Use: "target [target_name]", + Short: "Create new fuzzing target", + Args: cobra.ExactArgs(1), + Run: func(cmd *cobra.Command, args []string) { + log.Println("Creating target...") + c, err := client.LoadFuzzitFromCache() + if err != nil { + log.Fatal(err) + } + newTarget := client.Target{ + Name: args[0], + } + seed, err := cmd.Flags().GetString("seed") + if err != nil { + log.Fatal(err) + } + docRef, err := c.CreateTarget(newTarget, seed) + if err != nil { + log.Fatal(err) + } + log.Printf("Created new target: %s successfully with id: %s\n", args[0], docRef.ID) + }, +} + +func init() { + createCmd.AddCommand(targetCmd) + + targetCmd.Flags().String("seed", "", "path to .tar.gz seed corpus") +} diff --git a/go.mod b/go.mod index d3792f9..2581dfe 100644 --- a/go.mod +++ b/go.mod @@ -3,13 +3,16 @@ module github.com/fuzzitdev/fuzzit go 1.12 require ( - cloud.google.com/go v0.40.0 + cloud.google.com/go v0.43.0 github.com/dsnet/compress v0.0.1 // indirect github.com/golang/snappy v0.0.1 // indirect github.com/google/uuid v1.1.1 github.com/mholt/archiver v3.1.1+incompatible + github.com/mitchellh/go-homedir v1.1.0 github.com/nwaples/rardecode v1.0.0 // indirect - github.com/pierrec/lz4 v2.0.5+incompatible // indirect + github.com/pierrec/lz4 v2.2.5+incompatible // indirect + github.com/spf13/cobra v0.0.5 + github.com/spf13/viper v1.4.0 github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 google.golang.org/api v0.7.0 diff --git a/go.sum b/go.sum index bc20229..529f19b 100644 --- a/go.sum +++ b/go.sum @@ -1,62 +1,177 @@ cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= -cloud.google.com/go v0.40.0 h1:FjSY7bOj+WzJe6TZRVtXI2b9kAYvtNg4lMbcH2+MUkk= -cloud.google.com/go v0.40.0/go.mod h1:Tk58MuI9rbLMKlAjeO/bDnteAx7tX2gJIXw4T5Jwlro= +cloud.google.com/go v0.43.0 h1:banaiRPAM8kUVYneOSkhgcDsLzEvL25FinuiSZaH/2w= +cloud.google.com/go v0.43.0/go.mod h1:BOSR3VbTLkk6FDC/TcffxP4NF/FFBGA5ku+jvKOP7pg= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= +github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= +github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= +github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= +github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= +github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= +github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= +github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= +github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= +github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= +github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= +github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk= +github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= +github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= +github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= +github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= github.com/dsnet/compress v0.0.1 h1:PlZu0n3Tuv04TzpfPbrnI0HW/YwodEXDS+oPKahKF0Q= github.com/dsnet/compress v0.0.1/go.mod h1:Aw8dCMJ7RioblQeTqt88akK31OvO8Dhf5JflhBbQEHo= github.com/dsnet/golib v0.0.0-20171103203638-1ea166775780/go.mod h1:Lj+Z9rebOhdfkVLjJ8T6VcRQv3SXugXy999NBtR9aFY= +github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= +github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= +github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= +github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= +github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= +github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= +github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= +github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= -github.com/golang/protobuf v1.3.1 h1:YF8+flBXS5eO826T4nzqPrxfhQThhXl0YzfuUPu4SBg= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.2 h1:6nsPYzhq5kReh6QImI3k5qWzO4PEbvbIW2cwSfR/6xs= +github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4= github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/googleapis/gax-go/v2 v2.0.4 h1:hU4mGcQI4DaAYW+IbTun+2qEZVFxK0ySjQLTbS0VQKc= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= +github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= +github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= +github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= +github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= +github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= +github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= +github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= +github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= +github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= +github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= +github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= +github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= +github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= +github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= +github.com/magiconair/properties v1.8.0 h1:LLgXmsheXeRoUOBOjtwPQCWIYqM/LU1ayDtDePerRcY= +github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= +github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU= github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU= +github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= +github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= +github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= +github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= +github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nwaples/rardecode v1.0.0 h1:r7vGuS5akxOnR4JQSkko62RJ1ReCMXxQRPtxsiFMBOs= github.com/nwaples/rardecode v1.0.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= -github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= -github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= +github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= +github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= +github.com/pierrec/lz4 v2.2.5+incompatible h1:xOYu2+sKj87pJz7V+I7260354UlcRyAZUGhMCToTzVw= +github.com/pierrec/lz4 v2.2.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY= +github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= +github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= +github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= +github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= +github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= +github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= +github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= +github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= +github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= +github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= +github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= +github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= +github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= +github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= +github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= +github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= +github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cobra v0.0.5 h1:f0B+LkLX6DtmRH1isoNA9VTtNUK9K8xYd28JNNfOv/s= +github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU= +github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= +github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= +github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= +github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= +github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s= +github.com/spf13/viper v1.4.0 h1:yXHLWeravcrgGyFSyCgdYpXQ9dR9c/WED3pg1RhxqEU= +github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= +github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= +github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= +github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0= github.com/ulikunitz/xz v0.5.6 h1:jGHAfXawEGZQ3blwU5wnWKQJvAraT7Ftq9EXjnXYgt8= github.com/ulikunitz/xz v0.5.6/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 h1:nIPpBwaJSVYIxUFsDv3M8ofmx9yWTog9BfvIu0q41lo= github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8/go.mod h1:HUYIGzjTL3rfEspMxjDjgmT5uz5wzYJKVo23qUhYTos= -go.opencensus.io v0.21.0 h1:mU6zScU4U1YAFPHEHYk+3JC4SY7JxgkqS10ZOSyksNg= +github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= +github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= +go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0 h1:C9hSCOW830chIVkdja34wa6Ky+IzWllkUinR+BtRZd4= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= +go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= +go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c h1:uOCk1iQW6Vc18bnC13MfzScl+wdKBmM9Y9kU7Z83/lw= +golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859 h1:R/3boaszxrf1GEUWTVDzSKVwLmSJpwZ1yqXm8j0v2QI= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45 h1:SVwTIAaPC2U/AvvLNZ2a7OVsmBpC8L5BlwK1whH3hm0= @@ -67,38 +182,64 @@ golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b h1:ag/x1USPSsqHud38I9BAC88qdNLDHHtQ4mlgQIZPPNA= +golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0 h1:HyfiK1WMnHj5FXFXatD+Qs1A/xC2Run6RzeW1SyHxpc= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= -google.golang.org/api v0.6.0/go.mod h1:btoxGiFvQNVUZQ8W08zLtrVS08CNpINPEfxXxgJL1Q4= google.golang.org/api v0.7.0 h1:9sdfJOzWlkqPltHAuzT2Cp+yrBeY1KRVYgms8soxMwM= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101 h1:wuGevabY6r+ivPNagjUXGGxF+GqgMd+dBhjsxW4q9u4= -google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610 h1:Ygq9/SRJX9+dU0WCIICM8RkWvDw03lvB77hrhJnpxfU= +google.golang.org/genproto v0.0.0-20190716160619-c506a9f90610/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= -google.golang.org/grpc v1.20.1 h1:Hz2g2wirWK7H0qIIhGIqRGTuMwTE8HEKFnDZZ7lm9NU= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= +google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +google.golang.org/grpc v1.21.1 h1:j6XxA85m/6txkUCHvzlV5f+HBNl/1r5cZ2A/3IEFOO8= +google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= +gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/urfave/cli.v1 v1.20.0 h1:NdAVW6RYxDif9DhDHaAortIu956m2c0v+09AZBPTbE0= gopkg.in/urfave/cli.v1 v1.20.0/go.mod h1:vuBzUtMdQeixQj8LVd+/98pzhxNGQoyuPBlsXHOQNO0= +gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= +gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= +gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= diff --git a/main.go b/main.go new file mode 100644 index 0000000..b105637 --- /dev/null +++ b/main.go @@ -0,0 +1,22 @@ +/* +Copyright © 2019 NAME HERE + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ +package main + +import "github.com/fuzzitdev/fuzzit/cmd" + +func main() { + cmd.Execute() +}