gstack icon indicating copy to clipboard operation
gstack copied to clipboard

fix: install redact pre-push guard safely

Open maxpetrusenkoagent opened this issue 5 months ago • 2 comments

Summary

  • make redact_prepush_hook prompt/yes/no instead of a hidden false default
  • add a TTY-gated, timeout-bounded setup prompt plus explicit setup flags for installing the local gstack-redact pre-push hook
  • fail closed when the pre-push hook cannot safely scan pushed git diffs
  • add coverage for GitLab, Hugging Face, npm, Bearer, and GCP service-account credential shapes

Fixes #1946.

Verification

  • PATH=/Users/maxsmacmini/.local/bin:/opt/homebrew/bin:/Users/maxsmacmini/.bun/bin:$PATH bun test test/gstack-config-redact-keys.test.ts test/redact-engine.test.ts test/redact-prepush-hook.test.ts test/setup-plan-tune-hooks-noninteractive.test.ts
  • Result: 92 pass, 0 fail

Notes

  • Fork branch is based on the fork default branch to avoid GitHub OAuth workflow-scope rejection while opening this PR. Merge-tree check against current upstream main showed no conflict markers.

maxpetrusenkoagent avatar Jun 10 '26 19:06 maxpetrusenkoagent

Merging to main in this repository is managed by Trunk.

  • [ ] To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

trunk-io[bot] avatar Jun 10 '26 19:06 trunk-io[bot]

Verification from Mac mini catch-up lane:

  • Focused tests: PATH=/Users/maxsmacmini/.local/bin:/opt/homebrew/bin:/Users/maxsmacmini/.bun/bin:$PATH bun test test/gstack-config-redact-keys.test.ts test/redact-engine.test.ts test/redact-prepush-hook.test.ts test/setup-plan-tune-hooks-noninteractive.test.ts
  • Result: 92 pass, 0 fail
  • Merge-tree check against current origin/main: no conflict markers found
  • Duplicate check: no existing PR found for issue #1946 before opening this draft

GitHub currently reports no status check suite for this draft PR; Trunk merge queue comment is present.

maxpetrusenkoagent avatar Jun 10 '26 19:06 maxpetrusenkoagent