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

Re: Is git clone followed by git verify-tag meaningful?

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Aug 28, 2019, 23:27 UTC
Message-ID
<20190828232718.GE11334@genre.crustytoothpaste.net>
In-Reply-To
<20190828203224.GE26001@chatter.i7.local>
On 2019-08-28 at 20:32:24, Konstantin Ryabitsev wrote:
Show 10 quoted lines
> Hi, all:
> 
> If I know that a project uses tag signing, would "git clone" followed by
> "git verify-tag" be meaningful without a "git fsck" in-between? I.e. if an
> attacker has control over the remote server, can they sneak in any badness
> into any of the resulting files and still have the clone, checkout, and
> verify-tag return success unless the repository is fsck'd before verify-tag?
> 
> I assume that it would break during the checkout stage, but I wanted to
> verify my assumptions.

We pass the entire tag buffer to GnuPG, which means that we verify exactly what is in the tag: no more, no less. Whether that represents a valid, usable tag with meaningful data is not verified, although of course it can't be changed once written.

If you trust the signer to produce valid data, then you can verify the tag and know that the data is correct. If not, then you probably need git fsck to verify that the data is usable and meets Git's standards.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Konstantin RyabitsevNext: Jeff King
Message 2 of 6 in “Is git clone followed by git verify-tag meaningful?”
  1. Konstantin RyabitsevAug 28, 2019
  2. brian m. carlsonAug 28, 2019
  3. Jeff KingAug 28, 2019
  4. Konstantin RyabitsevAug 29, 2019
  5. Jeff KingAug 29, 2019
  6. Junio C HamanoAug 29, 2019

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.