Git development
 help / color / mirror / Atom feed
* [RFC] Optional per-repository consent before running local hooks
@ 2026-09-29  4:23 Dmytro Lymarenko
  2026-09-29 18:27 ` Junio C Hamano
  2026-09-29 21:32 ` brian m. carlson
  0 siblings, 2 replies; 3+ messages in thread
From: Dmytro Lymarenko @ 2026-09-29  4:23 UTC (permalink / raw)
  To: git

I’d like to propose an optional safety setting for Git hooks. When
enabled, Git would check for an active hook before running it in a
repository that the user has not approved. It would show the hook’s
path and ask whether to run it once, trust the current hooks for this
repository, or decline.
This would help when a tool or setup step installs hooks from files
supplied by a project. The check should happen immediately before
execution, so it also covers hooks installed after a repository was
cloned. For scripts inside the working tree, Git should ask again if
the approved script changes.
The default behavior could remain unchanged, with this protection
enabled by an explicit user setting.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-09-29 21:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29  4:23 [RFC] Optional per-repository consent before running local hooks Dmytro Lymarenko
2026-09-29 18:27 ` Junio C Hamano
2026-09-29 21:32 ` brian m. carlson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox