From 01319e1f5a0adf08e8cbf06ab3865d7da136af13 Mon Sep 17 00:00:00 2001 From: Artem Naluzhnyy Date: Mon, 2 Sep 2019 15:51:12 +0200 Subject: [PATCH] Move Coverity Scan toolset out of working directory This is to avoid static code analysis of the Coverity Scan toolset itself. Issue-ID: CIMAN-260 Signed-off-by: Artem Naluzhnyy Change-Id: I32b6a42ce455ab5f7f5334921f6fde7e41d919f2 --- shell/maven-coverity.sh | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/shell/maven-coverity.sh b/shell/maven-coverity.sh index af5422ead..3361d4098 100644 --- a/shell/maven-coverity.sh +++ b/shell/maven-coverity.sh @@ -111,7 +111,7 @@ curl \ --fail \ --form "project=${COVERITY_PROJECT_NAME}" \ --form "token=${COVERITY_TOKEN}" \ - --output 'coverity_tool.tgz' \ + --output '/tmp/coverity_tool.tgz' \ 'https://scan.coverity.com/download/linux64' curl \ @@ -122,23 +122,24 @@ curl \ --form "project=${COVERITY_PROJECT_NAME}" \ --form "token=${COVERITY_TOKEN}" \ --form 'md5=1' \ - --output 'coverity_tool.md5' \ + --output '/tmp/coverity_tool.md5' \ 'https://scan.coverity.com/download/linux64' -echo -n ' coverity_tool.tgz' >> 'coverity_tool.md5' -md5sum --check 'coverity_tool.md5' +echo -n ' /tmp/coverity_tool.tgz' >> '/tmp/coverity_tool.md5' +md5sum --check '/tmp/coverity_tool.md5' tar \ --extract \ --gunzip \ - --file='coverity_tool.tgz' + --file='/tmp/coverity_tool.tgz' \ + --directory='/tmp' -COVERITY_BUILD_TOOL_DIRECTORY=$( +COVERITY_BUILD_TOOL_DIRECTORY='/tmp/'$( head -1 <( \ tar \ --list \ --gunzip \ - --file='coverity_tool.tgz' + --file='/tmp/coverity_tool.tgz' ) ) COVERITY_BINARY_DIRECTORY="${COVERITY_BUILD_TOOL_DIRECTORY}bin" @@ -146,7 +147,7 @@ test -d "${COVERITY_BINARY_DIRECTORY}" \ || exit 1 export PATH="${PATH}:${COVERITY_BINARY_DIRECTORY}" -rm 'coverity_tool.tgz' +rm '/tmp/coverity_tool.tgz' #----------------------------------------------------------------------------- # Build -- 2.16.6