jgsqware / clairctl

Tracking container vulnerabilities with Clair Control for CoreOS Clair
Apache License 2.0
229 stars 82 forks source link

Clairctl version 1.2.8 clair version 2.0.1 error #101

Open lostmaniac opened 7 years ago

lostmaniac commented 7 years ago

Clairctl version 1.2.8

[root@maniac web]# clairctl report -l maniac/library/etcd:3.1.5 2017-11-02 09:47:20.644767 E | clair: analysing layer [e74e50626fff] 1/3: receiving http error: 404 2017-11-02 09:47:20.648354 E | clair: analysing layer [cf872d4f4200] 2/3: receiving http error: 404 2017-11-02 09:47:20.652000 E | clair: analysing layer [b1ddadca1548] 3/3: receiving http error: 404 panic: runtime error: index out of range [recovered] panic: runtime error: index out of range

goroutine 1 [running]: text/template.errRecover(0xc4205f1930) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:140 +0x1ec panic(0x15352c0, 0x21ca430) /home/travis/.gimme/versions/go1.8.linux.amd64/src/runtime/panic.go:489 +0x2cf github.com/jgsqware/clairctl/clair.AllVulnerabilities(0xc42024c720, 0x18, 0xc420275d10, 0x25, 0xc42024c746, 0x5, 0x2271580, 0x0, 0x0, 0x0) /home/travis/gopath/src/github.com/jgsqware/clairctl/clair/report.go:93 +0x29c reflect.Value.call(0x14c3480, 0x174c860, 0x13, 0x16d77a7, 0x4, 0xc42019e500, 0x1, 0x1, 0x0, 0x0, ...) /home/travis/.gimme/versions/go1.8.linux.amd64/src/reflect/value.go:434 +0x91f reflect.Value.Call(0x14c3480, 0x174c860, 0x13, 0xc42019e500, 0x1, 0x1, 0x21ff6e0, 0xc420548990, 0x160a5e0) /home/travis/.gimme/versions/go1.8.linux.amd64/src/reflect/value.go:302 +0xa4 text/template.(state).evalCall(0xc4205f18b0, 0x160a5e0, 0xc42012b540, 0x99, 0x14c3480, 0x174c860, 0x13, 0x21ff200, 0xc420548870, 0xc4205f9250, ...) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:668 +0x51f text/template.(state).evalFunction(0xc4205f18b0, 0x160a5e0, 0xc42012b540, 0x99, 0xc420548930, 0x21ff200, 0xc420548870, 0xc4200e4dc0, 0x2, 0x2, ...) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:536 +0x18e text/template.(state).evalCommand(0xc4205f18b0, 0x160a5e0, 0xc42012b540, 0x99, 0xc420548870, 0x0, 0x0, 0x0, 0x3, 0x3, ...) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:433 +0x6cd text/template.(state).evalPipeline(0xc4205f18b0, 0x160a5e0, 0xc42012b540, 0x99, 0xc42037c280, 0x160a5e0, 0xc42012b540, 0x29ff) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:406 +0xf2 text/template.(state).walkIfOrWith(0xc4205f18b0, 0x13, 0x160a5e0, 0xc42012b540, 0x99, 0xc42037c280, 0xc4205489c0, 0x0) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:261 +0xbc text/template.(state).walk(0xc4205f18b0, 0x160a5e0, 0xc42012b540, 0x99, 0x21ff740, 0xc42056ad80) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:251 +0x2ff text/template.(state).walk(0xc4205f18b0, 0x160a5e0, 0xc42012b540, 0x99, 0x21ff3e0, 0xc420275f50) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:240 +0x139 text/template.(Template).execute(0xc42056a980, 0x21e8940, 0xc4201565b0, 0x160a5e0, 0xc42012b540, 0x0, 0x0) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:195 +0x20a text/template.(Template).Execute(0xc42056a980, 0x21e8940, 0xc4201565b0, 0x160a5e0, 0xc42012b540, 0x0, 0x0) /home/travis/.gimme/versions/go1.8.linux.amd64/src/text/template/exec.go:178 +0x53 github.com/jgsqware/clairctl/clair.ReportAsHTML(0xc42024c720, 0x18, 0xc420275d10, 0x25, 0xc42024c746, 0x5, 0x2271580, 0x0, 0x0, 0x5, ...) /home/travis/gopath/src/github.com/jgsqware/clairctl/clair/report.go:44 +0x426 github.com/jgsqware/clairctl/cmd.glob..func10(0x21ddb40, 0xc4201e39e0, 0x1, 0x2) /home/travis/gopath/src/github.com/jgsqware/clairctl/cmd/report.go:48 +0x802 github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra.(Command).execute(0x21ddb40, 0xc4201e3700, 0x2, 0x2, 0x21ddb40, 0xc4201e3700) /home/travis/gopath/src/github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra/command.go:636 +0x231 github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra.(Command).ExecuteC(0x21ddd60, 0xc4205f1f78, 0x40677c, 0xc420084058) /home/travis/gopath/src/github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra/command.go:722 +0x339 github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra.(Command).Execute(0x21ddd60, 0x0, 0x0) /home/travis/gopath/src/github.com/jgsqware/clairctl/vendor/github.com/spf13/cobra/command.go:681 +0x2b github.com/jgsqware/clairctl/cmd.Execute() /home/travis/gopath/src/github.com/jgsqware/clairctl/cmd/root.go:32 +0x31 main.main() /home/travis/gopath/src/github.com/jgsqware/clairctl/main.go:20 +0x20


clair v2.0.1

{"Event":"Handled HTTP request","Level":"info","Location":"router.go:57","Time":"2017-11-02 09:38:32.122380","elapsed time":3528881,"method":"GET","remote addr":"127.0.0.1:27022","request uri":"/v1/layers/e74e50626fffd2779b356578ea12b3f76f0c70f11b4946785de9ecb3007dea88?vulnerabilities","status":"404"} {"Event":"Handled HTTP request","Level":"info","Location":"router.go:57","Time":"2017-11-02 09:38:32.126550","elapsed time":3094418,"method":"GET","remote addr":"127.0.0.1:27022","request uri":"/v1/layers/cf872d4f42007ab4cb6d88833d87db3f56f8db09ac89591e979e793a31fda319?vulnerabilities","status":"404"} {"Event":"Handled HTTP request","Level":"info","Location":"router.go:57","Time":"2017-11-02 09:38:32.130710","elapsed time":2787044,"method":"GET","remote addr":"127.0.0.1:27022","request uri":"/v1/layers/b1ddadca1548d24959e8ccab1cad56db26aea1c71763ab83dac8770398182997?vulnerabilities","status":"404"} {"Event":"Handled HTTP request","Level":"info","Location":"router.go:57","Time":"2017-11-02 09:47:20.644044","elapsed time":3082702,"method":"GET","remote addr":"127.0.0.1:27374","request uri":"/v1/layers/e74e50626fffd2779b356578ea12b3f76f0c70f11b4946785de9ecb3007dea88?vulnerabilities","status":"404"} {"Event":"Handled HTTP request","Level":"info","Location":"router.go:57","Time":"2017-11-02 09:47:20.647870","elapsed time":2603613,"method":"GET","remote addr":"127.0.0.1:27374","request uri":"/v1/layers/cf872d4f42007ab4cb6d88833d87db3f56f8db09ac89591e979e793a31fda319?vulnerabilities","status":"404"} {"Event":"Handled HTTP request","Level":"info","Location":"router.go:57","Time":"2017-11-02 09:47:20.651491","elapsed time":2711506,"method":"GET","remote addr":"127.0.0.1:27374","request uri":"/v1/layers/b1ddadca1548d24959e8ccab1cad56db26aea1c71763ab83dac8770398182997?vulnerabilities","status":"404"}

jdel commented 6 years ago

Can you reproduce this error with a different local image ?