CI to automate build of cargo lockfiles on different Alpine releases for git-annex aports https://gitlab.alpinelinux.org/alpine/aports/-/tree/master/community/git-annex
Find a file
Joey Hess af0d854460
deal with git's changes for CVE-2022-24765
Deal with git's recent changes to fix CVE-2022-24765, which prevent using
git in a repository owned by someone else.

That makes git config --list not list the repo's configs, only global
configs. So annex.uuid and annex.version are not visible to git-annex.
It displayed a message about that, which is not right for this situation.
Detect the situation and display a better message, similar to the one other
git commands display.

Also, git-annex init when run in that situation would overwrite annex.uuid
with a new one, since it couldn't see the old one. Add a check to prevent
it running too in this situation. It may be that this fix has security
implications, if a config set by the malicious user who owns the repo
causes git or git-annex to run code. I don't think any git-annex configs
get run by git-annex init. It may be that some git config of a command
does get run by one of the git commands that git-annex init runs. ("git
status" is the command that prompted the CVE-2022-24765, since
core.fsmonitor can cause it to run a command). Since I don't know how
to exploit this, I'm not treating it as a security fix for now.

Note that passing --git-dir makes git bypass the security check. git-annex
does pass --git-dir to most calls to git, which it does to avoid needing
chdir to the directory containing a git repository when accessing a remote.
So, it's possible that somewhere in git-annex it gets as far as running git
with --git-dir, and git reads some configs that are unsafe (what
CVE-2022-24765 is about). This seems unlikely, it would have to be part of
git-annex that runs in git repositories that have no (visible) annex.uuid,
and git-annex init is the only one that I can think of that then goes on to
run git, as discussed earlier. But I've not fully ruled out there being
others..

The git developers seem mostly worried about "git status" or a similar
command implicitly run by a shell prompt, not an explicit use of git in
such a repository. For example, Ævar Arnfjörð Bjarma wrote:
> * There are other bits of config that also point to executable things,
>   e.g. core.editor, aliases etc, but nothing has been found yet that
>   provides the "at a distance" effect that the core.fsmonitor vector
>   does.
>
>   I.e. a user is unlikely to go to /tmp/some-crap/here and run "git
>   commit", but they (or their shell prompt) might run "git status", and
>   if you have a /tmp/.git ...

Sponsored-by: Jarkko Kniivilä on Patreon
2022-05-20 14:38:27 -04:00
Annex deal with git's changes for CVE-2022-24765 2022-05-20 14:38:27 -04:00
Assistant assistant prompt pushing of manual commits to remotes 2022-03-31 13:02:16 -04:00
Backend convert Key to ShortByteString 2021-10-05 20:20:08 -04:00
Build assume @RPATH libs are present 2022-01-03 15:05:15 -04:00
CmdLine prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
Command make fsck normalize object locations 2022-05-16 15:38:06 -04:00
Config enable filter.annex.process in v9 2022-01-21 13:11:18 -04:00
Database read up to and including maxPointerSz 2022-02-23 12:54:40 -04:00
debian remove vendored http-client-restricted 2022-03-22 11:50:06 -04:00
doc response 2022-05-20 13:17:44 -04:00
Git deal with git's changes for CVE-2022-24765 2022-05-20 14:38:27 -04:00
Limit fix longstanding indeterminite preferred content for duplicated file problem 2021-05-24 14:07:05 -04:00
Logs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
Messages factor out Utility.Aeson.textKey 2022-03-02 18:24:06 -04:00
P2P fix handling of corrupted data received from git remote 2022-01-07 13:25:33 -04:00
Remote fix untrustworthiness of import/export remotes 2022-05-09 15:53:23 -04:00
RemoteDaemon remove support code for ancient git-annex-shell version 2021-10-11 16:07:08 -04:00
standalone Removed the NetworkBSD build flag 2022-03-22 11:52:52 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates cache the serialization of a Key 2019-11-22 17:49:16 -04:00
Test remove git-annex test runner segfault workarounds 2022-05-18 16:45:27 -04:00
Types incremental verification for retrieval from import remotes 2022-05-09 15:39:43 -04:00
Upgrade avoid creating content directory when locking content 2022-05-16 12:34:56 -04:00
Utility avoid setEnv while testing gpg 2022-05-18 16:05:11 -04:00
.ghci turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore stack.yaml: Updated to lts-16.10 2020-08-24 14:11:37 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs turn of PackageImports in cabal file 2022-02-25 13:16:36 -04:00
Assistant.hs assistant: Fix a crash on startup by avoiding using forkProcess 2021-05-12 15:08:03 -04:00
Backend.hs remove unused imports 2021-10-05 21:27:06 -04:00
bash-completion.bash bash completion fix 2018-11-12 13:23:05 -04:00
Benchmark.hs --size-limit exit 101 2021-06-04 16:43:47 -04:00
BuildFlags.hs Removed the S3 and WebDAV build flags 2020-09-08 12:42:59 -04:00
BuildInfo.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
CHANGELOG deal with git's changes for CVE-2022-24765 2022-05-20 14:38:27 -04:00
CmdLine.hs --size-limit exit 101 2021-06-04 16:43:47 -04:00
Command.hs addon commands 2021-02-02 16:32:49 -04:00
Common.hs finish fixing removeLink on windows 2020-11-24 13:20:44 -04:00
Config.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
COPYRIGHT bump year for Utility/* 2022-05-04 11:40:25 -04:00
Creds.hs avoid getting creds from environment during autoenable 2021-03-17 09:41:12 -04:00
Crypto.hs avoid setEnv while testing gpg 2022-05-18 16:05:11 -04:00
git-annex.cabal hah, I mean 0504 of course 2022-05-04 11:47:40 -04:00
git-annex.hs include git-annex-shell back in 2019-12-02 11:51:52 -04:00
git-union-merge.hs update licenses from GPL to AGPL 2019-03-13 15:48:14 -04:00
Git.hs reinject: Fix crash when reinjecting a file from outside the repository 2021-10-01 14:06:34 -04:00
Key.hs convert Key to ShortByteString 2021-10-05 20:20:08 -04:00
Limit.hs prevent numcopies or mincopies being configured to 0 2022-03-28 15:20:34 -04:00
Logs.hs filter-branch working aside from some edge cases 2021-05-17 13:24:58 -04:00
Makefile switch from hothasktags to hasktags 2022-03-24 13:29:40 -04:00
Messages.hs simplify and speed up Utility.FileSystemEncoding 2021-08-11 12:13:31 -04:00
NEWS complete annex.skipunknown transition 2022-02-18 13:18:05 -04:00
README improve description 2022-01-06 12:24:27 -04:00
Remote.hs factor out Utility.Aeson.textKey 2022-03-02 18:24:06 -04:00
Setup.hs Added git-remote-tor-annex, which allows git pull and push to the tor hidden service. 2016-11-21 17:27:38 -04:00
stack.yaml Removed the NetworkBSD build flag 2022-03-22 11:52:52 -04:00
Test.hs avoid setEnv while testing gpg 2022-05-18 16:05:11 -04:00
Types.hs plumb VerifyConfig into retrieveKeyFile 2021-08-17 12:43:13 -04:00
Upgrade.hs add upgrade.log 2022-01-19 15:52:29 -04:00

git-annex allows managing large files with git, without storing the file
contents in git. It can sync, backup, and archive your data, offline
and online. Checksums and encryption keep your data safe and secure. Bring
the power and distributed nature of git to bear on your large files with
git-annex.

For documentation, see doc/ or <https://git-annex.branchable.com/>