From bd41fce9ab0f81f7800e486739d1157667d68735 Mon Sep 17 00:00:00 2001 From: Armin Date: Sun, 29 Oct 2017 13:20:55 +0100 Subject: [PATCH] Exit code is 1 when there is a vulnerability --- main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 0d7b101..87f525c 100644 --- a/main.go +++ b/main.go @@ -40,7 +40,10 @@ func main() { log.Fatalf("Application interrupted [%v]", s) }) - scan(scannerConfig{*imageName, whitelist, *clair, *ip, *reportFile}) + result := scan(scannerConfig{*imageName, whitelist, *clair, *ip, *reportFile}) + if len(result) > 0 { + os.Exit(1) + } } app.Run(os.Args) }