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

Re: [PATCH 2/4] trace2: redact passwords from https:// URLs by default

From
Jeff King <peff@peff.net>
Date
Nov 27, 2023, 21:50 UTC
Message-ID
<20231127215052.GD87495@coredump.intra.peff.net>
In-Reply-To
<CABPp-BELjVqVEB3oVx3fMzmvNfE1f7muLR_2k912_C+SaQtZtg@mail.gmail.com>
On Thu, Nov 23, 2023 at 10:59:20AM -0800, Elijah Newren wrote:
Show 10 quoted lines
> > Let's at least avoid logging such secrets via Trace2, much like we avoid
> > logging secrets in `http.c`. Much like the code in `http.c` is guarded
> > via `GIT_TRACE_REDACT` (defaulting to `true`), we guard the new code via
> > `GIT_TRACE2_REDACT` (also defaulting to `true`).
> 
> Training users is hard.  I appreciate the changes here to make trace2
> not be a leak vector, but is it time to perhaps consider bigger safety
> measures: At the clone/fetch level, automatically warn loudly whenever
> such a URL is provided, accompanied with a note that in the future it
> will be turned into a hard error?

Yes, the password in such a case ends up in the plaintext .git/config file, which is not great.

There's some discussion and patches here:
  https://lore.kernel.org/git/nycvar.QRO.7.76.6.1905172121130.46@tvgsbejvaqbjf.bet/
I meant to follow up on them, but never did.
-Peff
Previous: Elijah NewrenNext: Jeff Hostetler via GitGitGadget
Message 6 of 9 in “Redact unsafe URLs in the Trace2 output”
  1. 0/4 Redact unsafe URLs in the Trace2 outputJohannes Schindelin via GitGitGadget, Nov 22, 2023
  2. 1/4 trace2: fix signature of trace2_def_param() macroJeff Hostetler via GitGitGadget, Nov 22, 2023
  3. Junio C HamanoNov 23, 2023
  4. 2/4 trace2: redact passwords from https:// URLs by defaultJohannes Schindelin via GitGitGadget, Nov 22, 2023
  5. Elijah NewrenNov 23, 2023
  6. Jeff KingNov 27, 2023
  7. 3/4 t0211: test URL redacting in PERF formatJeff Hostetler via GitGitGadget, Nov 22, 2023
  8. 4/4 t0212: test URL redacting in EVENT formatJeff Hostetler via GitGitGadget, Nov 22, 2023
  9. Elijah NewrenNov 23, 2023

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.