fix(#5202): add platform detection to gitleaks install in post-scripts - #5211
fix(#5202): add platform detection to gitleaks install in post-scripts#5211fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Port platform detection logic from scan-secrets into post-code.sh and post-fix.sh. The gitleaks download previously hardcoded linux_x64, which fails on macOS with exit status 126 (cannot execute ELF binary). The install block now uses uname -s and uname -m to detect the OS and architecture, selects the correct per-platform checksum from a declare -A associative array, and falls back to shasum on macOS where sha256sum is not available. Add platform detection unit tests to post-code-test.sh covering all supported platforms, unsupported architectures, and correct checksum selection.
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
Site previewPreview: https://91675393-site.fullsend-ai.workers.dev Commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
🤖 Finished Retro · ✅ Success · Started 5:29 PM UTC · Completed 5:39 PM UTC |
|
PR #5211 was a well-implemented fix for gitleaks platform detection (issue #5202) that was closed without merging because it modified scaffold template copies in Proposals filed
|
Port platform detection logic from scan-secrets into post-code.sh and post-fix.sh. The gitleaks download previously hardcoded linux_x64, which fails on macOS with exit status 126 (cannot execute ELF binary).
The install block now uses uname -s and uname -m to detect the OS and architecture, selects the correct per-platform checksum from a declare -A associative array, and falls back to shasum on macOS where sha256sum is not available.
Add platform detection unit tests to post-code-test.sh covering all supported platforms, unsupported architectures, and correct checksum selection.
Closes #5202
Post-script verification
agent/5202-fix-gitleaks-platform-detection)83397e5355462dea996845ed2a1ec019d32f30ac..HEAD)