Fix Security Scan Shortlog Format 35/44135/1
authorTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 3 Oct 2017 18:34:10 +0000 (11:34 -0700)
committerTrevor Bramwell <tbramwell@linuxfoundation.org>
Tue, 3 Oct 2017 18:34:10 +0000 (11:34 -0700)
The current Anteater shortlog output still contains single and double
quotes, causing comments to not be posted to Gerrit. So instead of
trying to escape the quotations they should be removed entirely.

JIRA: RELENG-272

Change-Id: I8a2565c85763d7617ced73702a12e28bf634678a
Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
jjb/ci_gate_security/anteater-report-to-gerrit.sh

index a749d1d..de1fdd7 100644 (file)
@@ -13,7 +13,7 @@ if [[ -e securityaudit.log ]] ; then
         EXITSTATUS=1
     fi
 
-    awk -F"ERROR - " '{print $2}' securityaudit.log | sed -e "s/\"/\\\\\"/g;s/\'/\\\\/g"> shortlog
+    grep 'ERROR' securityaudit.log | awk -F"ERROR - " '{ print $2 }' | tr -d "\'\"" > shortlog
 
     ssh -p 29418 gerrit.opnfv.org \
         "gerrit review -p $GERRIT_PROJECT \