git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 0/2] Revert defense-in-depth patches breaking Git LFS

From
Joey Hess <id@joeyh.name>
Date
May 24, 2024, 17:37 UTC
Message-ID
<ZlDQdXh5i3MCjTmr@kitenet.net>
In-Reply-To
<ZkO-b6Nswrn9H7Ed@tapette.crustytoothpaste.net>
brian m. carlson wrote:
Show 9 quoted lines
> > proposal was to introduce a way to cross-check the SHA-256 of hooks that
> > _were_ written during a clone operation against a list of known-good ones.
> > Another alternative was to special-case Git LFS by matching the hooks'
> > contents against a regular expression that matches Git LFS' current
> > hooks'.
> 
> I have replied to those on the security list and to the general idea.  I
> don't think we should special-case Git LFS here.  That's antithetical to
> the long-standing ethos of the project.

I was surprised today to find that git-annex also triggers the hook problem. In particular, a git clone that uses git-remote-annex can cause several hooks to get created.

I think the hook check is already scheduled for reversion, but in case not, here's another data point against hard-coding known-good hooks as a solution.

-- 
see shy jo
Previous: Jeff KingNext: Junio C Hamano
Message 13 of 14 in “Revert defense-in-depth patches breaking Git LFS”
  1. 0/2 Revert defense-in-depth patches breaking Git LFSbrian m. carlson, May 14, 2024
  2. 2/2 Revert "core.hooksPath: add some protection while cloning"brian m. carlson, May 14, 2024
  3. 1/2 Revert "clone: prevent hooks from running during a clone"brian m. carlson, May 14, 2024
  4. Johannes SchindelinMay 14, 2024
  5. brian m. carlsonMay 14, 2024
  6. Joey HessMay 22, 2024
  7. Johannes SchindelinMay 27, 2024
  8. Joey HessMay 28, 2024
  9. Jeff KingMay 29, 2024
  10. Johannes SchindelinMay 29, 2024
  11. Junio C HamanoMay 29, 2024
  12. Jeff KingMay 30, 2024
  13. Joey HessMay 24, 2024
  14. Junio C HamanoMay 28, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.