From 450f6c6cef081827d2a6cbdac440bee21f0b6c5a Mon Sep 17 00:00:00 2001 From: Artem Naluzhnyy Date: Tue, 11 Jun 2019 17:19:40 +0200 Subject: [PATCH] Validate downloaded Coverity tool checksum Issue-ID: CIMAN-260 Signed-off-by: Artem Naluzhnyy Change-Id: I73dae5c4c5bd3dd73957809b4265009b529ebca0 --- shell/maven-coverity.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/shell/maven-coverity.sh b/shell/maven-coverity.sh index 76ba4239f..e319b06d9 100644 --- a/shell/maven-coverity.sh +++ b/shell/maven-coverity.sh @@ -57,6 +57,20 @@ curl \ --output 'coverity_tool.tgz' \ 'https://scan.coverity.com/download/linux64' +curl \ + --verbose \ + --silent \ + --show-error \ + --fail \ + --form "project=${COVERITY_PROJECT_NAME}" \ + --form "token=${COVERITY_TOKEN}" \ + --form 'md5=1' \ + --output 'coverity_tool.md5' \ + 'https://scan.coverity.com/download/linux64' + +echo -n ' coverity_tool.tgz' >> 'coverity_tool.md5' +md5sum --check 'coverity_tool.md5' + tar \ --extract \ --gunzip \ -- 2.16.6