docs: document security issues around untrusted .git dirs
commite69ac42fcc866d3d6f84ea42bc656673440a07f5
authorJeff King <peff@peff.net>
Tue, 16 Apr 2024 08:52:13 +0000 (16 04:52 -0400)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 17 Apr 2024 20:29:57 +0000 (17 22:29 +0200)
treea8ec59fc23e05b5d9cc26e2454d3e41998c7b268
parent7b70e9efb18c2cc3f219af399bd384c5801ba1d7
docs: document security issues around untrusted .git dirs

For a long time our general philosophy has been that it's unsafe to run
arbitrary Git commands if you don't trust the hooks or config in .git,
but that running upload-pack should be OK. E.g., see 1456b043fc (Remove
post-upload-hook, 2009-12-10), or the design of uploadpack.packObjectsHook.

But we never really documented this (and even the discussions that led
to 1456b043fc were not on the public list!). Let's try to make our
approach more clear, but also be realistic that even upload-pack carries
some risk.

Helped-by: Filip Hejsek <filip.hejsek@gmail.com>
Helped-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Documentation/git-upload-pack.txt
Documentation/git.txt