Skip to content

Commit 6b1fff0

Browse files
authored
Merge pull request #514 from dgarske/coverity_fix
Harden coverity tool download: curl + gzip sanity check
2 parents adb15ee + 5e062b5 commit 6b1fff0

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/coverity-scan-fixes.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,17 @@ jobs:
6363
env:
6464
TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN_WOLFTPM }}
6565
run: |
66-
curl https://scan.coverity.com/download/cxx/linux64 \
67-
--no-progress-meter \
66+
curl -L --fail --no-progress-meter \
6867
--output cov-analysis.tar.gz \
69-
--data "token=${TOKEN}&project=wolfTPM"
68+
--data-urlencode "token=${TOKEN}" \
69+
--data-urlencode "project=wolfTPM" \
70+
https://scan.coverity.com/download/cxx/linux64
71+
file cov-analysis.tar.gz
72+
if ! gzip -t cov-analysis.tar.gz 2>/dev/null; then
73+
echo "Downloaded file is not gzip — server response:"
74+
head -c 2000 cov-analysis.tar.gz
75+
exit 1
76+
fi
7077
mkdir -p cov-analysis
7178
tar -xzf cov-analysis.tar.gz --strip 1 -C cov-analysis
7279

0 commit comments

Comments
 (0)