Repository navigation
[Aikido] Pin zen-internals library digests to prevent supply-chain attacks in build workflow - #510
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
…hashes in build workflow
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 mitigates supply-chain attacks on zen-internals native libraries by replacing dynamic digest fetching from upstream GitHub releases with firewall-controlled hardcoded SHA256 digests. The digests are now pinned in the build workflow and must be explicitly updated when upgrading the zen-internals version, ensuring that any unauthorized modifications to upstream libraries are detected. Changes were made to
.github/workflows/build.ymlto include documented SHA256 hashes with clear instructions for updating them during version upgrades.✅ 1 issue fixed by this PR
build.ymlfixes the dependency only to the release version0.1.64, downloads the architecture-specific shared object from the Zen Internals release, and obtains the expected SHA-256 from that release's GitHub API metadata. No firewall-controlled digest, independently trusted signature, or provenance identity is checked. An attacker able to alter the upstream release can make the locally calculated digest equal the fetched value, after which the object is moved into the RPM/DEB or Alpine package. The request processor later loads the packaged object withdlopen, so a successfully distributed poisoned package provides native code execution in the PHP firewall process.