Skip to content

fix(memory): probe gitleaks without shell builtin#1546

Open
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-gitleaks-direct-probe
Open

fix(memory): probe gitleaks without shell builtin#1546
jbetala7 wants to merge 1 commit into
garrytan:mainfrom
jbetala7:oss/fix-gitleaks-direct-probe

Conversation

@jbetala7
Copy link
Copy Markdown
Contributor

Fixes #1545

Summary

  • replace the shell-based command -v gitleaks availability check with a direct gitleaks version executable probe
  • pass the current env explicitly to both gitleaks execFileSync calls so PATH overrides are honored under Bun
  • add a regression with a fake gitleaks binary that proves the direct probe runs before detect

Collision checks

Testing

  • bun test test/gstack-memory-helpers.test.ts
  • bun test test/gstack-memory-ingest.test.ts --test-name-pattern "scan-secrets"
  • git diff --check

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: --scan-secrets treats gitleaks as missing when PATH probe uses command -v

1 participant