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 07f1e638ee
annex.securehashesonly
Cryptographically secure hashes can be forced to be used in a repository,
by setting annex.securehashesonly. This does not prevent the git repository
from containing files with insecure hashes, but it does prevent the content
of such files from being pulled into .git/annex/objects from another
repository.

We want to make sure that at no point does git-annex accept content into
.git/annex/objects that is hashed with an insecure key. Here's how it
was done:

* .git/annex/objects/xx/yy/KEY/ is kept frozen, so nothing can be
  written to it normally
* So every place that writes content must call, thawContent or modifyContent.
  We can audit for these, and be sure we've considered all cases.
* The main functions are moveAnnex, and linkToAnnex; these were made to
  check annex.securehashesonly, and are the main security boundary
  for annex.securehashesonly.
* Most other calls to modifyContent deal with other files in the KEY
  directory (inode cache etc). The other ones that mess with the content
  are:
	- Annex.Direct.toDirectGen, in which content already in the
	  annex directory is moved to the direct mode file, so not relevant.
	- fix and lock, which don't add new content
	- Command.ReKey.linkKey, which manually unlocks it to make a
	  copy.
* All other calls to thawContent appear safe.

Made moveAnnex return a Bool, so checked all callsites and made them
deal with a failure in appropriate ways.

linkToAnnex simply returns LinkAnnexFailed; all callsites already deal
with it failing in appropriate ways.

This commit was sponsored by Riku Voipio.
2017-02-27 13:33:59 -04:00
Annex annex.securehashesonly 2017-02-27 13:33:59 -04:00
Assistant fix up Read instance incompatability caused by recent commit 2017-02-24 18:59:12 -04:00
Backend Removed support for building with the old cryptohash library. 2017-02-24 20:56:26 -04:00
Build fix up Read instance incompatability caused by recent commit 2017-02-24 18:59:12 -04:00
CmdLine add KeyVariety type 2017-02-24 15:16:56 -04:00
Command annex.securehashesonly 2017-02-27 13:33:59 -04:00
Config annex.autocommit can be configured via git-annex config 2017-02-03 13:58:53 -04:00
Database factor non-type stuff out of Key 2017-02-24 13:42:30 -04:00
debian remove cryptohash from debian build-dep option 2017-02-24 21:06:29 -04:00
doc Merge branch 'master' of ssh://git-annex.branchable.com 2017-02-26 14:55:11 -04:00
Git status: Pass --ignore-submodules=when option on to git status. 2017-02-20 17:01:24 -04:00
Limit matchexpression: New plumbing command to check if a preferred content expression matches some data. 2016-01-25 16:16:18 -04:00
Logs fix up Read instance incompatability caused by recent commit 2017-02-24 18:59:12 -04:00
Messages factor non-type stuff out of Key 2017-02-24 13:42:30 -04:00
P2P fix build on windows 2016-12-30 12:31:51 -04:00
Remote sync hack to make updateInstead work on eg FAT 2017-02-17 15:21:52 -04:00
RemoteDaemon Run ssh with -n whenever input is not being piped into it 2017-02-15 15:08:46 -04:00
standalone correct spelling mistakes 2017-02-12 17:30:23 -04:00
static Revert "remove newlines from static js and css" 2014-06-13 02:20:39 -04:00
templates improve description of password prompting 2016-12-28 16:07:49 -04:00
Types annex.securehashesonly 2017-02-27 13:33:59 -04:00
Upgrade add KeyVariety type 2017-02-24 15:16:56 -04:00
Utility Removed support for building with the old cryptohash library. 2017-02-24 20:56:26 -04:00
.ghci workaround for ghci fragility in reusing objects compiled with ghc 2012-10-20 16:20:42 -04:00
.gitattributes update changelog location 2016-08-22 23:54:11 -04:00
.gitignore fix man page building 2016-06-02 16:54:58 -04:00
.mailmap alias for Yaroslav @ yahoo to mailmap 2015-09-09 12:38:59 -04:00
Annex.hs annex.autocommit can be configured via git-annex config 2017-02-03 13:58:53 -04:00
Assistant.hs remove xmpp support 2016-11-14 14:53:08 -04:00
Backend.hs add KeyVariety type 2017-02-24 15:16:56 -04:00
bash-completion.bash fix bash completion of filenames containing spaces 2015-07-20 11:17:35 -04:00
build.bat let build.bat also be run from cygwin terminal 2015-04-21 14:12:14 -04:00
BuildFlags.hs remove xmpp support 2016-11-14 14:53:08 -04:00
CHANGELOG annex.securehashesonly 2017-02-27 13:33:59 -04:00
CmdLine.hs Make --json and --quiet suppress automatic init messages 2016-09-05 15:34:38 -04:00
Command.hs make query commands not output extraneous messages 2017-02-16 13:24:35 -04:00
Common.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
Config.hs annex.autocommit can be configured via git-annex config 2017-02-03 13:58:53 -04:00
COPYRIGHT copyright year update 2016-12-24 15:17:37 -04:00
Creds.hs finish git-annex enable-tor 2016-11-29 17:30:27 -04:00
Crypto.hs add KeyVariety type 2017-02-24 15:16:56 -04:00
ghci avoid tab warnings from ghc 8 2016-11-17 13:39:30 -04:00
git-annex.cabal Removed support for building with the old cryptohash library. 2017-02-24 20:56:26 -04:00
git-annex.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
git-union-merge.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
Git.hs Propigate GIT_DIR and GIT_WORK_TREE environment to external special remotes. 2016-05-06 12:26:44 -04:00
Jenkinsfile Add initial Jenkins pipeline script 2016-12-01 12:05:26 -04:00
Key.hs SHA1 collisions in key names was more exploitable than I thought 2017-02-24 19:54:36 -04:00
Limit.hs add KeyVariety type 2017-02-24 15:16:56 -04:00
Logs.hs config: New command for storing configuration in the git-annex branch. 2017-01-30 16:46:38 -04:00
Makefile fix osxapp target 2017-02-26 14:54:24 -04:00
Messages.hs Always use filesystem encoding for all file and handle reads and writes. 2016-12-24 14:46:31 -04:00
NEWS releasing package git-annex version 6.20170101 2016-12-31 23:59:56 -04:00
README use https 2014-11-06 14:20:10 -04:00
Remote.hs Some optimisations to string splitting code. 2017-01-31 19:06:22 -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 support for building with the old cryptohash library. 2017-02-24 20:56:26 -04:00
Test.hs add KeyVariety type 2017-02-24 15:16:56 -04:00
Types.hs remove module unused since switch to optparse-applicative 2016-01-21 12:59:50 -04:00
Upgrade.hs Avoid backtraces on expected failures when built with ghc 8; only use backtraces for unexpected errors. 2016-11-15 21:29:54 -04:00

git-annex allows managing files with git, without checking the file
contents into git. While that may seem paradoxical, it is useful when
dealing with files larger than git can currently easily handle, whether due
to limitations in memory, checksumming time, or disk space.

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