Skip to content

Commit 3f9c477

Browse files
AdamSalehclaude
andcommitted
fix: pin codecov CLI version and verify checksum
Pin the codecov CLI download to a specific version (v11.2.8) and verify the SHA256 checksum before executing, addressing the supply-chain risk of fetching an unpinned "latest" binary. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Adam Saleh <adam@asaleh.net>
1 parent 66f634e commit 3f9c477

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

scripts/openshiftci-presubmit-unittests.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,10 @@ make test
3636
echo "Codecov token not found at ${CODECOV_TOKEN_FILE}, skipping upload"
3737
exit 0
3838
fi
39-
curl -OSs --fail-with-body https://cli.codecov.io/latest/linux/codecov
39+
CODECOV_VERSION="v11.2.8"
40+
CODECOV_SHA="8930c4bb30254a42f3d8c340706b1be340885e20c0df5160a24efa2e030e662b"
41+
curl -OSs --fail-with-body "https://cli.codecov.io/${CODECOV_VERSION}/linux/codecov"
42+
echo "${CODECOV_SHA} codecov" | sha256sum --check --status
4043
chmod +x codecov
4144
CODECOV_TOKEN="$(cat "${CODECOV_TOKEN_FILE}")" ./codecov upload-process --flag unit-tests --file cover.out
4245
) || echo "Coverage upload to codecov.io failed, continuing"

0 commit comments

Comments
 (0)