Skip to content

chore: remove pre-push from default install hook types#11072

Merged
puchy22 merged 2 commits intomasterfrom
chore/remove-pre-push-hooks
May 7, 2026
Merged

chore: remove pre-push from default install hook types#11072
puchy22 merged 2 commits intomasterfrom
chore/remove-pre-push-hooks

Conversation

@puchy22
Copy link
Copy Markdown
Member

@puchy22 puchy22 commented May 7, 2026

Context

Pre-push hooks were running every push, slowing down the developer workflow even for routine pushes. The only check we still want enforced before pushing is secret detection (trufflehog); everything else (formatters, linters, security scanners) already runs at pre-commit time.

Description

  • Drop pre-push from default_install_hook_types so prek install only registers pre-commit hooks by default.
  • Keep trufflehog declared with stages: ["pre-commit", "pre-push"] so it remains available when developers opt in to the pre-push hook type (prek install --hook-type pre-push).
  • Minor formatting cleanup: collapse a few multi-line args / files mappings onto single lines for readability.
  • Update docs/developer-guide/introduction.mdx with a new Enable TruffleHog as a Pre-Push Hook subsection documenting the opt-in prek install --hook-type pre-push workflow.

No runtime behavior of Prowler changes — this only affects local developer tooling.

Steps to review

  1. Inspect the diff in .pre-commit-config.yaml and docs/developer-guide/introduction.mdx.
  2. Reinstall hooks locally:
    poetry run prek install
  3. Confirm only pre-commit is installed:
    ls -la .git/hooks/ | grep -E 'pre-(commit|push)'
  4. Optionally enable trufflehog on push (per the new docs section):
    poetry run prek install --hook-type pre-push
  5. Verify a normal git push no longer triggers the previous pre-push hook chain, and that with the opt-in installed, TruffleHog runs on push.
  6. Render docs/developer-guide/introduction.mdx and confirm the new subsection appears under Pre-Commit Hooks.

Checklist

Community Checklist
  • This feature/issue is listed in here or roadmap.prowler.com
  • Is it assigned to me, if not, request it via the issue/feature in here or Prowler Community Slack

SDK/CLI

  • Are there new checks included in this PR? No

UI

  • N/A

API

  • N/A

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

- Drop pre-push from default_install_hook_types so only pre-commit hooks run by default
- Keep trufflehog declared with pre-push stage so it remains available when pre-push is installed
- Collapse multi-line args/files mappings for readability
@puchy22 puchy22 requested a review from a team as a code owner May 7, 2026 09:12
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

✅ All necessary CHANGELOG.md files have been updated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 7, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

- Document `prek install --hook-type pre-push` to enable TruffleHog secret scanning before push
@puchy22 puchy22 merged commit 71683f3 into master May 7, 2026
22 checks passed
@puchy22 puchy22 deleted the chore/remove-pre-push-hooks branch May 7, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants