feat: bundle gitleaks for all supported architectures#209
Merged
Conversation
Bumps gitleaks from 8.21.2 to 8.30.1 and bundles all four supported
binaries (linux_x64, linux_arm64, darwin_x64, darwin_arm64) as
arch-specific classpath resources. GitleaksRunner.extractBundledBinary()
now selects the resource matching the runtime platform, fixing the silent
fail-open (or fail-closed) breakage on arm64 containers that previously
received a build-machine binary they could not execute.
Docker builds pass -PgitleaksTargets=linux_{x64,arm64} derived from
TARGETARCH so each arch-specific image carries only its own binary;
local/dev builds bundle all four.
closes #201
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
gitleaks/linux_x64,gitleaks/linux_arm64,gitleaks/darwin_x64,gitleaks/darwin_arm64) soGitleaksRunnercan extract the right one at runtime-PgitleaksTargets=linux_{x64,arm64}derived fromTARGETARCHso each arch image carries only its own binary (lean images)-PgitleaksTargets=allopts in to bundling all four (future JAR distribution)Test plan
./gradlew :git-proxy-java-core:testpasses with auto-detected single binary./gradlew :git-proxy-java-core:downloadGitleaks -PgitleaksTargets=alldownloads all four targets./gradlew :git-proxy-java-core:downloadGitleaks -PgitleaksTargets=linux_arm64downloads only arm64 (Dockerfile path)closes #201