File: day_321__download_verification.mdwn

package info (click to toggle)
git-annex 8.20210223-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 68,764 kB
  • sloc: haskell: 70,359; javascript: 9,103; sh: 1,304; makefile: 212; perl: 136; ansic: 44
file content (13 lines) | stat: -rw-r--r-- 797 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
While at the DerbyCon security conference, I got to thinking about
verifying objects that git-annex downloads from remotes. This can be
expensive for big files, so git-annex has never done it at download time,
instead deferring it to fsck time. But, that is a divergence from git,
which always verifies checksums of objects it receives. So, it violates
least surprise for git-annex to not verify checksums too. And this could
weaken security in some use cases.

So, today I changed that. Now whenever git-annex accepts an object into
.git/annex/objects, it first verifies its checksum and size. I did add a
setting to disable that and get back the old behavior: `git config
annex.verify false`, and there's also a per-remote setting if you want to
verify content from some remotes but not others.