Repository navigation
[Aikido] Implement SHA256 digest verification for native binary artifacts - #750
Closed
aikido-autofix[bot] wants to merge 1 commit into
Closed
aikido-autofix[bot] wants to merge 1 commit into
aikido-autofix[bot] wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch addresses the security risk of unverified native release artifacts by implementing mandatory SHA256 digest verification against repository-controlled trusted digests. The fix introduces a centralized
binary_digests.txtfile containing verified SHA256 hashes for all zen-internals binaries, validation scripts that verify cached binaries before use, and a pre-commit hook to prevent accidental commits of unverified digests. The Makefile has been updated to enforce digest validation during the build process, and helper scripts (compute_binary_digests.pyandinit_digests_from_upstream.py) enable secure initialization and maintenance of the digest registry. Builds will now fail if binary verification fails or required digests are missing, ensuring supply chain integrity.✅ 1 issue fixed by this PR
make binariesdownloads both shared libraries and.sha256sumsidecars, but the Makefile never consumes the sidecars or compares the libraries with repository-controlled digests.check_binariesalso treats any existing cache directory as valid, allowing stale or modified artifacts to bypass downloading.make buildcopies the cache intoaikido_zen/libs, Poetry includes that directory in wheels and source distributions, and the runtime passes the selected library toctypes.CDLL. The publish workflow invokesmake buildbefore publishing, establishing a supply-chain path from an unverified upstream artifact to native-code execution in downstream applications.