git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* GIT Hooks and security
@ 2013-10-25 22:02 Olivier Revollat
  2013-10-25 22:14 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Olivier Revollat @ 2013-10-25 22:02 UTC (permalink / raw)
  To: git

I was wondering : What if I had a "malicious" GIT repository who can
"inject" code  via git hooks mechanism : someone clone my repo and
some malicious code is executed when a certain GIT hook is triggered
(for example on commit ("prepare-commit-msg' hook)) ? What if I email
/etc/passwd for exemple ?

Does GIT's hooks security is assured by the GIT user privileges ? but
git user can still read /etc/passwd and make something fun with it :)

Is it by the trust relationship ? I mean, If I clone a repo, I
certainly knew the source and I trusted it ... isn't it ?
But if I have a website with file injection vulnerability and I can
replace the git hook script with another (malicious) content ...

I'm maybe "paranoid" :) but I'm just asking the question ... just for
my curiosity's sake :)

Thanks for your comments and explanations :)

-- 

Mathematics is made of 50 percent formulas, 50 percent proofs, and 50
percent imagination.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-10-26  9:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-25 22:02 GIT Hooks and security Olivier Revollat
2013-10-25 22:14 ` Junio C Hamano
2013-10-25 22:25   ` Olivier Revollat
2013-10-26  0:17     ` Bryan Turner
2013-10-26  9:27       ` Olivier Revollat
2013-10-26  9:39         ` Ondřej Bílka

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).