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

Re: What's cooking in git.git (Oct 2022, #06; Wed, 19)

From
Jeff King <peff@peff.net>
Date
Oct 22, 2022, 22:11 UTC
Message-ID
<Y1RqkMk4A8N6A38K@coredump.intra.peff.net>
In-Reply-To
<kl6lczalx8ox.fsf@chooglen-macbookpro.roam.corp.google.com>
On Fri, Oct 21, 2022 at 12:45:02PM -0700, Glen Choo wrote:
> However, if GIT_DIR is set by searching for the repo (e.g. by "git
> rev-parse --git-dir"), this just disables every safe.* protection. IIRC,
> you mentioned that this is exactly what Git.pm does, so as it is, yes
> this does leave us in a vulnerable state.

Thanks, that matches my understanding. I think Git.pm is vulnerable (but again, not in a released version because of the syntax error).

> If we are using `git rev-parse --git-dir`, maybe a reasonable solution
> would be to teach `rev-parse` to respect safe.* protections? e.g. `git
> rev-parse --git-dir --safe` could error out just like `git` in an unsafe
> repository.

rev-parse does work that way. It's just that Git.pm has some oddities. More discussion (with my analysis and a patch) in this other thread:

  https://lore.kernel.org/git/Y1Rp+7R7e+LFa5k6@coredump.intra.peff.net/
-Peff
Previous: Glen ChooNext: Taylor Blau
Message 8 of 9 in “What's cooking in git.git (Oct 2022, #06; Wed, 19)”
  1. Junio C HamanoOct 20, 2022
  2. Jeff KingOct 20, 2022
  3. Junio C HamanoOct 20, 2022
  4. pw/rebase-reflog-fixes (was Re: What's cooking in git.git (Oct 2022, #06; Wed, 19))Phillip Wood, Oct 20, 2022
  5. Michael McClimonOct 21, 2022
  6. Jeff KingOct 21, 2022
  7. Glen ChooOct 21, 2022
  8. Jeff KingOct 22, 2022
  9. tb/remove-unused-pack-bitmapTaylor Blau, Oct 21, 2022

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.