├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── bin ├── cmd │ ├── autoheal.go │ ├── heal.go │ ├── healthcheck.go │ ├── root.go │ ├── scan.go │ ├── server.go │ └── suggest.go ├── docktor ├── main.go └── server │ ├── server.go │ └── server_test.go ├── codecov.yml ├── cov.sh ├── coverage.out ├── fmt.sh ├── go.mod ├── go.sum ├── lib ├── autoheal │ ├── autoheal.go │ └── autoheal_test.go ├── heal │ ├── heal.go │ └── heal_test.go ├── healthcheck │ ├── healcheck_test.go │ └── healthcheck.go ├── scan │ ├── scan.go │ └── scan_test.go └── suggestions │ ├── structs.go │ ├── suggestions.go │ └── suggestions_test.go ├── profile.cov ├── testdata ├── Dockerfile ├── repo.txt └── repo2.txt └── tools ├── .gitignore └── test.py /.gitignore: -------------------------------------------------------------------------------- 1 | tools/env -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | langauge: go 2 | 3 | go: 4 | - 1.15 5 | 6 | os: linux 7 | 8 | services: 9 | - docker 10 | 11 | before_install: 12 | - docker run -p 80:80 -d --name ng nginx 13 | 14 | scripts: 15 | - make test-all 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Nish Gowda 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | GO_LIB_PATH = github.com/nishgowda/docktor/lib 2 | GO_BIN_PATH=github.com/nishgowda/docktor/bin 3 | # tests and builds executable 4 | all: test-all build 5 | 6 | # runs fmt on all non fmt formatted go files 7 | # builds executable in bin directory 8 | build: 9 | - ./fmt.sh 10 | - go build -o bin/docktor bin/main.go 11 | 12 | # performs all tests on docktor library functions 13 | test-all: test_healthcheck test_autoheal test_heal test_suggestions \ 14 | test_scan test-server 15 | test-server: 16 | - go test $(GO_BIN_PATH)/server 17 | 18 | test-coverage: 19 | - ./cov.sh 20 | 21 | test_healthcheck: 22 | - go test $(GO_LIB_PATH)/healthcheck 23 | 24 | test_autoheal: 25 | - go test $(GO_LIB_PATH)/autoheal 26 | 27 | test_heal: 28 | - go test $(GO_LIB_PATH)/heal 29 | 30 | test_suggestions: 31 | - go test $(GO_LIB_PATH)/suggestions 32 | 33 | test_scan: 34 | - go test $(GO_LIB_PATH)/scan 35 | 36 | clean: 37 | rm -f bin/docktor 38 | 39 | 40 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # docktor 2 | 3 | [![Build Status](https://travis-ci.com/nishgowda/docktor.svg?branch=master)](https://travis-ci.com/nishgowda/docktor) 4 | [![Go Report Card](https://goreportcard.com/badge/github.com/nishgowda/docktor)](https://goreportcard.com/report/github.com/nishgowda/docktor) 5 | [![codecov](https://codecov.io/gh/nishgowda/docktor/branch/master/graph/badge.svg?token=G4GHPU44W9)](https://codecov.io/gh/nishgowda/docktor) 6 | 7 | docktor is a security tool that allows you to secure and implement reliable healthchecks on running Docker containers. 8 | 9 | Some highlights of docktor: 10 | - Creates automatic healthchecks for running containers 11 | - Implements automated healing for unhealthy running containers 12 | - Adds manual healing as well 13 | - Suggests security improvements in a given Dockerfile 14 | - Scans Docker images for vulnerabilites and generate reports to files 15 | 16 | ## Building docktor 17 | If you would like to run the project locally clone the repo. 18 | 19 | After installation, building the docktor binary can be done with the following command (this will create the binary in the existing bin folder) 20 | ``` 21 | make build 22 | ``` 23 | 24 | However you can also install binary from this git repo 25 | ``` 26 | go get github.com/nishgowda/docktor/bin/docktor 27 | ``` 28 | 29 | ## Command Line 30 | You can run the features of docktor in the command line by running the executable 31 | ### Usage 32 | ``` 33 | # run healthcheck on nginx container 34 | ./docktor healtheck --c nginx 35 | 36 | # heal an unhealthy container named ng 37 | ./docktor heal --c ng 38 | 39 | # apply autoheal to container ng 40 | ./doctkor autoheal --c ng 41 | 42 | # scan for vulnerabilites in nginx container and write output to file location 43 | ./doctkor scan --i nginx --f data/ouptut.txt 44 | 45 | # suggest improvemets for dockerfile 46 | ./docktor suggest --f Dockerfile 47 | ``` 48 | **NOTE:** You must enable [Snyk](https://snyk.io/blog/snyk-docker-secure-containerized-applications/) to use the scan feature. 49 | 50 | ## API 51 | You can also start the server and make requests to perform docktor functions. 52 | - GET /hcheck?containers= 53 | - GET /heal?containers= 54 | - GET /aheal?containers= 55 | - GET /scan?image=foo&file=bar 56 | - GET /suggest?file= 57 | 58 | ### Usage 59 | ``` 60 | # start the server default port is 3001 61 | ./docktor server --p 3001 62 | 63 | # If you dont specify the container it will perform functions on all running containers 64 | curl --request GET 'http://localhost:3001/hcheck?containers=nginx' 65 | 66 | curl --request GET 'http://localhost:3001/heal?containers=ngninx' 67 | 68 | curl --request GET 'http://localhost:3001/aheal?containers=ng' 69 | 70 | # must specify the docker image 71 | curl --request GET 'http://localhost:3001/scan?image=nginx' 72 | 73 | # must specify the location of the docker file 74 | curl --request GET 'http://localhost:3001/suggest?file=Dockerfile 75 | ``` 76 | 77 | ## Contributing 78 | Any contributions are welcome, you're welcome to add an issue or just clone this repo and submit a PR to this branch. 79 | -------------------------------------------------------------------------------- /bin/cmd/autoheal.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/nishgowda/docktor/lib/autoheal" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func init() { 11 | rootCmd.AddCommand(autoHealCmd) 12 | } 13 | 14 | var autoHealCmd = &cobra.Command{ 15 | Use: "autoheal", 16 | Short: "Add automatic healing to containers", 17 | Run: func(cmd *cobra.Command, args []string) { 18 | msg, err := autoheal.AutoHeal(containers) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | log.Println(msg) 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /bin/cmd/heal.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "github.com/nishgowda/docktor/lib/heal" 5 | "github.com/spf13/cobra" 6 | "log" 7 | ) 8 | 9 | func init() { 10 | rootCmd.AddCommand(healCmd) 11 | } 12 | 13 | var healCmd = &cobra.Command{ 14 | Use: "heal", 15 | Short: "Heal unhealthy containers", 16 | Run: func(cmd *cobra.Command, args []string) { 17 | msg, err := heal.ContainerHeal(containers) 18 | if err != nil { 19 | log.Fatal(err) 20 | } 21 | log.Println(msg) 22 | }, 23 | } 24 | -------------------------------------------------------------------------------- /bin/cmd/healthcheck.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/nishgowda/docktor/lib/healthcheck" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func init() { 11 | rootCmd.AddCommand(healthCheckCmd) 12 | } 13 | 14 | var healthCheckCmd = &cobra.Command{ 15 | Use: "healthcheck", 16 | Short: "Attach health checks on containers", 17 | Run: func(cmd *cobra.Command, args []string) { 18 | msg, err := healthcheck.PerformHealthCheck(containers) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | if len(msg) < 1 { 23 | log.Fatal("No running containers detected") 24 | } 25 | log.Println(msg) 26 | }, 27 | } 28 | -------------------------------------------------------------------------------- /bin/cmd/root.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "fmt" 5 | 6 | homedir "github.com/mitchellh/go-homedir" 7 | "github.com/spf13/cobra" 8 | "github.com/spf13/viper" 9 | ) 10 | 11 | var ( 12 | cfgFile string 13 | userLicense string 14 | containers []string 15 | image string 16 | file string 17 | port string 18 | rootCmd = &cobra.Command{ 19 | Use: "docktor", 20 | Short: "A doctor for Docker containers", 21 | } 22 | ) 23 | 24 | // Execute rootCmd 25 | func Execute() error { 26 | return rootCmd.Execute() 27 | } 28 | 29 | func init() { 30 | cobra.OnInitialize(initConfig) 31 | 32 | rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)") 33 | rootCmd.PersistentFlags().StringP("author", "a", "Nish Gowda", "") 34 | rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "MIT") 35 | rootCmd.PersistentFlags().Bool("viper", true, "use Viper for configuration") 36 | viper.BindPFlag("author", rootCmd.PersistentFlags().Lookup("author")) 37 | viper.BindPFlag("useViper", rootCmd.PersistentFlags().Lookup("viper")) 38 | viper.SetDefault("author", "Nish Gowda nish.gowda6@gmail.com") 39 | viper.SetDefault("license", "MIT") 40 | var dummy = []string{""} 41 | healthCheckCmd.Flags().StringSliceVar(&containers, "c", dummy, "Specify container ids") 42 | healCmd.Flags().StringSliceVar(&containers, "c", dummy, "Specify container ids") 43 | autoHealCmd.Flags().StringSliceVar(&containers, "c", dummy, "Specify container ids") 44 | suggestCmd.Flags().StringVar(&file, "f", "", "Specify a Docker file") 45 | scanCmd.Flags().StringVar(&image, "i", "", "Specify docker image") 46 | scanCmd.Flags().StringVar(&file, "f", "", "Specify file to output vulnerability report") 47 | serverCmd.Flags().StringVar(&port, "p", "3001", "Specify port number") 48 | } 49 | 50 | func initConfig() { 51 | if cfgFile != "" { 52 | viper.SetConfigFile(cfgFile) 53 | } else { 54 | home, err := homedir.Dir() 55 | if err != nil { 56 | panic(err) 57 | } 58 | viper.AddConfigPath(home) 59 | viper.SetConfigFile(".cobra") 60 | } 61 | viper.AutomaticEnv() 62 | if err := viper.ReadInConfig(); err == nil { 63 | fmt.Println("Using config file: ", viper.ConfigFileUsed()) 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /bin/cmd/scan.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/nishgowda/docktor/lib/scan" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func init() { 11 | rootCmd.AddCommand(scanCmd) 12 | } 13 | 14 | var scanCmd = &cobra.Command{ 15 | Use: "scan", 16 | Short: "Scan images for vulnerabilities", 17 | Run: func(cmd *cobra.Command, args []string) { 18 | out, err := scan.Vulnerabilities(image) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | if len(file) > 1 { 23 | scan.WriteFile(out, file) 24 | } else { 25 | log.Println("Success") 26 | } 27 | }, 28 | } 29 | -------------------------------------------------------------------------------- /bin/cmd/server.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/nishgowda/docktor/bin/server" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func init() { 11 | rootCmd.AddCommand(serverCmd) 12 | } 13 | 14 | var serverCmd = &cobra.Command{ 15 | Use: "server", 16 | Short: "Start docktor sever", 17 | Run: func(cmd *cobra.Command, args []string) { 18 | log.Println("Running on localhost:" + port) 19 | server.Start(port) 20 | }, 21 | } 22 | -------------------------------------------------------------------------------- /bin/cmd/suggest.go: -------------------------------------------------------------------------------- 1 | package cmd 2 | 3 | import ( 4 | "log" 5 | 6 | "github.com/nishgowda/docktor/lib/suggestions" 7 | "github.com/spf13/cobra" 8 | ) 9 | 10 | func init() { 11 | rootCmd.AddCommand(suggestCmd) 12 | } 13 | 14 | var suggestCmd = &cobra.Command{ 15 | Use: "suggest", 16 | Short: "Suggest possible improvements to be made in a Dockerfile", 17 | Run: func(cmd *cobra.Command, args []string) { 18 | msg, err := suggestions.ReadImage(file) 19 | if err != nil { 20 | log.Fatal(err) 21 | } 22 | log.Println(msg) 23 | }, 24 | } 25 | -------------------------------------------------------------------------------- /bin/docktor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nishgowda/docktor/5fe59a8af307204b38f85080281468db1b595f51/bin/docktor -------------------------------------------------------------------------------- /bin/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "github.com/nishgowda/docktor/bin/cmd" 5 | ) 6 | 7 | func main() { 8 | cmd.Execute() 9 | } 10 | -------------------------------------------------------------------------------- /bin/server/server.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "encoding/json" 5 | "fmt" 6 | "log" 7 | "net/http" 8 | 9 | "github.com/nishgowda/docktor/lib/autoheal" 10 | "github.com/nishgowda/docktor/lib/heal" 11 | "github.com/nishgowda/docktor/lib/healthcheck" 12 | "github.com/nishgowda/docktor/lib/scan" 13 | "github.com/nishgowda/docktor/lib/suggestions" 14 | ) 15 | 16 | func hcheck(w http.ResponseWriter, req *http.Request) { 17 | containers := req.URL.Query().Get("containers") 18 | c := []string{containers} 19 | msg, err := healthcheck.PerformHealthCheck(c) 20 | if err != nil { 21 | log.Fatal(err) 22 | } 23 | data, err := json.Marshal(msg) 24 | if err != nil { 25 | log.Fatal(err) 26 | } 27 | w.Header().Set("Content-Type", "application/json") 28 | w.Write(data) 29 | } 30 | 31 | func aheal(w http.ResponseWriter, req *http.Request) { 32 | containers := req.URL.Query().Get("containers") 33 | c := []string{containers} 34 | msg, err := autoheal.AutoHeal(c) 35 | if err != nil { 36 | log.Fatal(err) 37 | } 38 | data, err := json.Marshal(msg) 39 | if err != nil { 40 | log.Fatal(err) 41 | } 42 | w.Header().Set("Content-Type", "application/json") 43 | w.Write(data) 44 | } 45 | 46 | func hheal(w http.ResponseWriter, req *http.Request) { 47 | containers := req.URL.Query().Get("containers") 48 | c := []string{containers} 49 | msg, err := heal.ContainerHeal(c) 50 | if err != nil { 51 | log.Fatal(err) 52 | } 53 | data, err := json.Marshal(msg) 54 | if err != nil { 55 | log.Fatal(err) 56 | } 57 | w.Header().Set("Content-Type", "application/json") 58 | w.Write(data) 59 | } 60 | 61 | func hscan(w http.ResponseWriter, req *http.Request) { 62 | image := req.URL.Query().Get("image") 63 | file := req.URL.Query().Get("file") 64 | fmt.Println("PARAMS", image, file) 65 | if len(image) < 1 { 66 | fmt.Fprint(w, "No file specified") 67 | } 68 | out, err := scan.Vulnerabilities(image) 69 | if err != nil { 70 | log.Fatal(err) 71 | } 72 | if len(file) > 1 { 73 | scan.WriteFile(out, file) 74 | out = "Succesfully wrote scan to " + file 75 | } 76 | data, err := json.Marshal(out) 77 | w.Header().Set("Content-Type", "application/json") 78 | w.Write(data) 79 | } 80 | 81 | func hsuggest(w http.ResponseWriter, req *http.Request) { 82 | file, ok := req.URL.Query()["file"] 83 | if !ok || len(file[0]) < 1 { 84 | fmt.Fprint(w, "No file specified") 85 | } 86 | msg, err := suggestions.ReadImage(file[0]) 87 | if err != nil { 88 | log.Fatal(err) 89 | } 90 | data, err := json.Marshal(msg) 91 | w.Header().Set("Content-Type", "application/json") 92 | w.Write(data) 93 | } 94 | 95 | // Start the http server given a port 96 | func Start(port string) { 97 | http.HandleFunc("/aheal", aheal) 98 | http.HandleFunc("/hcheck", hcheck) 99 | http.HandleFunc("/heal", hheal) 100 | http.HandleFunc("/scan", hscan) 101 | http.HandleFunc("/suggest", hsuggest) 102 | http.ListenAndServe(":"+port, nil) 103 | } 104 | -------------------------------------------------------------------------------- /bin/server/server_test.go: -------------------------------------------------------------------------------- 1 | package server 2 | 3 | import ( 4 | "encoding/json" 5 | "net/http" 6 | "net/http/httptest" 7 | "strings" 8 | "testing" 9 | ) 10 | 11 | func TestHcheck(t *testing.T) { 12 | req, err := http.NewRequest("GET", "/hcheck", nil) 13 | if err != nil { 14 | t.Fatal(err) 15 | } 16 | rr := httptest.NewRecorder() 17 | handler := http.HandlerFunc(hcheck) 18 | handler.ServeHTTP(rr, req) 19 | status := rr.Code 20 | if status != http.StatusOK { 21 | t.Errorf("Handler returned wrong status code: got %v want %v", status, http.StatusOK) 22 | } 23 | expected, err := json.Marshal("Successfully added health checks to the following container: ") 24 | if err != nil { 25 | t.Fatal(err) 26 | } 27 | if strings.Contains(string(expected), rr.Body.String()) { 28 | t.Errorf("Handler returned unexpected body: got %v want %v", rr.Body.String(), string(expected)) 29 | } 30 | } 31 | 32 | // name the container ng when testing this 33 | func TestAheal(t *testing.T) { 34 | req, err := http.NewRequest("GET", "/aheal?containers=ng", nil) 35 | if err != nil { 36 | t.Fatal(err) 37 | } 38 | rr := httptest.NewRecorder() 39 | handler := http.HandlerFunc(aheal) 40 | handler.ServeHTTP(rr, req) 41 | status := rr.Code 42 | if status != http.StatusOK { 43 | t.Errorf("Handler returned wrong status code: got %v want %v", status, http.StatusOK) 44 | } 45 | expected, err := json.Marshal("Successfully added auto heals to the following container: ") 46 | if err != nil { 47 | t.Fatal(err) 48 | } 49 | if strings.Contains(string(expected), rr.Body.String()) { 50 | t.Errorf("Handler returned unexpected body: got %v want %v", rr.Body.String(), string(expected)) 51 | } 52 | } 53 | 54 | func TestHeal(t *testing.T) { 55 | req, err := http.NewRequest("GET", "/heal?containers=ng", nil) 56 | if err != nil { 57 | t.Fatal(err) 58 | } 59 | rr := httptest.NewRecorder() 60 | handler := http.HandlerFunc(hheal) 61 | handler.ServeHTTP(rr, req) 62 | status := rr.Code 63 | if status != http.StatusOK { 64 | t.Errorf("Handler returned wrong status code: got %v want %v", status, http.StatusOK) 65 | } 66 | expected, err := json.Marshal("Restarted container: ") 67 | if err != nil { 68 | t.Fatal(err) 69 | } 70 | if strings.Contains(string(expected), rr.Body.String()) { 71 | t.Errorf("Handler returned unexpected body: got %v want %v", rr.Body.String(), string(expected)) 72 | } 73 | } 74 | 75 | func TestScan(t *testing.T) { 76 | req, err := http.NewRequest("GET", "/scan?image=nginx", nil) 77 | if err != nil { 78 | t.Fatal(err) 79 | } 80 | rr := httptest.NewRecorder() 81 | handler := http.HandlerFunc(hscan) 82 | handler.ServeHTTP(rr, req) 83 | status := rr.Code 84 | if status != http.StatusOK { 85 | t.Errorf("Handler returned wrong status code: got %v want %v", status, http.StatusOK) 86 | } 87 | expected, err := json.Marshal("Successfully wrote vulnerability report to ") 88 | if err != nil { 89 | t.Fatal(err) 90 | } 91 | if strings.Contains(string(expected), rr.Body.String()) { 92 | t.Errorf("Handler returned unexpected body: got %v want %v", rr.Body.String(), string(expected)) 93 | } 94 | } 95 | 96 | func TestSuggest(t *testing.T) { 97 | req, err := http.NewRequest("GET", "/suggest?file=/Users/nishgowda/Desktop/Code/Projects/docktor/testdata/Dockerfile", nil) 98 | if err != nil { 99 | t.Fatal(err) 100 | } 101 | rr := httptest.NewRecorder() 102 | handler := http.HandlerFunc(hsuggest) 103 | handler.ServeHTTP(rr, req) 104 | status := rr.Code 105 | if status != http.StatusOK { 106 | t.Errorf("Handler returned wrong status code: got %v want %v", status, http.StatusOK) 107 | } 108 | expected, err := json.Marshal("Detected no issues with Docker containre") 109 | if err != nil { 110 | t.Fatal(err) 111 | } 112 | if strings.Contains(string(expected), rr.Body.String()) || strings.Compare(string(expected), rr.Body.String()) == 0 { 113 | t.Errorf("Handler returned unexpected body: got %v want %v", rr.Body.String(), string(expected)) 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | token: 272e00ce-48e5-48fa-924f-3a15004f1dfe -------------------------------------------------------------------------------- /cov.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | echo 'mode: count' > profile.cov 5 | 6 | for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d); 7 | do 8 | if ls $dir/*.go &> /dev/null; then 9 | go test -short -covermode=count -coverprofile=$dir/profile.tmp $dir 10 | if [ -f $dir/profile.tmp ] 11 | then 12 | cat $dir/profile.tmp | tail -n +2 >> profile.cov 13 | rm $dir/profile.tmp 14 | fi 15 | fi 16 | done 17 | 18 | go tool cover -func profile.cov -------------------------------------------------------------------------------- /coverage.out: -------------------------------------------------------------------------------- 1 | mode: set 2 | github.com/nishgowda/docktor/lib/scan/scan.go:14.43,17.20 3 1 3 | github.com/nishgowda/docktor/lib/scan/scan.go:21.2,23.16 3 1 4 | github.com/nishgowda/docktor/lib/scan/scan.go:26.2,26.23 1 0 5 | github.com/nishgowda/docktor/lib/scan/scan.go:17.20,20.3 2 0 6 | github.com/nishgowda/docktor/lib/scan/scan.go:23.16,25.3 1 1 7 | github.com/nishgowda/docktor/lib/scan/scan.go:30.52,31.40 1 0 8 | github.com/nishgowda/docktor/lib/scan/scan.go:34.2,35.16 2 0 9 | github.com/nishgowda/docktor/lib/scan/scan.go:38.2,43.12 6 0 10 | github.com/nishgowda/docktor/lib/scan/scan.go:31.40,33.3 1 0 11 | github.com/nishgowda/docktor/lib/scan/scan.go:35.16,37.3 1 0 12 | -------------------------------------------------------------------------------- /fmt.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # run go fmt on all non formatted go files 4 | for i in `find . -name "*.go" -type f`; do 5 | go fmt $i 6 | done -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/nishgowda/docktor 2 | 3 | go 1.15 4 | 5 | require ( 6 | github.com/containerd/containerd v1.4.1 // indirect 7 | github.com/docker/distribution v2.7.1+incompatible 8 | github.com/docker/docker v17.12.0-ce-rc1.0.20201002133048-1a5b7f50bcc0+incompatible 9 | github.com/docker/go-connections v0.4.0 10 | github.com/docker/go-metrics v0.0.1 // indirect 11 | github.com/docker/go-units v0.4.0 // indirect 12 | github.com/mitchellh/go-homedir v1.1.0 13 | github.com/nishgowda/docktor/cmd v0.0.0-20201006145048-cab6251320ee // indirect 14 | github.com/opencontainers/go-digest v1.0.0 // indirect 15 | github.com/opencontainers/image-spec v1.0.1 // indirect 16 | github.com/pkg/errors v0.9.1 // indirect 17 | github.com/spf13/cobra v1.0.0 18 | github.com/spf13/viper v1.7.1 19 | golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c // indirect 20 | google.golang.org/grpc v1.32.0 // indirect 21 | ) 22 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 5 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 6 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 7 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 8 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 9 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 10 | cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= 11 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 12 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 13 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 14 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 15 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 16 | github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= 17 | github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= 18 | github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= 19 | github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= 20 | github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= 21 | github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= 22 | github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 23 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= 24 | github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= 25 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= 26 | github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= 27 | github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= 28 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 29 | github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= 30 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 31 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 32 | github.com/containerd/containerd v1.4.1 h1:pASeJT3R3YyVn+94qEPk0SnU1OQ20Jd/T+SPKy9xehY= 33 | github.com/containerd/containerd v1.4.1/go.mod h1:bC6axHOhabU15QhwfG7w5PipXdVtMXFTttgp+kVtyUA= 34 | github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkEiiKk= 35 | github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= 36 | github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= 37 | github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 38 | github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 39 | github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= 40 | github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= 41 | github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 42 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 43 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 44 | github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= 45 | github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no= 46 | github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BUmsJpcB+cRlLU7cSug= 47 | github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= 48 | github.com/docker/docker v1.13.1 h1:IkZjBSIc8hBjLpqeAbeE5mca5mNgeatLHBy3GO78BWo= 49 | github.com/docker/docker v1.13.1/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= 50 | github.com/docker/docker v17.12.0-ce-rc1.0.20201002133048-1a5b7f50bcc0+incompatible h1:Nm4j3CTCpNOVFf31k9BoyinxYO9CktUBOA7LAK9BDqE= 51 | github.com/docker/docker v17.12.0-ce-rc1.0.20201002133048-1a5b7f50bcc0+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= 52 | github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= 53 | github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= 54 | github.com/docker/go-metrics v0.0.1/go.mod h1:cG1hvH2utMXtqgqqYE9plW6lDxS3/5ayHzueweSI3Vw= 55 | github.com/docker/go-units v0.4.0 h1:3uh0PgVws3nIA0Q+MwDC8yjEPf9zjRfZZWXZYDct3Tw= 56 | github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= 57 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 58 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 59 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 60 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 61 | github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV9I= 62 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= 63 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 64 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 65 | github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= 66 | github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= 67 | github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= 68 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= 69 | github.com/gogo/protobuf v1.1.1 h1:72R+M5VuhED/KujmZVcIquuo8mBgX4oVda//DQb3PXo= 70 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= 71 | github.com/gogo/protobuf v1.2.1 h1:/s5zKNz0uPFCZ5hddgPdo2TK2TVrUNMn0OOX8/aZMTE= 72 | github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= 73 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 74 | github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 75 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 76 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 77 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 78 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 79 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 80 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 81 | github.com/golang/protobuf v1.3.3 h1:gyjaxf+svBWX08ZjK86iN9geUJF0H6gp2IRKX6Nf6/I= 82 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 83 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 84 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 85 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 86 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 87 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 88 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 89 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 90 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 91 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 92 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 93 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 94 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 95 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 96 | github.com/gorilla/websocket v1.4.0/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ= 97 | github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= 98 | github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= 99 | github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= 100 | github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY= 101 | github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= 102 | github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= 103 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 104 | github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= 105 | github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= 106 | github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= 107 | github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= 108 | github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= 109 | github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= 110 | github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= 111 | github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 112 | github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 113 | github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 114 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 115 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 116 | github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= 117 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 118 | github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= 119 | github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= 120 | github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= 121 | github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= 122 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 123 | github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= 124 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= 125 | github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 126 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 127 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 128 | github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= 129 | github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= 130 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 131 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= 132 | github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= 133 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 134 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 135 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 136 | github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= 137 | github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4= 138 | github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= 139 | github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= 140 | github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= 141 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= 142 | github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= 143 | github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= 144 | github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 145 | github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= 146 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 147 | github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= 148 | github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= 149 | github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= 150 | github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 151 | github.com/mitchellh/mapstructure v1.1.2 h1:fmNYVwqnSfB9mZU6OS2O6GsXM+wcskZDuKQzvN1EDeE= 152 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 153 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 154 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 155 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 156 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 157 | github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= 158 | github.com/nishgowda/docktor/cmd v0.0.0-20201006145048-cab6251320ee h1:G2v5ZMMyEFaXBb1MSm24kRHqPTcbR36QpmNb+yfwSIw= 159 | github.com/nishgowda/docktor/cmd v0.0.0-20201006145048-cab6251320ee/go.mod h1:sfVFHdxagBJTMx1U2coGpDjVPbzO1hjGp+S2cMy4vS4= 160 | github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U= 161 | github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= 162 | github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= 163 | github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI= 164 | github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0= 165 | github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 166 | github.com/pelletier/go-toml v1.2.0 h1:T5zMGML61Wp+FlcbWjRDT7yAxhJNAiPPLOFECq181zc= 167 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= 168 | github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 169 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 170 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= 171 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 172 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 173 | github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= 174 | github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= 175 | github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= 176 | github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo= 177 | github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g= 178 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= 179 | github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 180 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 181 | github.com/prometheus/common v0.0.0-20181113130724-41aa239b4cce/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro= 182 | github.com/prometheus/common v0.4.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 183 | github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= 184 | github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc= 185 | github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= 186 | github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 187 | github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= 188 | github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ= 189 | github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= 190 | github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= 191 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 192 | github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 193 | github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= 194 | github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= 195 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 196 | github.com/sirupsen/logrus v1.2.0 h1:juTguoYk5qI21pwyTXY3B3Y5cOTH3ZUyZCg1v/mihuo= 197 | github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 198 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 199 | github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 200 | github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= 201 | github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= 202 | github.com/spf13/afero v1.1.2 h1:m8/z1t7/fwjysjQRYbP0RD+bUIF/8tJwPdEZsI83ACI= 203 | github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ= 204 | github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8= 205 | github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 206 | github.com/spf13/cobra v1.0.0 h1:6m/oheQuQ13N9ks4hubMG6BnvwOeaJrqSPLahSnczz8= 207 | github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= 208 | github.com/spf13/jwalterweatherman v1.0.0 h1:XHEdyB+EcvlqZamSM4ZOMGlc93t6AcsBEu9Gc1vn7yk= 209 | github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo= 210 | github.com/spf13/pflag v1.0.3 h1:zPAT6CGy6wXeQ7NtTnaTerfKOsV6V6F8agHXFiazDkg= 211 | github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= 212 | github.com/spf13/viper v1.4.0/go.mod h1:PTJ7Z/lr49W6bUbkmS1V3by4uWynFiR9p7+dSq/yZzE= 213 | github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= 214 | github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= 215 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 216 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 217 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 218 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 219 | github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= 220 | github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= 221 | github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= 222 | github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= 223 | github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= 224 | github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= 225 | go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= 226 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 227 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 228 | go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= 229 | go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= 230 | go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= 231 | golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 232 | golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 233 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 234 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 235 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 236 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 h1:psW17arqaxU48Z5kZ0CQnkZWQJsqcURM6tKiBApRjXI= 237 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 238 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 239 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 240 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 241 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 242 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 243 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 244 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 245 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 246 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 247 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 248 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 249 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 250 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 251 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 252 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 253 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 254 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 255 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 256 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 257 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 258 | golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 259 | golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 260 | golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 261 | golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 262 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 263 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 264 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 265 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 266 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 267 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 268 | golang.org/x/net v0.0.0-20190522155817-f3200d17e092/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 269 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 270 | golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 271 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 272 | golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c h1:dk0ukUIHmGHqASjP0iue2261isepFCC6XRCSd1nHgDw= 273 | golang.org/x/net v0.0.0-20201002202402-0a1ea396d57c/go.mod h1:iQL9McJNjoIa5mjH6nYTCTZXUN6RP+XW3eib7Ya3XcI= 274 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 275 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 276 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 277 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 278 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 279 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 280 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 281 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 282 | golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 283 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 284 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 285 | golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 286 | golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 287 | golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 288 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 289 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 290 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 291 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 292 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 293 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 294 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 295 | golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 296 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f h1:+Nyd8tzPX9R7BWHguqsrbFdRx3WQ/1ib8I44HXV5yTA= 297 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 298 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 299 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 300 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 301 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 302 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 303 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 304 | golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 305 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 306 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 307 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 308 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 309 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 310 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 311 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 312 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 313 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 314 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 315 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 316 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 317 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 318 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 319 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 320 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 321 | golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 322 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 323 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 324 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 325 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 326 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 327 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 328 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 329 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 330 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 331 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 332 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 333 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 334 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 335 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 336 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 337 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 338 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 339 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55 h1:gSJIx1SDwno+2ElGhA4+qG2zF97qiUzTM+rQ0klBOcE= 340 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 341 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 342 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a h1:Ob5/580gVHBJZgXnff1cZDbG+xLtMVE5mDRTe+nIsX4= 343 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 344 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 345 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 346 | google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 347 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 348 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 349 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 350 | google.golang.org/grpc v1.32.0 h1:zWTV+LMdc3kaiJMSTOFz2UgSBgx8RNQoTGiZu3fR9S0= 351 | google.golang.org/grpc v1.32.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 352 | gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= 353 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 354 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 355 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 356 | gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= 357 | gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 358 | gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= 359 | gopkg.in/yaml.v2 v2.0.0-20170812160011-eb3733d160e7/go.mod h1:JAlM8MvJe8wmxCU4Bli9HhUf9+ttbYbLASfIpnQbh74= 360 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 361 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 362 | gopkg.in/yaml.v2 v2.2.4 h1:/eiJrUcujPVeJ3xlSWaiNi3uSVmDGBK1pDHUHAnao1I= 363 | gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 364 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 365 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 366 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 367 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 368 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 369 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 370 | -------------------------------------------------------------------------------- /lib/autoheal/autoheal.go: -------------------------------------------------------------------------------- 1 | // Package autoheal provides wrapping on docker containers that restarts 2 | // containers automatically when they become uhealthy 3 | package autoheal 4 | 5 | import ( 6 | "errors" 7 | "os/exec" 8 | ) 9 | 10 | // AutoHeal wraps auto restarts to containers when they become unhealthy 11 | func AutoHeal(params []string) (string, error) { 12 | app := "docker" 13 | arg0 := "update" 14 | arg1 := "--restart" 15 | arg2 := "unless-stopped" 16 | msg := "" 17 | 18 | if len(params) < 1 { 19 | return msg, errors.New("No container specified") 20 | } 21 | for _, id := range params { 22 | cmd := exec.Command(app, arg0, arg1, arg2, id) 23 | err := cmd.Run() 24 | if err != nil { 25 | return msg, err 26 | } 27 | msg += "Successfully added autoheals to container: " + id 28 | } 29 | return msg, nil 30 | } 31 | -------------------------------------------------------------------------------- /lib/autoheal/autoheal_test.go: -------------------------------------------------------------------------------- 1 | package autoheal 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestAutoHeal(t *testing.T) { 8 | containerName := []string{"ng"} 9 | _, err := AutoHeal(containerName) 10 | if err != nil { 11 | t.Errorf("Bad auto reload") 12 | } else { 13 | t.Logf("Successfully autohealed") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/heal/heal.go: -------------------------------------------------------------------------------- 1 | // Package heal "heals" unhealthy docker containers by restarting them 2 | // in the daemon 3 | package heal 4 | 5 | import ( 6 | "context" 7 | "errors" 8 | "log" 9 | "os" 10 | "time" 11 | 12 | "github.com/docker/docker/api/types" 13 | "github.com/docker/docker/client" 14 | ) 15 | 16 | var ctx = context.Background() 17 | 18 | // GetUnheatlhyContainers fetches the ids of the unhealthy containers currently running 19 | func GetUnheatlhyContainers(params ...string) []string { 20 | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) 21 | if err != nil { 22 | log.Fatal(err) 23 | os.Exit(1) 24 | } 25 | var containerIDs = []string{} 26 | var containers []types.Container 27 | if params == nil { 28 | containers, err = cli.ContainerList(ctx, types.ContainerListOptions{}) 29 | if err != nil { 30 | log.Fatal(err) 31 | os.Exit(1) 32 | } 33 | for _, container := range containers { 34 | containerIDs = append(containerIDs, container.ID[:10]) 35 | } 36 | } else { 37 | containerIDs = append(containerIDs, params[0]) 38 | } 39 | return containerIDs 40 | } 41 | 42 | // ContainerHeal heals unhealthy containers by restarting them given splice of 43 | // container ids grom GetUnheatlhyContainers or from given ids passed in flag 44 | func ContainerHeal(containerIds []string) (string, error) { 45 | msg := "" 46 | if len(containerIds) < 2 { 47 | for _, id := range GetUnheatlhyContainers() { 48 | containerIds = append(containerIds, id) 49 | } 50 | } 51 | if len(containerIds) == 0 { 52 | return msg, errors.New("No containers were running") 53 | } 54 | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) 55 | if err != nil { 56 | return msg, err 57 | } 58 | var timeout *time.Duration 59 | for _, id := range containerIds { 60 | if len(id) > 2 { 61 | timeoutValue := time.Duration(10) * time.Second 62 | timeout = &timeoutValue 63 | e := cli.ContainerRestart(ctx, id, timeout) 64 | if e != nil { 65 | return msg, e 66 | } 67 | msg += "Restarted container: " + id 68 | } 69 | } 70 | return msg, nil 71 | } 72 | -------------------------------------------------------------------------------- /lib/heal/heal_test.go: -------------------------------------------------------------------------------- 1 | package heal 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestHeal(t *testing.T) { 8 | containers := GetUnheatlhyContainers() 9 | _, err := ContainerHeal(containers) 10 | if err != nil { 11 | t.Errorf("Error in healing container %s", err) 12 | } else { 13 | t.Logf("Successfully healed container") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/healthcheck/healcheck_test.go: -------------------------------------------------------------------------------- 1 | package healthcheck 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestPerform(t *testing.T) { 8 | var dummy = []string{"bdd7731b8121"} 9 | _, err := PerformHealthCheck(dummy) 10 | if err != nil { 11 | t.Errorf("Error in creating health check %s\n", err) 12 | } else { 13 | t.Logf("Successfully created new container\n") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /lib/healthcheck/healthcheck.go: -------------------------------------------------------------------------------- 1 | // Package healthcheck provides primitives that allow users to attach 2 | // health checks to running docker containers 3 | package healthcheck 4 | 5 | import ( 6 | "context" 7 | "errors" 8 | "strconv" 9 | 10 | "github.com/docker/docker/api/types" 11 | "github.com/docker/docker/api/types/container" 12 | "github.com/docker/docker/api/types/filters" 13 | "github.com/docker/docker/client" 14 | "github.com/docker/go-connections/nat" 15 | ) 16 | 17 | var ctx = context.Background() 18 | 19 | // PerformHealthCheck adds health checks to running containers 20 | func PerformHealthCheck(params []string) (string, error) { 21 | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) 22 | if err != nil { 23 | return "", err 24 | } 25 | var filter filters.Args 26 | var containers []types.Container 27 | msg := "" 28 | // checks two cases: passed in container ids or none 29 | if len(params[0]) > 0 { 30 | // specified container given in the parameter 31 | filter = filters.NewArgs() 32 | containers, err = cli.ContainerList(ctx, types.ContainerListOptions{Filters: filter}) 33 | if err != nil { 34 | return "", err 35 | } 36 | for _, container := range containers { 37 | // check if container is running on a port 38 | if len(container.Ports) > 0 { 39 | port := strconv.FormatUint(uint64(container.Ports[0].PublicPort), 10) 40 | killContainer(container.ID[:10]) 41 | createContainer(container.Image, container.Ports[0].IP, port) 42 | msg += "Successfully added health checks to the following container: " + container.ID 43 | } else { 44 | msg += "The following container did not have a published port" + container.ID 45 | } 46 | } 47 | return msg, nil 48 | } 49 | // no containers specified so find the containers running through Docker API 50 | containers, err = cli.ContainerList(ctx, types.ContainerListOptions{}) 51 | if err != nil { 52 | return "", err 53 | } 54 | if len(containers) == 0 { 55 | return "", errors.New("No running container detected") 56 | } 57 | for _, container := range containers { 58 | // check if container is running on a port 59 | if len(container.Ports) > 0 { 60 | port := strconv.FormatUint(uint64(container.Ports[0].PublicPort), 10) 61 | killContainer(container.ID[:10]) 62 | createContainer(container.Image, container.Ports[0].IP, port) 63 | msg += "Successfully added health checks to the following container: " + container.Image 64 | } else { 65 | msg += "The following container did not have a published port" + container.ID 66 | } 67 | } 68 | return msg, nil 69 | } 70 | 71 | // killContainer kills all exisiting container to later add the health checks 72 | func killContainer(containerID string) error { 73 | if len(containerID) == 0 { 74 | return errors.New("Invalid Arguments specified") 75 | } 76 | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) 77 | if err != nil { 78 | return err 79 | } 80 | err = cli.ContainerKill(ctx, containerID, "SIGKILL") 81 | if err != nil { 82 | return err 83 | } 84 | return nil 85 | } 86 | 87 | // createContainer recreates a container with a health check added to it 88 | func createContainer(containerImage string, hostIP string, port string) error { 89 | if len(containerImage) == 0 || len(hostIP) == 0 || len(port) == 0 { 90 | return errors.New("Invalid Arguments") 91 | } 92 | cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation()) 93 | if err != nil { 94 | return err 95 | } 96 | 97 | hostBinding := nat.PortBinding{ 98 | HostIP: hostIP, 99 | HostPort: port, 100 | } 101 | containerPort, err := nat.NewPort("tcp", port) 102 | if err != nil { 103 | return err 104 | } 105 | // Provide the features ensuring the container can get a health check 106 | portBinding := nat.PortMap{containerPort: []nat.PortBinding{hostBinding}} 107 | resp, err := cli.ContainerCreate(ctx, &container.Config{ 108 | Image: containerImage, 109 | Healthcheck: &container.HealthConfig{ 110 | Test: []string{"CMD-SHELL", "curl localhost:" + port}, 111 | Interval: 1000000000, 112 | Retries: 10, 113 | Timeout: 10000000000, 114 | StartPeriod: 60000000000, 115 | }, 116 | ExposedPorts: nat.PortSet{ 117 | containerPort: struct{}{}, 118 | }, 119 | }, &container.HostConfig{ 120 | PortBindings: portBinding, 121 | }, nil, nil, "") 122 | 123 | if err != nil { 124 | return err 125 | } 126 | // respin the container 127 | if err := cli.ContainerStart(ctx, resp.ID, types.ContainerStartOptions{}); err != nil { 128 | return err 129 | } 130 | return nil 131 | } 132 | -------------------------------------------------------------------------------- /lib/scan/scan.go: -------------------------------------------------------------------------------- 1 | // Package scan scans a docker image for vulnerabilities using docker scan 2 | package scan 3 | 4 | import ( 5 | "bufio" 6 | "errors" 7 | "fmt" 8 | "os" 9 | "os/exec" 10 | "strings" 11 | ) 12 | 13 | // Vulnerabilities scans images for vulnerabilities 14 | func Vulnerabilities(image string) (string, error) { 15 | app := "docker" 16 | arg1 := "scan" 17 | // group issues in json format 18 | arg2 := "--json" 19 | arg3 := "--group-issues" 20 | if len(image) < 1 { 21 | return "", errors.New("No image specified") 22 | } 23 | cmd := exec.Command(app, arg1, arg2, arg3, image) 24 | output, err := cmd.CombinedOutput() 25 | if err != nil { 26 | return string(output), nil 27 | } 28 | // checks if Snyk is enabeld 29 | if strings.Compare(string(output), "Docker Scan relies upon access to Snyk, a third party provider, do you consent to proceed using Snyk? (y/N)") == 0 { 30 | return "", errors.New("You need to enable Snyk to use this feature") 31 | } 32 | return string(output), nil 33 | } 34 | 35 | // WriteFile writes output to file 36 | func WriteFile(text string, filename string) (string, error) { 37 | if len(filename) < 1 || len(text) < 1 { 38 | return "", errors.New("No filename or text provided") 39 | } 40 | f, err := os.Create(filename) 41 | if err != nil { 42 | return "", err 43 | } 44 | defer f.Close() 45 | w := bufio.NewWriter(f) 46 | fmt.Fprintf(w, text) 47 | w.Flush() 48 | msg := "Successfully wrote vulnerability report to " + filename 49 | return msg, nil 50 | } 51 | -------------------------------------------------------------------------------- /lib/scan/scan_test.go: -------------------------------------------------------------------------------- 1 | package scan 2 | 3 | import ( 4 | "log" 5 | "testing" 6 | ) 7 | 8 | func TestScan(t *testing.T) { 9 | out, err := Vulnerabilities("nginx") 10 | if err != nil { 11 | log.Fatal(err) 12 | } 13 | if len(out) < 1 { 14 | t.Errorf("Error in scanning docker file for vulnerabilities") 15 | } else { 16 | t.Logf("Successfully generated report") 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/suggestions/structs.go: -------------------------------------------------------------------------------- 1 | package suggestions 2 | 3 | // DockerVars type is the attributes of the docker file 4 | type DockerVars struct { 5 | userCount int 6 | workDirCount int 7 | environCount int 8 | } 9 | 10 | // ErrorMessages assigns messages to possible suggestions 11 | type ErrorMessages struct { 12 | userMsg string 13 | workDirMsg string 14 | environMsg string 15 | } 16 | -------------------------------------------------------------------------------- /lib/suggestions/suggestions.go: -------------------------------------------------------------------------------- 1 | // Package suggestions provides functions to suggest improvements on docker files 2 | // following certain best practices 3 | package suggestions 4 | 5 | import ( 6 | "bufio" 7 | "errors" 8 | "fmt" 9 | "os" 10 | "runtime" 11 | "strings" 12 | ) 13 | 14 | // ReadImage reads a docker file and suggests improvements that can be made 15 | func ReadImage(imagePath string) (string, error) { 16 | if len(imagePath) < 10 { 17 | return "", errors.New("File is not a dockerfile") 18 | } 19 | // grab the last 10 characters of the filename 20 | image := imagePath[(len(imagePath) - 10):] 21 | if runtime.GOOS == "windows" { 22 | image = strings.TrimRight(image, "\r\n") 23 | } else { 24 | image = strings.TrimRight(image, "\n") 25 | } 26 | // check if the file is a Dockerfile 27 | image = strings.ToLower(image) 28 | if strings.Compare(image, "dockerfile") != 0 { 29 | return "", errors.New("File given was not a dockerfile") 30 | } 31 | file, err := os.Open(imagePath) 32 | if err != nil { 33 | return "", err 34 | } 35 | defer file.Close() 36 | var data DockerVars 37 | var e ErrorMessages 38 | lineNumber := 0 39 | scanner := bufio.NewScanner(file) 40 | // suggest improvements to each line of the dockerfile 41 | for scanner.Scan() { 42 | lineNumber++ 43 | suggestImprovements(scanner.Text(), &data, lineNumber) 44 | } 45 | // if certain features are not found in the dockerfile, create the messages 46 | // and display them to user 47 | if data.userCount == 0 || data.environCount == 0 || data.workDirCount == 0 { 48 | createMessages(true, &data, &e) 49 | displayMessages(&e) 50 | } 51 | if err := scanner.Err(); err != nil { 52 | return "", err 53 | } 54 | return "Detected no issues with Docker container", nil 55 | } 56 | 57 | func createMessages(err bool, data *DockerVars, e *ErrorMessages) error { 58 | if data == nil || e == nil { 59 | return errors.New("Invalid arguments") 60 | } 61 | if err { 62 | if data.userCount == 0 { 63 | e.userMsg = "No user specified in Dockerfile, this is a security risk for your container, consider adding one" 64 | } 65 | if data.environCount == 0 { 66 | e.environMsg = "No environment variable specified in Dockerfile, these are useful for signaling your application is in production." 67 | } 68 | if data.workDirCount == 0 { 69 | e.workDirMsg = "No working directory specified, consider adding one" 70 | } 71 | return nil 72 | } 73 | return errors.New("No errors detected") 74 | } 75 | 76 | func displayMessages(e *ErrorMessages) { 77 | if e == nil { 78 | return 79 | } 80 | fmt.Println("<---- Detected the following issues with your Dockerfile ---->") 81 | i := 0 82 | if len(e.userMsg) != 0 { 83 | i++ 84 | fmt.Printf("%d.) %s \n", i, e.userMsg) 85 | } 86 | if len(e.environMsg) != 0 { 87 | i++ 88 | fmt.Printf("%d.) %s \n", i, e.environMsg) 89 | } 90 | if len(e.workDirMsg) != 0 { 91 | i++ 92 | fmt.Printf("%d.) %s \n", i, e.workDirMsg) 93 | } 94 | } 95 | 96 | func suggestImprovements(text string, data *DockerVars, lineNumber int) { 97 | if len(text) == 0 || data == nil || lineNumber < 0 { 98 | return 99 | } 100 | var fromCount int 101 | words := strings.Fields(text) 102 | for _, word := range words { 103 | if fromCount > 0 && !strings.Contains(word, ":") { 104 | fmt.Printf("Line %d -- Specify a version of this base image: %s\n", lineNumber, word) 105 | } 106 | if strings.ToLower(word) == "from" { 107 | fromCount++ 108 | } else if strings.ToLower(word) == "user" { 109 | data.userCount++ 110 | } else if strings.ToLower(word) == "env" { 111 | data.environCount++ 112 | } else if strings.ToLower(word) == "workdir" { 113 | data.workDirCount++ 114 | } else { 115 | fromCount = 0 116 | } 117 | } 118 | } 119 | -------------------------------------------------------------------------------- /lib/suggestions/suggestions_test.go: -------------------------------------------------------------------------------- 1 | package suggestions 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestSuggestions(t *testing.T) { 8 | filePath := "../../testdata/Dockerfile" 9 | _, err := ReadImage(filePath) 10 | if err != nil { 11 | t.Errorf("Error in reading Dockerfile : %s\n", err) 12 | } else { 13 | t.Logf("Successfully ran suggestions in Dockerfile\n") 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /profile.cov: -------------------------------------------------------------------------------- 1 | mode: count 2 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:20.48,22.16 2 1 3 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:25.2,29.23 3 1 4 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:59.2,59.12 1 1 5 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:22.16,23.13 1 0 6 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:29.23,35.17 5 0 7 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:38.3,38.40 1 0 8 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:35.17,37.4 1 0 9 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:38.40,42.4 3 0 10 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:43.8,46.17 2 1 11 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:49.3,49.26 1 1 12 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:52.3,52.40 1 1 13 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:46.17,48.4 1 0 14 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:49.26,51.4 1 0 15 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:52.40,57.4 4 1 16 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:63.45,65.16 2 1 17 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:68.2,69.16 2 1 18 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:72.2,72.12 1 1 19 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:65.16,67.3 1 0 20 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:69.16,71.3 1 0 21 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:76.79,78.16 2 1 22 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:82.2,87.16 3 1 23 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:91.2,108.16 3 1 24 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:112.2,112.88 1 1 25 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:115.2,115.12 1 1 26 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:78.16,80.3 1 0 27 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:87.16,89.3 1 0 28 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:108.16,110.3 1 0 29 | github.com/nishgowda/docktor/lib/healthcheck/healthcheck.go:112.88,114.3 1 0 30 | github.com/nishgowda/docktor/lib/scan/scan.go:14.43,17.20 3 1 31 | github.com/nishgowda/docktor/lib/scan/scan.go:21.2,23.16 3 1 32 | github.com/nishgowda/docktor/lib/scan/scan.go:26.2,26.23 1 0 33 | github.com/nishgowda/docktor/lib/scan/scan.go:17.20,20.3 2 0 34 | github.com/nishgowda/docktor/lib/scan/scan.go:23.16,25.3 1 1 35 | github.com/nishgowda/docktor/lib/scan/scan.go:30.52,31.40 1 0 36 | github.com/nishgowda/docktor/lib/scan/scan.go:34.2,35.16 2 0 37 | github.com/nishgowda/docktor/lib/scan/scan.go:38.2,43.12 6 0 38 | github.com/nishgowda/docktor/lib/scan/scan.go:31.40,33.3 1 0 39 | github.com/nishgowda/docktor/lib/scan/scan.go:35.16,37.3 1 0 40 | github.com/nishgowda/docktor/lib/heal/heal.go:18.55,20.16 2 2 41 | github.com/nishgowda/docktor/lib/heal/heal.go:24.2,26.21 3 2 42 | github.com/nishgowda/docktor/lib/heal/heal.go:38.2,38.21 1 2 43 | github.com/nishgowda/docktor/lib/heal/heal.go:20.16,23.3 2 0 44 | github.com/nishgowda/docktor/lib/heal/heal.go:26.21,28.17 2 2 45 | github.com/nishgowda/docktor/lib/heal/heal.go:32.3,32.40 1 2 46 | github.com/nishgowda/docktor/lib/heal/heal.go:28.17,31.4 2 0 47 | github.com/nishgowda/docktor/lib/heal/heal.go:32.40,34.4 1 2 48 | github.com/nishgowda/docktor/lib/heal/heal.go:35.8,37.3 1 0 49 | github.com/nishgowda/docktor/lib/heal/heal.go:43.49,44.29 1 1 50 | github.com/nishgowda/docktor/lib/heal/heal.go:49.2,49.30 1 1 51 | github.com/nishgowda/docktor/lib/heal/heal.go:52.2,53.16 2 1 52 | github.com/nishgowda/docktor/lib/heal/heal.go:56.2,57.34 2 1 53 | github.com/nishgowda/docktor/lib/heal/heal.go:68.2,68.12 1 1 54 | github.com/nishgowda/docktor/lib/heal/heal.go:44.29,45.47 1 1 55 | github.com/nishgowda/docktor/lib/heal/heal.go:45.47,47.4 1 1 56 | github.com/nishgowda/docktor/lib/heal/heal.go:49.30,51.3 1 0 57 | github.com/nishgowda/docktor/lib/heal/heal.go:53.16,55.3 1 0 58 | github.com/nishgowda/docktor/lib/heal/heal.go:57.34,58.20 1 2 59 | github.com/nishgowda/docktor/lib/heal/heal.go:58.20,62.16 4 2 60 | github.com/nishgowda/docktor/lib/heal/heal.go:65.4,65.47 1 2 61 | github.com/nishgowda/docktor/lib/heal/heal.go:62.16,64.5 1 0 62 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:15.40,16.25 1 1 63 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:20.2,21.31 2 1 64 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:27.2,28.47 2 1 65 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:31.2,32.16 2 1 66 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:35.2,42.21 6 1 67 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:48.2,48.77 1 1 68 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:54.2,54.38 1 1 69 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:57.2,57.12 1 1 70 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:16.25,18.3 1 0 71 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:21.31,23.3 1 0 72 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:23.8,25.3 1 1 73 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:28.47,30.3 1 0 74 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:32.16,34.3 1 0 75 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:42.21,45.3 2 4 76 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:48.77,51.3 2 0 77 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:51.8,53.3 1 1 78 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:54.38,56.3 1 0 79 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:60.73,61.9 1 0 80 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:73.2,73.41 1 0 81 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:61.9,62.26 1 0 82 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:65.3,65.29 1 0 83 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:68.3,68.29 1 0 84 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:71.3,71.13 1 0 85 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:62.26,64.4 1 0 86 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:65.29,67.4 1 0 87 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:68.29,70.4 1 0 88 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:76.40,79.25 3 0 89 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:83.2,83.28 1 0 90 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:87.2,87.28 1 0 91 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:79.25,82.3 2 0 92 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:83.28,86.3 2 0 93 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:87.28,90.3 2 0 94 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:93.73,96.29 3 4 95 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:96.29,97.52 1 9 96 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:100.3,100.38 1 9 97 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:97.52,99.4 1 0 98 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:100.38,102.4 1 1 99 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:102.9,102.45 1 8 100 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:102.45,104.4 1 1 101 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:104.9,104.44 1 7 102 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:104.44,106.4 1 1 103 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:106.9,106.48 1 6 104 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:106.48,108.4 1 1 105 | github.com/nishgowda/docktor/lib/suggestions/suggestions.go:108.9,110.4 1 5 106 | github.com/nishgowda/docktor/lib/autoheal/autoheal.go:13.38,19.21 5 1 107 | github.com/nishgowda/docktor/lib/autoheal/autoheal.go:22.2,22.28 1 1 108 | github.com/nishgowda/docktor/lib/autoheal/autoheal.go:30.2,30.12 1 1 109 | github.com/nishgowda/docktor/lib/autoheal/autoheal.go:19.21,21.3 1 0 110 | github.com/nishgowda/docktor/lib/autoheal/autoheal.go:22.28,25.17 3 1 111 | github.com/nishgowda/docktor/lib/autoheal/autoheal.go:28.3,28.67 1 1 112 | github.com/nishgowda/docktor/lib/autoheal/autoheal.go:25.17,27.4 1 0 113 | -------------------------------------------------------------------------------- /testdata/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:19 2 | USER root 3 | WORKDIR /the/workdir/path 4 | ENV NODE_ENV production 5 | -------------------------------------------------------------------------------- /testdata/repo.txt: -------------------------------------------------------------------------------- 1 | 2 | Testing nginx... 3 | 4 | ✗ Low severity vulnerability found in tiff/libtiff5 5 | Description: Use After Free 6 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TIFF-405264 7 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 8 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 9 | 10 | ✗ Low severity vulnerability found in tiff/libtiff5 11 | Description: Divide By Zero 12 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TIFF-405344 13 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 14 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 15 | 16 | ✗ Low severity vulnerability found in tiff/libtiff5 17 | Description: NULL Pointer Dereference 18 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TIFF-405387 19 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 20 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 21 | 22 | ✗ Low severity vulnerability found in tiff/libtiff5 23 | Description: Out-of-bounds Read 24 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TIFF-405477 25 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 26 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 27 | 28 | ✗ Low severity vulnerability found in tiff/libtiff5 29 | Description: Out-of-bounds Read 30 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TIFF-405858 31 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 32 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 33 | 34 | ✗ Low severity vulnerability found in tiff/libtiff5 35 | Description: Missing Release of Resource after Effective Lifetime 36 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TIFF-406148 37 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 38 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 39 | 40 | ✗ Low severity vulnerability found in tar 41 | Description: CVE-2005-2541 42 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TAR-312331 43 | Introduced through: meta-common-packages@meta 44 | From: meta-common-packages@meta > tar@1.30+dfsg-6 45 | 46 | ✗ Low severity vulnerability found in tar 47 | Description: NULL Pointer Dereference 48 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-TAR-341203 49 | Introduced through: meta-common-packages@meta 50 | From: meta-common-packages@meta > tar@1.30+dfsg-6 51 | 52 | ✗ Low severity vulnerability found in systemd/libsystemd0 53 | Description: Link Following 54 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SYSTEMD-305144 55 | Introduced through: systemd/libsystemd0@241-7~deb10u4, util-linux/bsdutils@1:2.33.1-0.1, apt@1.8.2.1, util-linux/mount@2.33.1-0.1, systemd/libudev1@241-7~deb10u4 56 | From: systemd/libsystemd0@241-7~deb10u4 57 | From: util-linux/bsdutils@1:2.33.1-0.1 > systemd/libsystemd0@241-7~deb10u4 58 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 59 | and 4 more... 60 | 61 | ✗ Low severity vulnerability found in systemd/libsystemd0 62 | Description: CVE-2019-9619 63 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SYSTEMD-342768 64 | Introduced through: systemd/libsystemd0@241-7~deb10u4, util-linux/bsdutils@1:2.33.1-0.1, apt@1.8.2.1, util-linux/mount@2.33.1-0.1, systemd/libudev1@241-7~deb10u4 65 | From: systemd/libsystemd0@241-7~deb10u4 66 | From: util-linux/bsdutils@1:2.33.1-0.1 > systemd/libsystemd0@241-7~deb10u4 67 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 68 | and 4 more... 69 | 70 | ✗ Low severity vulnerability found in systemd/libsystemd0 71 | Description: Missing Release of Resource after Effective Lifetime 72 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SYSTEMD-542807 73 | Introduced through: systemd/libsystemd0@241-7~deb10u4, util-linux/bsdutils@1:2.33.1-0.1, apt@1.8.2.1, util-linux/mount@2.33.1-0.1, systemd/libudev1@241-7~deb10u4 74 | From: systemd/libsystemd0@241-7~deb10u4 75 | From: util-linux/bsdutils@1:2.33.1-0.1 > systemd/libsystemd0@241-7~deb10u4 76 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 77 | and 4 more... 78 | 79 | ✗ Low severity vulnerability found in systemd/libsystemd0 80 | Description: Improper Input Validation 81 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SYSTEMD-570991 82 | Introduced through: systemd/libsystemd0@241-7~deb10u4, util-linux/bsdutils@1:2.33.1-0.1, apt@1.8.2.1, util-linux/mount@2.33.1-0.1, systemd/libudev1@241-7~deb10u4 83 | From: systemd/libsystemd0@241-7~deb10u4 84 | From: util-linux/bsdutils@1:2.33.1-0.1 > systemd/libsystemd0@241-7~deb10u4 85 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 86 | and 4 more... 87 | 88 | ✗ Low severity vulnerability found in shadow/passwd 89 | Description: Time-of-check Time-of-use (TOCTOU) 90 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SHADOW-306205 91 | Introduced through: nginx@1.19.4-1~buster, shadow/login@1:4.5-1.1, util-linux/mount@2.33.1-0.1 92 | From: nginx@1.19.4-1~buster > adduser@3.118 > shadow/passwd@1:4.5-1.1 93 | From: shadow/login@1:4.5-1.1 94 | From: util-linux/mount@2.33.1-0.1 > util-linux@2.33.1-0.1 > shadow/login@1:4.5-1.1 95 | 96 | ✗ Low severity vulnerability found in shadow/passwd 97 | Description: Incorrect Permission Assignment for Critical Resource 98 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SHADOW-306230 99 | Introduced through: nginx@1.19.4-1~buster, shadow/login@1:4.5-1.1, util-linux/mount@2.33.1-0.1 100 | From: nginx@1.19.4-1~buster > adduser@3.118 > shadow/passwd@1:4.5-1.1 101 | From: shadow/login@1:4.5-1.1 102 | From: util-linux/mount@2.33.1-0.1 > util-linux@2.33.1-0.1 > shadow/login@1:4.5-1.1 103 | 104 | ✗ Low severity vulnerability found in shadow/passwd 105 | Description: Access Restriction Bypass 106 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SHADOW-306250 107 | Introduced through: nginx@1.19.4-1~buster, shadow/login@1:4.5-1.1, util-linux/mount@2.33.1-0.1 108 | From: nginx@1.19.4-1~buster > adduser@3.118 > shadow/passwd@1:4.5-1.1 109 | From: shadow/login@1:4.5-1.1 110 | From: util-linux/mount@2.33.1-0.1 > util-linux@2.33.1-0.1 > shadow/login@1:4.5-1.1 111 | 112 | ✗ Low severity vulnerability found in shadow/passwd 113 | Description: Incorrect Permission Assignment for Critical Resource 114 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SHADOW-539852 115 | Introduced through: nginx@1.19.4-1~buster, shadow/login@1:4.5-1.1, util-linux/mount@2.33.1-0.1 116 | From: nginx@1.19.4-1~buster > adduser@3.118 > shadow/passwd@1:4.5-1.1 117 | From: shadow/login@1:4.5-1.1 118 | From: util-linux/mount@2.33.1-0.1 > util-linux@2.33.1-0.1 > shadow/login@1:4.5-1.1 119 | 120 | ✗ Low severity vulnerability found in perl/perl-base 121 | Description: Link Following 122 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-PERL-327793 123 | Introduced through: meta-common-packages@meta 124 | From: meta-common-packages@meta > perl/perl-base@5.28.1-6+deb10u1 125 | 126 | ✗ Low severity vulnerability found in pcre3/libpcre3 127 | Description: Out-of-Bounds 128 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-PCRE3-345321 129 | Introduced through: meta-common-packages@meta 130 | From: meta-common-packages@meta > pcre3/libpcre3@2:8.39-12 131 | 132 | ✗ Low severity vulnerability found in pcre3/libpcre3 133 | Description: Out-of-Bounds 134 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-PCRE3-345353 135 | Introduced through: meta-common-packages@meta 136 | From: meta-common-packages@meta > pcre3/libpcre3@2:8.39-12 137 | 138 | ✗ Low severity vulnerability found in pcre3/libpcre3 139 | Description: Uncontrolled Recursion 140 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-PCRE3-345502 141 | Introduced through: meta-common-packages@meta 142 | From: meta-common-packages@meta > pcre3/libpcre3@2:8.39-12 143 | 144 | ✗ Low severity vulnerability found in pcre3/libpcre3 145 | Description: Out-of-Bounds 146 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-PCRE3-345530 147 | Introduced through: meta-common-packages@meta 148 | From: meta-common-packages@meta > pcre3/libpcre3@2:8.39-12 149 | 150 | ✗ Low severity vulnerability found in pcre3/libpcre3 151 | Description: Out-of-bounds Read 152 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-PCRE3-572368 153 | Introduced through: meta-common-packages@meta 154 | From: meta-common-packages@meta > pcre3/libpcre3@2:8.39-12 155 | 156 | ✗ Low severity vulnerability found in openssl/libssl1.1 157 | Description: Cryptographic Issues 158 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENSSL-374709 159 | Introduced through: nginx@1.19.4-1~buster, ca-certificates@20200601~deb10u1, curl@7.64.0-4+deb10u1 160 | From: nginx@1.19.4-1~buster > openssl/libssl1.1@1.1.1d-0+deb10u3 161 | From: ca-certificates@20200601~deb10u1 > openssl@1.1.1d-0+deb10u3 > openssl/libssl1.1@1.1.1d-0+deb10u3 162 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openssl/libssl1.1@1.1.1d-0+deb10u3 163 | and 2 more... 164 | 165 | ✗ Low severity vulnerability found in openssl/libssl1.1 166 | Description: Cryptographic Issues 167 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENSSL-374996 168 | Introduced through: nginx@1.19.4-1~buster, ca-certificates@20200601~deb10u1, curl@7.64.0-4+deb10u1 169 | From: nginx@1.19.4-1~buster > openssl/libssl1.1@1.1.1d-0+deb10u3 170 | From: ca-certificates@20200601~deb10u1 > openssl@1.1.1d-0+deb10u3 > openssl/libssl1.1@1.1.1d-0+deb10u3 171 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openssl/libssl1.1@1.1.1d-0+deb10u3 172 | and 2 more... 173 | 174 | ✗ Low severity vulnerability found in openssl/libssl1.1 175 | Description: Information Exposure 176 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENSSL-536856 177 | Introduced through: nginx@1.19.4-1~buster, ca-certificates@20200601~deb10u1, curl@7.64.0-4+deb10u1 178 | From: nginx@1.19.4-1~buster > openssl/libssl1.1@1.1.1d-0+deb10u3 179 | From: ca-certificates@20200601~deb10u1 > openssl@1.1.1d-0+deb10u3 > openssl/libssl1.1@1.1.1d-0+deb10u3 180 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openssl/libssl1.1@1.1.1d-0+deb10u3 181 | and 2 more... 182 | 183 | ✗ Low severity vulnerability found in openldap/libldap-common 184 | Description: CVE-2020-25710 185 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENLDAP-1039832 186 | Introduced through: curl@7.64.0-4+deb10u1 187 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > openldap/libldap-common@2.4.47+dfsg-3+deb10u3 188 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 189 | Fixed in: 2.4.47+dfsg-3+deb10u4 190 | 191 | ✗ Low severity vulnerability found in openldap/libldap-common 192 | Description: CVE-2020-25709 193 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENLDAP-1039835 194 | Introduced through: curl@7.64.0-4+deb10u1 195 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > openldap/libldap-common@2.4.47+dfsg-3+deb10u3 196 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 197 | Fixed in: 2.4.47+dfsg-3+deb10u4 198 | 199 | ✗ Low severity vulnerability found in openldap/libldap-common 200 | Description: Improper Initialization 201 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENLDAP-304601 202 | Introduced through: curl@7.64.0-4+deb10u1 203 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > openldap/libldap-common@2.4.47+dfsg-3+deb10u3 204 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 205 | 206 | ✗ Low severity vulnerability found in openldap/libldap-common 207 | Description: Cryptographic Issues 208 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENLDAP-304654 209 | Introduced through: curl@7.64.0-4+deb10u1 210 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > openldap/libldap-common@2.4.47+dfsg-3+deb10u3 211 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 212 | 213 | ✗ Low severity vulnerability found in openldap/libldap-common 214 | Description: Out-of-Bounds 215 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENLDAP-304666 216 | Introduced through: curl@7.64.0-4+deb10u1 217 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > openldap/libldap-common@2.4.47+dfsg-3+deb10u3 218 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 219 | 220 | ✗ Low severity vulnerability found in openldap/libldap-common 221 | Description: Improper Certificate Validation 222 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-OPENLDAP-584924 223 | Introduced through: curl@7.64.0-4+deb10u1 224 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > openldap/libldap-common@2.4.47+dfsg-3+deb10u3 225 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 226 | 227 | ✗ Low severity vulnerability found in nginx 228 | Description: Improper Input Validation 229 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-NGINX-341071 230 | Introduced through: nginx@1.19.4-1~buster, nginx-module-geoip@1.19.4-1~buster, nginx-module-image-filter@1.19.4-1~buster, nginx-module-njs@1.19.4+0.4.4-1~buster, nginx-module-xslt@1.19.4-1~buster 231 | From: nginx@1.19.4-1~buster 232 | From: nginx-module-geoip@1.19.4-1~buster > nginx@1.19.4-1~buster 233 | From: nginx-module-image-filter@1.19.4-1~buster > nginx@1.19.4-1~buster 234 | and 2 more... 235 | 236 | ✗ Low severity vulnerability found in nginx 237 | Description: Access Restriction Bypass 238 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-NGINX-341087 239 | Introduced through: nginx@1.19.4-1~buster, nginx-module-geoip@1.19.4-1~buster, nginx-module-image-filter@1.19.4-1~buster, nginx-module-njs@1.19.4+0.4.4-1~buster, nginx-module-xslt@1.19.4-1~buster 240 | From: nginx@1.19.4-1~buster 241 | From: nginx-module-geoip@1.19.4-1~buster > nginx@1.19.4-1~buster 242 | From: nginx-module-image-filter@1.19.4-1~buster > nginx@1.19.4-1~buster 243 | and 2 more... 244 | 245 | ✗ Low severity vulnerability found in lz4/liblz4-1 246 | Description: Buffer Overflow 247 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LZ4-473072 248 | Introduced through: lz4/liblz4-1@1.8.3-1, apt@1.8.2.1 249 | From: lz4/liblz4-1@1.8.3-1 250 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > lz4/liblz4-1@1.8.3-1 251 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 > lz4/liblz4-1@1.8.3-1 252 | 253 | ✗ Low severity vulnerability found in libxslt/libxslt1.1 254 | Description: Use of Insufficiently Random Values 255 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXSLT-308013 256 | Introduced through: nginx-module-xslt@1.19.4-1~buster 257 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 258 | 259 | ✗ Low severity vulnerability found in libxml2/libxml2 260 | Description: Allocation of Resources Without Limits or Throttling 261 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-429526 262 | Introduced through: nginx-module-xslt@1.19.4-1~buster 263 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 264 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 265 | 266 | ✗ Low severity vulnerability found in libxml2/libxml2 267 | Description: NULL Pointer Dereference 268 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-429565 269 | Introduced through: nginx-module-xslt@1.19.4-1~buster 270 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 271 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 272 | 273 | ✗ Low severity vulnerability found in libxml2/libxml2 274 | Description: Out-of-bounds Read 275 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-609787 276 | Introduced through: nginx-module-xslt@1.19.4-1~buster 277 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 278 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 279 | 280 | ✗ Low severity vulnerability found in libwebp/libwebp6 281 | Description: Integer Overflow or Wraparound 282 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBWEBP-277882 283 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 284 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libwebp/libwebp6@0.6.1-2 285 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > libwebp/libwebp6@0.6.1-2 286 | 287 | ✗ Low severity vulnerability found in libtasn1-6 288 | Description: Resource Management Errors 289 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBTASN16-339585 290 | Introduced through: curl@7.64.0-4+deb10u1 291 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > gnutls28/libgnutls30@3.6.7-4+deb10u5 > libtasn1-6@4.13-3 292 | 293 | ✗ Low severity vulnerability found in libssh2/libssh2-1 294 | Description: Integer Overflow or Wraparound 295 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBSSH2-474372 296 | Introduced through: curl@7.64.0-4+deb10u1 297 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > libssh2/libssh2-1@1.8.0-2.1 298 | 299 | ✗ Low severity vulnerability found in libseccomp/libseccomp2 300 | Description: Access Restriction Bypass 301 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBSECCOMP-341044 302 | Introduced through: libseccomp/libseccomp2@2.3.3-4, apt@1.8.2.1 303 | From: libseccomp/libseccomp2@2.3.3-4 304 | From: apt@1.8.2.1 > libseccomp/libseccomp2@2.3.3-4 305 | 306 | ✗ Low severity vulnerability found in libpng1.6/libpng16-16 307 | Description: Resource Management Errors 308 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBPNG16-296440 309 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 310 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libpng1.6/libpng16-16@1.6.36-6 311 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > fontconfig/libfontconfig1@2.13.1-2 > freetype/libfreetype6@2.9.1-3+deb10u2 > libpng1.6/libpng16-16@1.6.36-6 312 | 313 | ✗ Low severity vulnerability found in libpng1.6/libpng16-16 314 | Description: Memory Leak 315 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBPNG16-296468 316 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 317 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libpng1.6/libpng16-16@1.6.36-6 318 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > fontconfig/libfontconfig1@2.13.1-2 > freetype/libfreetype6@2.9.1-3+deb10u2 > libpng1.6/libpng16-16@1.6.36-6 319 | 320 | ✗ Low severity vulnerability found in libpng1.6/libpng16-16 321 | Description: Out-of-bounds Write 322 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBPNG16-296471 323 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 324 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libpng1.6/libpng16-16@1.6.36-6 325 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > fontconfig/libfontconfig1@2.13.1-2 > freetype/libfreetype6@2.9.1-3+deb10u2 > libpng1.6/libpng16-16@1.6.36-6 326 | 327 | ✗ Low severity vulnerability found in libjpeg-turbo/libjpeg62-turbo 328 | Description: Divide By Zero 329 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBJPEGTURBO-299866 330 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 331 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 332 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 333 | 334 | ✗ Low severity vulnerability found in libjpeg-turbo/libjpeg62-turbo 335 | Description: NULL Pointer Dereference 336 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBJPEGTURBO-299879 337 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 338 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 339 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 340 | 341 | ✗ Low severity vulnerability found in libjpeg-turbo/libjpeg62-turbo 342 | Description: Out-of-bounds Read 343 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBJPEGTURBO-340683 344 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 345 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 346 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 347 | 348 | ✗ Low severity vulnerability found in libjpeg-turbo/libjpeg62-turbo 349 | Description: Out-of-bounds Write 350 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBJPEGTURBO-480829 351 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 352 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 353 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 354 | 355 | ✗ Low severity vulnerability found in libjpeg-turbo/libjpeg62-turbo 356 | Description: Excessive Iteration 357 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBJPEGTURBO-572943 358 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 359 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 360 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 361 | 362 | ✗ Low severity vulnerability found in libgd2/libgd3 363 | Description: NULL Pointer Dereference 364 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBGD2-548728 365 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 366 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 367 | 368 | ✗ Low severity vulnerability found in libgcrypt20 369 | Description: Use of a Broken or Risky Cryptographic Algorithm 370 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBGCRYPT20-391902 371 | Introduced through: apt@1.8.2.1, nginx-module-xslt@1.19.4-1~buster, curl@7.64.0-4+deb10u1 372 | From: apt@1.8.2.1 > gnupg2/gpgv@2.2.12-1+deb10u1 > libgcrypt20@1.8.4-5 373 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libgcrypt20@1.8.4-5 374 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 > libgcrypt20@1.8.4-5 375 | and 1 more... 376 | 377 | ✗ Low severity vulnerability found in krb5/libkrb5support0 378 | Description: CVE-2004-0971 379 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-KRB5-395883 380 | Introduced through: curl@7.64.0-4+deb10u1 381 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libkrb5support0@1.17-3 382 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libk5crypto3@1.17-3 > krb5/libkrb5support0@1.17-3 383 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libkrb5-3@1.17-3 > krb5/libkrb5support0@1.17-3 384 | and 6 more... 385 | 386 | ✗ Low severity vulnerability found in krb5/libkrb5support0 387 | Description: Integer Overflow or Wraparound 388 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-KRB5-395955 389 | Introduced through: curl@7.64.0-4+deb10u1 390 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libkrb5support0@1.17-3 391 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libk5crypto3@1.17-3 > krb5/libkrb5support0@1.17-3 392 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libkrb5-3@1.17-3 > krb5/libkrb5support0@1.17-3 393 | and 6 more... 394 | 395 | ✗ Low severity vulnerability found in jbigkit/libjbig0 396 | Description: Out-of-Bounds 397 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-JBIGKIT-289888 398 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 399 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > jbigkit/libjbig0@2.1-3.1+b2 400 | 401 | ✗ Low severity vulnerability found in gnutls28/libgnutls30 402 | Description: Improper Input Validation 403 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GNUTLS28-340755 404 | Introduced through: apt@1.8.2.1, curl@7.64.0-4+deb10u1 405 | From: apt@1.8.2.1 > gnutls28/libgnutls30@3.6.7-4+deb10u5 406 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > rtmpdump/librtmp1@2.4+20151223.gitfa8646d.1-2 > gnutls28/libgnutls30@3.6.7-4+deb10u5 407 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > gnutls28/libgnutls30@3.6.7-4+deb10u5 408 | 409 | ✗ Low severity vulnerability found in gnupg2/gpgv 410 | Description: Use of a Broken or Risky Cryptographic Algorithm 411 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GNUPG2-535553 412 | Introduced through: gnupg2/gpgv@2.2.12-1+deb10u1, apt@1.8.2.1 413 | From: gnupg2/gpgv@2.2.12-1+deb10u1 414 | From: apt@1.8.2.1 > gnupg2/gpgv@2.2.12-1+deb10u1 415 | 416 | ✗ Low severity vulnerability found in glibc/libc-bin 417 | Description: CVE-2020-27618 418 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-1035462 419 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 420 | From: glibc/libc-bin@2.28-10 421 | From: meta-common-packages@meta > glibc/libc6@2.28-10 422 | 423 | ✗ Low severity vulnerability found in glibc/libc-bin 424 | Description: Uncontrolled Recursion 425 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-338106 426 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 427 | From: glibc/libc-bin@2.28-10 428 | From: meta-common-packages@meta > glibc/libc6@2.28-10 429 | 430 | ✗ Low severity vulnerability found in glibc/libc-bin 431 | Description: Uncontrolled Recursion 432 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-338163 433 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 434 | From: glibc/libc-bin@2.28-10 435 | From: meta-common-packages@meta > glibc/libc6@2.28-10 436 | 437 | ✗ Low severity vulnerability found in glibc/libc-bin 438 | Description: Improper Input Validation 439 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-356371 440 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 441 | From: glibc/libc-bin@2.28-10 442 | From: meta-common-packages@meta > glibc/libc6@2.28-10 443 | 444 | ✗ Low severity vulnerability found in glibc/libc-bin 445 | Description: Resource Management Errors 446 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-356671 447 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 448 | From: glibc/libc-bin@2.28-10 449 | From: meta-common-packages@meta > glibc/libc6@2.28-10 450 | 451 | ✗ Low severity vulnerability found in glibc/libc-bin 452 | Description: Resource Management Errors 453 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-356735 454 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 455 | From: glibc/libc-bin@2.28-10 456 | From: meta-common-packages@meta > glibc/libc6@2.28-10 457 | 458 | ✗ Low severity vulnerability found in glibc/libc-bin 459 | Description: CVE-2010-4051 460 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-356875 461 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 462 | From: glibc/libc-bin@2.28-10 463 | From: meta-common-packages@meta > glibc/libc6@2.28-10 464 | 465 | ✗ Low severity vulnerability found in glibc/libc-bin 466 | Description: Out-of-Bounds 467 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-452228 468 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 469 | From: glibc/libc-bin@2.28-10 470 | From: meta-common-packages@meta > glibc/libc6@2.28-10 471 | 472 | ✗ Low severity vulnerability found in glibc/libc-bin 473 | Description: Access Restriction Bypass 474 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-452267 475 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 476 | From: glibc/libc-bin@2.28-10 477 | From: meta-common-packages@meta > glibc/libc6@2.28-10 478 | 479 | ✗ Low severity vulnerability found in glibc/libc-bin 480 | Description: Use of Insufficiently Random Values 481 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-453375 482 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 483 | From: glibc/libc-bin@2.28-10 484 | From: meta-common-packages@meta > glibc/libc6@2.28-10 485 | 486 | ✗ Low severity vulnerability found in glibc/libc-bin 487 | Description: Information Exposure 488 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-453640 489 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 490 | From: glibc/libc-bin@2.28-10 491 | From: meta-common-packages@meta > glibc/libc6@2.28-10 492 | 493 | ✗ Low severity vulnerability found in glibc/libc-bin 494 | Description: Information Exposure 495 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-534995 496 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 497 | From: glibc/libc-bin@2.28-10 498 | From: meta-common-packages@meta > glibc/libc6@2.28-10 499 | 500 | ✗ Low severity vulnerability found in glibc/libc-bin 501 | Description: Integer Underflow 502 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-564233 503 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 504 | From: glibc/libc-bin@2.28-10 505 | From: meta-common-packages@meta > glibc/libc6@2.28-10 506 | 507 | ✗ Low severity vulnerability found in expat/libexpat1 508 | Description: Access Restriction Bypass 509 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-EXPAT-358079 510 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 511 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > fontconfig/libfontconfig1@2.13.1-2 > expat/libexpat1@2.2.6-2+deb10u1 512 | 513 | ✗ Low severity vulnerability found in curl/libcurl4 514 | Description: CVE-2020-8177 515 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-CURL-573151 516 | Introduced through: curl@7.64.0-4+deb10u1 517 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 518 | From: curl@7.64.0-4+deb10u1 519 | 520 | ✗ Low severity vulnerability found in curl/libcurl4 521 | Description: CVE-2020-8169 522 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-CURL-573153 523 | Introduced through: curl@7.64.0-4+deb10u1 524 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 525 | From: curl@7.64.0-4+deb10u1 526 | 527 | ✗ Low severity vulnerability found in curl/libcurl4 528 | Description: CVE-2020-8231 529 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-CURL-608200 530 | Introduced through: curl@7.64.0-4+deb10u1 531 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 532 | From: curl@7.64.0-4+deb10u1 533 | 534 | ✗ Low severity vulnerability found in coreutils 535 | Description: Improper Input Validation 536 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-COREUTILS-317465 537 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 538 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > fontconfig/libfontconfig1@2.13.1-2 > fontconfig/fontconfig-config@2.13.1-2 > ucf@3.0038+nmu1 > coreutils@8.30-3 539 | 540 | ✗ Low severity vulnerability found in coreutils 541 | Description: Race Condition 542 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-COREUTILS-317494 543 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 544 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > fontconfig/libfontconfig1@2.13.1-2 > fontconfig/fontconfig-config@2.13.1-2 > ucf@3.0038+nmu1 > coreutils@8.30-3 545 | 546 | ✗ Low severity vulnerability found in bash 547 | Description: Improper Check for Dropped Privileges 548 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-BASH-536280 549 | Introduced through: bash@5.0-4 550 | From: bash@5.0-4 551 | 552 | ✗ Low severity vulnerability found in apt/libapt-pkg5.0 553 | Description: Improper Verification of Cryptographic Signature 554 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-APT-407502 555 | Introduced through: apt/libapt-pkg5.0@1.8.2.1, apt@1.8.2.1 556 | From: apt/libapt-pkg5.0@1.8.2.1 557 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 558 | From: apt@1.8.2.1 559 | 560 | ✗ Medium severity vulnerability found in pcre3/libpcre3 561 | Description: Integer Overflow or Wraparound 562 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-PCRE3-572367 563 | Introduced through: meta-common-packages@meta 564 | From: meta-common-packages@meta > pcre3/libpcre3@2:8.39-12 565 | 566 | ✗ Medium severity vulnerability found in libxml2/libxml2 567 | Description: Loop with Unreachable Exit Condition ('Infinite Loop') 568 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-429393 569 | Introduced through: nginx-module-xslt@1.19.4-1~buster 570 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 571 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 572 | 573 | ✗ Medium severity vulnerability found in libpng1.6/libpng16-16 574 | Description: Missing Release of Resource after Effective Lifetime 575 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBPNG16-473005 576 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 577 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libpng1.6/libpng16-16@1.6.36-6 578 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > fontconfig/libfontconfig1@2.13.1-2 > freetype/libfreetype6@2.9.1-3+deb10u2 > libpng1.6/libpng16-16@1.6.36-6 579 | 580 | ✗ Medium severity vulnerability found in libgcrypt20 581 | Description: Cryptographic Issues 582 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBGCRYPT20-450771 583 | Introduced through: apt@1.8.2.1, nginx-module-xslt@1.19.4-1~buster, curl@7.64.0-4+deb10u1 584 | From: apt@1.8.2.1 > gnupg2/gpgv@2.2.12-1+deb10u1 > libgcrypt20@1.8.4-5 585 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libgcrypt20@1.8.4-5 586 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 > libgcrypt20@1.8.4-5 587 | and 1 more... 588 | 589 | ✗ Medium severity vulnerability found in libgcrypt20 590 | Description: Race Condition 591 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBGCRYPT20-460489 592 | Introduced through: apt@1.8.2.1, nginx-module-xslt@1.19.4-1~buster, curl@7.64.0-4+deb10u1 593 | From: apt@1.8.2.1 > gnupg2/gpgv@2.2.12-1+deb10u1 > libgcrypt20@1.8.4-5 594 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libgcrypt20@1.8.4-5 595 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 > libgcrypt20@1.8.4-5 596 | and 1 more... 597 | 598 | ✗ Medium severity vulnerability found in glibc/libc-bin 599 | Description: Out-of-Bounds 600 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-559181 601 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 602 | From: glibc/libc-bin@2.28-10 603 | From: meta-common-packages@meta > glibc/libc6@2.28-10 604 | 605 | ✗ High severity vulnerability found in systemd/libsystemd0 606 | Description: Privilege Chaining 607 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SYSTEMD-345386 608 | Introduced through: systemd/libsystemd0@241-7~deb10u4, util-linux/bsdutils@1:2.33.1-0.1, apt@1.8.2.1, util-linux/mount@2.33.1-0.1, systemd/libudev1@241-7~deb10u4 609 | From: systemd/libsystemd0@241-7~deb10u4 610 | From: util-linux/bsdutils@1:2.33.1-0.1 > systemd/libsystemd0@241-7~deb10u4 611 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 612 | and 4 more... 613 | 614 | ✗ High severity vulnerability found in systemd/libsystemd0 615 | Description: Incorrect Privilege Assignment 616 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SYSTEMD-345391 617 | Introduced through: systemd/libsystemd0@241-7~deb10u4, util-linux/bsdutils@1:2.33.1-0.1, apt@1.8.2.1, util-linux/mount@2.33.1-0.1, systemd/libudev1@241-7~deb10u4 618 | From: systemd/libsystemd0@241-7~deb10u4 619 | From: util-linux/bsdutils@1:2.33.1-0.1 > systemd/libsystemd0@241-7~deb10u4 620 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 621 | and 4 more... 622 | 623 | ✗ High severity vulnerability found in systemd/libsystemd0 624 | Description: Information Exposure 625 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-SYSTEMD-346788 626 | Introduced through: systemd/libsystemd0@241-7~deb10u4, util-linux/bsdutils@1:2.33.1-0.1, apt@1.8.2.1, util-linux/mount@2.33.1-0.1, systemd/libudev1@241-7~deb10u4 627 | From: systemd/libsystemd0@241-7~deb10u4 628 | From: util-linux/bsdutils@1:2.33.1-0.1 > systemd/libsystemd0@241-7~deb10u4 629 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > systemd/libsystemd0@241-7~deb10u4 630 | and 4 more... 631 | 632 | ✗ High severity vulnerability found in libxml2/libxml2 633 | Description: Loop with Unreachable Exit Condition ('Infinite Loop') 634 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-429486 635 | Introduced through: nginx-module-xslt@1.19.4-1~buster 636 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 637 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 638 | 639 | ✗ High severity vulnerability found in libxml2/libxml2 640 | Description: XML External Entity (XXE) Injection 641 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-429496 642 | Introduced through: nginx-module-xslt@1.19.4-1~buster 643 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 644 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 645 | 646 | ✗ High severity vulnerability found in libxml2/libxml2 647 | Description: Missing Release of Resource after Effective Lifetime 648 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-539775 649 | Introduced through: nginx-module-xslt@1.19.4-1~buster 650 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 651 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 652 | 653 | ✗ High severity vulnerability found in libxml2/libxml2 654 | Description: Loop with Unreachable Exit Condition ('Infinite Loop') 655 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-542927 656 | Introduced through: nginx-module-xslt@1.19.4-1~buster 657 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 658 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 659 | 660 | ✗ High severity vulnerability found in libxml2/libxml2 661 | Description: Improper Resource Shutdown or Release 662 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBXML2-542929 663 | Introduced through: nginx-module-xslt@1.19.4-1~buster 664 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 665 | From: nginx-module-xslt@1.19.4-1~buster > libxslt/libxslt1.1@1.1.32-2.2~deb10u1 > libxml2/libxml2@2.9.4+dfsg1-7+b3 666 | 667 | ✗ High severity vulnerability found in libssh2/libssh2-1 668 | Description: Out-of-bounds Read 669 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBSSH2-452460 670 | Introduced through: curl@7.64.0-4+deb10u1 671 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > libssh2/libssh2-1@1.8.0-2.1 672 | 673 | ✗ High severity vulnerability found in libjpeg-turbo/libjpeg62-turbo 674 | Description: Out-of-bounds Read 675 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBJPEGTURBO-571504 676 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 677 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 678 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > tiff/libtiff5@4.1.0+git191117-2~deb10u1 > libjpeg-turbo/libjpeg62-turbo@1:1.5.2-2+b1 679 | 680 | ✗ High severity vulnerability found in libidn2/libidn2-0 681 | Description: Improper Input Validation 682 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBIDN2-474100 683 | Introduced through: curl@7.64.0-4+deb10u1 684 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > libidn2/libidn2-0@2.0.5-1+deb10u1 685 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > libpsl/libpsl5@0.20.2-2 > libidn2/libidn2-0@2.0.5-1+deb10u1 686 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > gnutls28/libgnutls30@3.6.7-4+deb10u5 > libidn2/libidn2-0@2.0.5-1+deb10u1 687 | 688 | ✗ High severity vulnerability found in libgd2/libgd3 689 | Description: Out-of-bounds Read 690 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBGD2-558917 691 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 692 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 693 | 694 | ✗ High severity vulnerability found in libbsd/libbsd0 695 | Description: Out-of-bounds Read 696 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-LIBBSD-541041 697 | Introduced through: nginx-module-image-filter@1.19.4-1~buster 698 | From: nginx-module-image-filter@1.19.4-1~buster > libgd2/libgd3@2.2.5-5.2 > libxpm/libxpm4@1:3.5.12-1 > libx11/libx11-6@2:1.6.7-1+deb10u1 > libxcb/libxcb1@1.13.1-2 > libxdmcp/libxdmcp6@1:1.1.2-3 > libbsd/libbsd0@0.9.1-2 699 | 700 | ✗ High severity vulnerability found in krb5/libkrb5support0 701 | Description: Uncontrolled Recursion 702 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-KRB5-1037638 703 | Introduced through: curl@7.64.0-4+deb10u1 704 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libkrb5support0@1.17-3 705 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libk5crypto3@1.17-3 > krb5/libkrb5support0@1.17-3 706 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > krb5/libgssapi-krb5-2@1.17-3 > krb5/libkrb5-3@1.17-3 > krb5/libkrb5support0@1.17-3 707 | and 6 more... 708 | Fixed in: 1.17-3+deb10u1 709 | 710 | ✗ High severity vulnerability found in gnutls28/libgnutls30 711 | Description: Out-of-bounds Write 712 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GNUTLS28-609778 713 | Introduced through: apt@1.8.2.1, curl@7.64.0-4+deb10u1 714 | From: apt@1.8.2.1 > gnutls28/libgnutls30@3.6.7-4+deb10u5 715 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > rtmpdump/librtmp1@2.4+20151223.gitfa8646d.1-2 > gnutls28/libgnutls30@3.6.7-4+deb10u5 716 | From: curl@7.64.0-4+deb10u1 > curl/libcurl4@7.64.0-4+deb10u1 > openldap/libldap-2.4-2@2.4.47+dfsg-3+deb10u3 > gnutls28/libgnutls30@3.6.7-4+deb10u5 717 | 718 | ✗ High severity vulnerability found in glibc/libc-bin 719 | Description: Out-of-bounds Write 720 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-559488 721 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 722 | From: glibc/libc-bin@2.28-10 723 | From: meta-common-packages@meta > glibc/libc6@2.28-10 724 | 725 | ✗ High severity vulnerability found in glibc/libc-bin 726 | Description: Use After Free 727 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GLIBC-559493 728 | Introduced through: glibc/libc-bin@2.28-10, meta-common-packages@meta 729 | From: glibc/libc-bin@2.28-10 730 | From: meta-common-packages@meta > glibc/libc6@2.28-10 731 | 732 | ✗ High severity vulnerability found in gcc-8/libstdc++6 733 | Description: Information Exposure 734 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GCC8-347558 735 | Introduced through: apt@1.8.2.1, nginx-module-xslt@1.19.4-1~buster, meta-common-packages@meta 736 | From: apt@1.8.2.1 > gcc-8/libstdc++6@8.3.0-6 737 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > gcc-8/libstdc++6@8.3.0-6 738 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 > icu/libicu63@63.1-6+deb10u1 > gcc-8/libstdc++6@8.3.0-6 739 | and 2 more... 740 | 741 | ✗ High severity vulnerability found in gcc-8/libstdc++6 742 | Description: Insufficient Entropy 743 | Info: https://snyk.io/vuln/SNYK-DEBIAN10-GCC8-469413 744 | Introduced through: apt@1.8.2.1, nginx-module-xslt@1.19.4-1~buster, meta-common-packages@meta 745 | From: apt@1.8.2.1 > gcc-8/libstdc++6@8.3.0-6 746 | From: apt@1.8.2.1 > apt/libapt-pkg5.0@1.8.2.1 > gcc-8/libstdc++6@8.3.0-6 747 | From: nginx-module-xslt@1.19.4-1~buster > libxml2/libxml2@2.9.4+dfsg1-7+b3 > icu/libicu63@63.1-6+deb10u1 > gcc-8/libstdc++6@8.3.0-6 748 | and 2 more... 749 | 750 | 751 | 752 | Organization: nishgowda 753 | Package manager: deb 754 | Project name: docker-image|nginx 755 | Docker image: nginx 756 | Platform: linux/amd64 757 | Licenses: enabled 758 | 759 | Tested 136 dependencies for known issues, found 103 issues. 760 | 761 | -------------------------------------------------------------------------------- /tools/.gitignore: -------------------------------------------------------------------------------- 1 | env -------------------------------------------------------------------------------- /tools/test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import unittest 3 | import docker 4 | import os 5 | import time 6 | import subprocess 7 | client = docker.from_env() 8 | 9 | class TestDocktor(unittest.TestCase): 10 | def test_healthcheck(self): 11 | os.system('.././bin/./docktor healthcheck') 12 | # waits for container to start then show health 13 | time.sleep(15) 14 | containers = client.containers.list() 15 | for container in containers: 16 | if 'Health' in container.attrs['State']: 17 | out = container.attrs['State']['Health']['Status'] 18 | self.assertEqual(out, 'healthy') 19 | 20 | def test_heal(self): 21 | containers = client.containers.list() 22 | for c in containers: 23 | container = c.attrs['State'] 24 | if 'Health' in container and container['Health']['Status'] != 'healthy': 25 | res = subprocess.check_output('.././bin/./docktor heal ' + c.id, shell=True) 26 | self.assertEqual(res, "Restarted container: " + c.id) 27 | else: 28 | print(c.name + ' is not unhealthy') 29 | 30 | def test_aheal(self): 31 | containers = client.containers.list() 32 | for c in containers: 33 | os.system('.././bin/./docktor autoheal ' + c.name) 34 | print('autohealed ' + c.name) 35 | 36 | def test_scan(self): 37 | containers = client.containers.list() 38 | for c in containers: 39 | os.system('.././bin/./docktor scan ' + c.id) 40 | 41 | if __name__ == "__main__": 42 | unittest.main() --------------------------------------------------------------------------------