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

Re: General support for ! in git-config values

From
Jeff King <peff@peff.net>
Date
Feb 2, 2012, 02:38 UTC
Message-ID
<20120202023857.GA11745@sigill.intra.peff.net>
In-Reply-To
<CANgJU+WCdsF+igCWoueYcChYBvNyj5je_kvWorCBOgh5D7Bb9g@mail.gmail.com>
On Thu, Feb 02, 2012 at 02:57:14AM +0100, demerphq wrote:
Show 7 quoted lines
> > Not really.
> >
> > I do not think whatever "utility" value outweighs the hassle of having to
> > think through the ramifications (including but not limited to security) of
> > running arbitrary user command every time a value is looked up.
> 
> Why is that your problem? If I have to enable it then isn't that my choice?
>From a security perspective, you want to make sure that people who

aren't interested in your feature don't accidentally trigger it. E.g., imagine I currently run a locked-down git repo but execute some commands on your behalf, and I allow you to set a few "known safe" config options like user.email. Even though I am not interested in your feature, respecting "!rm -rf /" in the user.email you give me would be a bad thing.

It's not an insurmountable problem. There could be options to turn it on, or turn it off, or whatever. Or we could shrug and say that config is already dangerous to let other people set (which it is already, but only for some options). But those are the sorts of ramifications that need to be thought through.

(Another one is that with our current strategy, we actually read and parse the config files multiple times. Should your program get run many times?).

-Peff
Previous: demerphqNext: demerphq
Message 10 of 20 in “General support for ! in git-config values”
  1. Ævar Arnfjörð BjarmasonFeb 1, 2012
  2. Jeff KingFeb 1, 2012
  3. Ævar Arnfjörð BjarmasonFeb 1, 2012
  4. Junio C HamanoFeb 1, 2012
  5. demerphqFeb 2, 2012
  6. Junio C HamanoFeb 2, 2012
  7. demerphqFeb 2, 2012
  8. Junio C HamanoFeb 2, 2012
  9. demerphqFeb 2, 2012
  10. Jeff KingFeb 2, 2012
  11. demerphqFeb 2, 2012
  12. Jeff KingFeb 2, 2012
  13. demerphqFeb 2, 2012
  14. Kyle MoffettFeb 3, 2012
  15. Junio C HamanoFeb 3, 2012
  16. Kyle MoffettFeb 3, 2012
  17. Jeff KingFeb 3, 2012
  18. Jeff KingFeb 3, 2012
  19. Junio C HamanoFeb 2, 2012
  20. demerphqFeb 2, 2012

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.