From 6aa3e514e1e8a72d7487cb8783e1d30ff634e990 Mon Sep 17 00:00:00 2001 From: Christopher Fenner <26137398+CCFenner@users.noreply.github.com> Date: Tue, 6 Oct 2020 11:55:05 +0200 Subject: [PATCH] chore(detect): add error category for policy violations (#2125) * chore(detect): add error category for policy violations * Update detectExecuteScan.go Co-authored-by: Oliver Nocon <33484802+OliverNocon@users.noreply.github.com> --- cmd/detectExecuteScan.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmd/detectExecuteScan.go b/cmd/detectExecuteScan.go index 77f44aeed..14b4dcc5e 100644 --- a/cmd/detectExecuteScan.go +++ b/cmd/detectExecuteScan.go @@ -17,7 +17,13 @@ import ( ) func detectExecuteScan(config detectExecuteScanOptions, telemetryData *telemetry.CustomData) { - c := command.Command{} + c := command.Command{ + ErrorCategoryMapping: map[string][]string{ + log.ErrorCompliance.String(): { + "FAILURE_POLICY_VIOLATION - Detect found policy violations.", + }, + }, + } // reroute command output to logging framework c.Stdout(log.Writer()) c.Stderr(log.Writer())