Skip to content

fix(#5202): add platform detection to gitleaks install in post-scripts - #5211

Closed
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/5202-fix-gitleaks-platform-detection
Closed

fix(#5202): add platform detection to gitleaks install in post-scripts#5211
fullsend-ai-coder[bot] wants to merge 1 commit into
mainfrom
agent/5202-fix-gitleaks-platform-detection

Conversation

@fullsend-ai-coder

Copy link
Copy Markdown
Contributor

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

  • Branch is not main/master (agent/5202-fix-gitleaks-platform-detection)
  • Secret scan passed (gitleaks — 83397e5355462dea996845ed2a1ec019d32f30ac..HEAD)
  • Pre-commit hooks passed (authoritative run on runner)
  • Tests ran inside sandbox

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.
@fullsend-ai-coder
fullsend-ai-coder Bot requested a review from a team as a code owner July 16, 2026 16:10
@fullsend-ai-coder fullsend-ai-coder Bot added the ready-for-review Triggers review agent dispatch label Jul 16, 2026
@github-actions

Copy link
Copy Markdown

E2E tests did not run

E2E tests run automatically for org/repo members and collaborators on pull requests.

For other contributors, a maintainer must add the ok-to-test label after the latest push.

See E2E testing guide for details.

@github-actions

Copy link
Copy Markdown

Site preview

Preview: https://91675393-site.fullsend-ai.workers.dev

Commit: 11bf88d82f3fd4f64e78ddfea73908e63e86f586

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@fullsend-ai-retro

fullsend-ai-retro Bot commented Jul 16, 2026

Copy link
Copy Markdown

🤖 Finished Retro · ✅ Success · Started 5:29 PM UTC · Completed 5:39 PM UTC
Commit: 11bf88d · View workflow run →

@fullsend-ai-retro

Copy link
Copy Markdown

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 internal/scaffold/fullsend-repo/scripts/ instead of the active runtime scripts in fullsend-ai/agents/scripts/. The human reviewer (waynesun09) closed the PR and re-filed the fix as agents repo issue #223. This is at least the 5th occurrence of this pattern (prior: PRs #2417, #2656, #2927, #2979, #3156). The code quality was high — the agent correctly ported platform detection with per-platform checksums, shasum fallback, and tests — but the entire code agent run was wasted because AGENTS.md does not document that post-scripts have migrated to the agents repo. Existing issue #3157 tracks adding this documentation but has not been implemented and its proposed text omits scripts/.

Proposals filed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review Triggers review agent dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

post-code.sh hardcodes linux_x64 gitleaks binary — fails on macOS with exit status 126

1 participant