Skip to content

Adding Signature Validation When getFrogbot.sh Downloads Frogbot#1312

Merged
orto17 merged 11 commits into
jfrog:devfrom
orto17:signature-validation
May 27, 2026
Merged

Adding Signature Validation When getFrogbot.sh Downloads Frogbot#1312
orto17 merged 11 commits into
jfrog:devfrom
orto17:signature-validation

Conversation

@orto17
Copy link
Copy Markdown
Contributor

@orto17 orto17 commented May 13, 2026

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.
  • Update documentation about new features / new supported technologies

Add Artifactory checksum verification for Frogbot release artifacts using GetRemoteFileDetails, so uploaded and downloaded binaries are validated against server-side MD5/SHA1/SHA256 headers.

Introduce release/verifyartifact for post-upload verification in buildAndUpload.sh, and extend getFrogbot.sh with download-time checksum validation and support for custom repo layouts (e.g. ecosys-frogbot/v2).

@orto17 orto17 changed the title signature validation Adding Signature Validation When getFrogbot.sh Downloads Frogbot May 13, 2026
@orto17 orto17 added the safe to test Approve running integration tests on a pull request label May 13, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label May 13, 2026
Comment thread release/buildAndUpload.sh Outdated
echo "Uploading $exeName to $destPath ..."
jf rt u "./$exeName" "$destPath"
sha256sum "$exeName" >"${exeName}.sha256"
jf rt u "./${exeName}.sha256" "$pkgPath/$version/$pkg/${exeName}.sha256"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we need to upload sha file?? Artifactory already resolve and manage this (as far as I can see)

Image

we can ask for the sha value

we should only verify at download.

On upload you can calculate the sha, upload

Copy link
Copy Markdown
Contributor

@attiasas attiasas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments, I suggest remove new script or remember to upload and download it

Comment thread buildscripts/getFrogbot.sh Outdated
Comment thread release/buildAndUpload.sh
Copy link
Copy Markdown
Contributor

@attiasas attiasas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread buildscripts/getFrogbot.sh Outdated
Comment on lines +182 to +201
file_md5=$(local_md5 "${FILE_NAME}")
file_sha1=$(local_sha1 "${FILE_NAME}")
if [ "${file_md5}" != "${remote_md5}" ] || [ "${file_sha1}" != "${remote_sha1}" ]; then
echo "Checksum verification failed." >&2
echo "Remote md5=${remote_md5} sha1=${remote_sha1}" >&2
echo "Local md5=${file_md5} sha1=${file_sha1}" >&2
rm -f "${FILE_NAME}"
exit 1
fi

if [ -n "${remote_sha256}" ]; then
file_sha256=$(local_sha256 "${FILE_NAME}")
if [ "${file_sha256}" != "${remote_sha256}" ]; then
echo "Checksum verification failed." >&2
echo "Remote sha256=${remote_sha256}" >&2
echo "Local sha256=${file_sha256}" >&2
rm -f "${FILE_NAME}"
exit 1
fi
fi
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

split/merge (why sha256 is not with the others/why the others are grouped and sha256 not...)

@orto17 orto17 added the safe to test Approve running integration tests on a pull request label May 27, 2026
@github-actions github-actions Bot removed the safe to test Approve running integration tests on a pull request label May 27, 2026
@orto17 orto17 merged commit 5ca3907 into jfrog:dev May 27, 2026
25 of 33 checks passed
@eranturgeman eranturgeman added the new feature Automatically generated release notes label May 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants