From: Deskin Miller <deskinm@umich.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC PATCH 0/4] Teach git fetch to verify signed tags automatically
Date: Thu, 27 Nov 2008 19:09:11 -0500 [thread overview]
Message-ID: <20081128000606.GB2759@euler> (raw)
In-Reply-To: <7vmyfpn10v.fsf@gitster.siamese.dyndns.org>
On Sun, Nov 23, 2008 at 09:30:56PM -0800, Junio C Hamano wrote:
> Junio C Hamano <gitster@pobox.com> writes:
>
> > Deskin Miller <deskinm@umich.edu> writes:
> >
> >> It struck me a while back when I fetched a new tagged release from git.git that
> >> if I wanted to verify the tag's signature, I'd have to issue another command to
> >> do so. Shouldn't git be able to do that for me automatically, when it fetches
> >> signed tags? Now it does. Also, 'git remote update' gets this for free.
> >
> > I think this should be done inside your own hook. Not interested at all
> > in a solution to touch builtin-fetch.c, unless if the patch is about
> > adding a new hook so that people with other needs can use it as well.
>
> ... or a much stronger case can be made why this shouldn't be done in a
> hook.
>
> I realize "not interested at all" was a bit too strong, so I am trying to
> rephrase it here. The cycle that begins with an RFC that leads to
> discussion and review is about clarifying the rationale and design
> incrementally, so please do not get offended by my no, and sorry for using
> unnecessarily strong wording.
>
> What I meant was more like "The justification as given in the message does
> not interest me in the patch at all as it stands. I do not understand why
> this has to be done as a patch to git-fetch itself, not in a hook script,
> or why doing it inside git-fetch is a better approach than doing it in a
> hook (if there already is a hook mechanism to do this)".
Let's try this then:
-----
Despite core git's built-in support of cryptographic authentication and
integrity verification through the use of signed tags, git still fails
to provide a good first line of defense against malicious entities
hijacking repositories and disseminating arbitrary code, since git does
not try to verify signed tags at the time they are fetched. If such a
compromise occurred, the prospect of even one individual who did not
verify the newly-fetched tag prior to use gives this a large potential
value to attackers, and represents a commensurate risk to the git-using
community.
This patch series mitigates this risk by trying to verify each signed
tag when it is first fetched. Since, however, not everyone is concerned
with the security of signed tags, this feature tries to be conservative
insofar as signatures with public keys which are missing from the user's
keyring do not cause anything to be said about the tag's validity;
furthermore, a configuration variable exists to disable these checks
entirely, if desired.
-----
*the RFC patch series v1 does not include such a configuration variable.
I appreciate that such verification could be accomplished by the
as-yet-nonexistent post-fetch hook, and if that hook existed, I probably
would have done this in that hook. With that said, I do feel like this
feature merits consideration for inclusion in the builtin fetch code.
First, I very much agree with what Dscho said in his review of patch 1,
that hooks represent a rather more advanced feature of git than most
users are willing to investigate.
So the question, then, is whether this feature is important enough to
include in core git. I of course think that it is important enough.
Given that we have git-tag installed by default when one builds git,
there is a certain commitment to supporting the use of signed tags; and
I see verifying them when first fetched as a logical continuation of
this support. As such, a hook seems an unsuitable approach to provide
support for this new use of signed tags.
I'm happy to ask what suggestions you have for someone intending to
implement hooks around fetch; I've not looked at the code in this light,
but someone's got to do it sooner or later.
Deskin Miller
next prev parent reply other threads:[~2008-11-28 0:10 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-24 3:23 [RFC PATCH 0/4] Teach git fetch to verify signed tags automatically Deskin Miller
2008-11-24 3:23 ` [RFC PATCH 1/4] Refactor builtin-verify-tag.c Deskin Miller
2008-11-24 3:23 ` [RFC PATCH 2/4] verify-tag.c: ignore SIGPIPE around gpg invocation Deskin Miller
2008-11-24 3:23 ` [RFC PATCH 3/4] verify-tag.c: suppress gpg output if asked Deskin Miller
2008-11-24 3:23 ` [RFC PATCH 4/4] Make git fetch verify signed tags Deskin Miller
2008-11-24 10:44 ` Johannes Schindelin
2008-11-28 0:19 ` Deskin Miller
2008-11-24 11:04 ` [RFC PATCH 1/4] Refactor builtin-verify-tag.c Johannes Schindelin
2008-11-28 0:18 ` Deskin Miller
2008-11-24 4:53 ` [RFC PATCH 0/4] Teach git fetch to verify signed tags automatically Junio C Hamano
2008-11-24 5:30 ` Junio C Hamano
2008-11-28 0:09 ` Deskin Miller [this message]
2008-11-28 1:18 ` Johannes Schindelin
2008-11-24 10:41 ` Johannes Schindelin
2008-11-28 0:18 ` Deskin Miller
2008-11-28 1:43 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081128000606.GB2759@euler \
--to=deskinm@umich.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).