Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
what are the chances of a 'pre-upload' hook?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Sitaram Chamarty  
View profile  
 More options Nov 24 2011, 10:16 pm
From: Sitaram Chamarty <sitar...@gmail.com>
Date: Fri, 25 Nov 2011 08:46:45 +0530
Local: Thurs, Nov 24 2011 10:16 pm
Subject: what are the chances of a 'pre-upload' hook?
(...and/or a post-upload hook)

Has this ever come up?

--
Sitaram
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Fick  
View profile  
 More options Nov 24 2011, 10:18 pm
From: Martin Fick <mf...@codeaurora.org>
Date: Thu, 24 Nov 2011 20:18:23 -0700
Local: Thurs, Nov 24 2011 10:18 pm
Subject: Re: what are the chances of a 'pre-upload' hook?

Sitaram Chamarty <sitar...@gmail.com> wrote:
>(...and/or a post-upload hook)

>Has this ever come up?

 Yes, previously it was seen as problematic (potentially too slow), but we are now open to having one.  Patches welcome.  :)

Employee of Qualcomm Innovation Center,Inc. which is a member of Code Aurora Forum
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Fick  
View profile  
 More options Nov 24 2011, 10:22 pm
From: Martin Fick <mf...@codeaurora.org>
Date: Thu, 24 Nov 2011 20:22:58 -0700
Local: Thurs, Nov 24 2011 10:22 pm
Subject: Re: what are the chances of a 'pre-upload' hook?

>Martin Fick <mf...@codeaurora.org> wrote:
>Sitaram Chamarty <sitar...@gmail.com> wrote:

>>(...and/or a post-upload hook)

>>Has this ever come up?

>Yes, previously it was seen as problematic (potentially too slow), but
>we are now open to having one.  Patches welcome.  :)

Doh sorry, I thought this was a Gerrit question!  (Wrong mailing list)

Employee of Qualcomm Innovation Center,Inc. which is a member of Code Aurora Forum
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sitaram Chamarty  
View profile  
 More options Nov 24 2011, 11:13 pm
From: Sitaram Chamarty <sitar...@gmail.com>
Date: Fri, 25 Nov 2011 09:43:14 +0530
Local: Thurs, Nov 24 2011 11:13 pm
Subject: Re: what are the chances of a 'pre-upload' hook?

On Fri, Nov 25, 2011 at 8:46 AM, Sitaram Chamarty <sitar...@gmail.com> wrote:
> (...and/or a post-upload hook)

> Has this ever come up?

Sorry for the google-fu fail and for replying to my own post.
http://git.661346.n2.nabble.com/Removal-of-post-upload-hook-td4394312...
is the longest thread I (later) found.

The quick summary, in the words of Jeff (second post in that link) is:
"Because [upload]-pack runs as the user who is [fetching], not as the
repository owner. So by convincing you to [fetch from] my repository
in a multi-user environment, I convince you to run some arbitrary code
of mine."

My contention (today) is:

  - you're already taking that risk for push
  - so this would add a new risk only for people who fetch but don't push
  - which, I submit, is a very small (if not almost empty) set of people

I may be wrong but I imagine shared environments are those where
almost everyone will push at least once in a while.  It's a closed
group of people, probably all developers, etc etc etc...

Thanks for listening.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andreas Ericsson  
View profile  
 More options Nov 25 2011, 8:09 am
From: Andreas Ericsson <a...@op5.se>
Date: Fri, 25 Nov 2011 14:09:49 +0100
Local: Fri, Nov 25 2011 8:09 am
Subject: Re: what are the chances of a 'pre-upload' hook?
On 11/25/2011 05:13 AM, Sitaram Chamarty wrote:

People who fetch but don't push is, by far, the vast majority of git users.
Think of everyone fetching from any public software repository without
having write access to it. If you think of git.git and linux.git alone
I think it's safe to assume the number of "fetch-no-push" outnumber the
"push-and-whatnot" group by some quarter million to one.

> I may be wrong but I imagine shared environments are those where
> almost everyone will push at least once in a while.  It's a closed
> group of people, probably all developers, etc etc etc...

Not really. We fetch from each other quite a lot at work, and from
each others semi-public repositories on a shared server where we've
all got accounts (ie, write access), but we very, very rarely push
into each others repositories. The sharepoint is the "official" repo
on the repo-server, which the buildbots gets its code from and where
everything to be released, maintained or handled in some way in the
future resides.

Anyways. Shooting down the arguments *against* pre-upload hooks are
quite silly if it's not combined with some fresh arguments *for* such
a hook.

So... What usecase do you envision where you'd need one?

--
Andreas Ericsson                   andreas.erics...@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jeff King  
View profile  
 More options Nov 25 2011, 9:40 am
From: Jeff King <p...@peff.net>
Date: Fri, 25 Nov 2011 09:40:07 -0500
Local: Fri, Nov 25 2011 9:40 am
Subject: Re: what are the chances of a 'pre-upload' hook?

One thing to note is that this is _only_ an issue on systems where the
user running upload-pack (or receive-pack, for push) is not the same as
the user who owns the hooks directory. So basically two situations:

  1. Alice and Bob are developers on a multi-user system with ssh
     access. Alice will run "git fetch ~bob/project.git" or "git fetch
     alice@server:~bob/project.git". She executes Bob's hooks as
     herself on the server.

  2. Somebody runs a git:// server, locked down under a "git" user (or a
     smart-http server, under a "www" account).  If users of the service
     can write their own hooks, they will run as the "git" user.

But there are many situations that don't fall under this umbrella. In
(1), maybe Alice and Bob decide that they trust each other enough, and
the hook is more important than the security issue. In (2), users of the
service might not be able to write their own hooks (this is the case for
GitHub, and I assume also for Gerrit).

There should be a way for people who aren't in one of those dangerous
situations to be able to use a hook. The important thing is to set the
defaults in such a way that the people who _are_ in that situation
aren't left in a vulnerable situation.

The easiest way would be something like a "trust remote hooks"
environment variable, off by default. Admins in situation (2) could set
it for their git-daemon (or webserver, or whatever, or
gitolite-over-ssh), once they decided it was safe.

It could also help with (1), but I think you would need to take special
steps to propagate the variable in the "git fetch server:project.git"
case.

-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Sitaram Chamarty  
View profile  
 More options Nov 25 2011, 11:18 am
From: Sitaram Chamarty <sitar...@gmail.com>
Date: Fri, 25 Nov 2011 21:48:12 +0530
Local: Fri, Nov 25 2011 11:18 am
Subject: Re: what are the chances of a 'pre-upload' hook?

On Fri, Nov 25, 2011 at 6:39 PM, Andreas Ericsson <a...@op5.se> wrote:
> People who fetch but don't push is, by far, the vast majority of git users.
> Think of everyone fetching from any public software repository without
> having write access to it. If you think of git.git and linux.git alone
> I think it's safe to assume the number of "fetch-no-push" outnumber the
> "push-and-whatnot" group by some quarter million to one.

But in those environments the person pulling does not even have an ID
so how is he at risk with the hook running?

>> I may be wrong but I imagine shared environments are those where
>> almost everyone will push at least once in a while.  It's a closed
>> group of people, probably all developers, etc etc etc...

> Not really. We fetch from each other quite a lot at work, and from
> each others semi-public repositories on a shared server where we've
> all got accounts (ie, write access), but we very, very rarely push
> into each others repositories. The sharepoint is the "official" repo
> on the repo-server, which the buildbots gets its code from and where
> everything to be released, maintained or handled in some way in the
> future resides.

Yes, and this is the only situation where it does have the issue.  I'm
just not sure how common this is.

It's fine if you tell me I'm wrong and that this *is* still very
common.  I'll back off.

But everyone seems to be bringing in github and public repos as part
of the argument, and I don't see how they're relevant to the original
security issue of the guy who pulls having his account compromised.

> Anyways. Shooting down the arguments *against* pre-upload hooks are
> quite silly if it's not combined with some fresh arguments *for* such
> a hook.

> So... What usecase do you envision where you'd need one?

I'm writing a caching proxy that helps with bandwidth issues when too
many people in a bad-WAN site want to clone some huge repo from its
canonical site.  The only one I found by googling fiddles with the git
protocol itself, and I hate doing things like that.

Ignoring all the details, the pre-upload hook would have checked some
conditions and fired off a fetch from the remote site if those checks
passed.

It's easy enough to do it from cron but it would have been more
elegant this way.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »