Skip to content

fix(hooks): use strings for binary file scanning in pre-push#577

Open
John-David Dalton (jdalton) wants to merge 1 commit intomainfrom
fix/hooks-strings-binary-scanning
Open

fix(hooks): use strings for binary file scanning in pre-push#577
John-David Dalton (jdalton) wants to merge 1 commit intomainfrom
fix/hooks-strings-binary-scanning

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

Summary

  • Use strings command for binary files (WASM, .lockb, etc) instead of raw grep to properly detect embedded paths and secrets
  • Guard strings/cat command substitutions with || echo "" to prevent set -e silent abort if strings is not installed (e.g. minimal Docker/CI images)

Test plan

  • Verify pre-push hook runs without error on normal push
  • Verify hook correctly scans binary files for embedded secrets

Use strings command for binary files (WASM, .lockb, etc) instead of
raw grep to properly detect embedded paths and secrets. Guard with
|| echo "" to prevent set -e abort if strings is not installed.
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.

1 participant