git-annex/doc
Joey Hess 28720c795f
limit url downloads to whitelisted schemes
Security fix! Allowing any schemes, particularly file: and
possibly others like scp: allowed file exfiltration by anyone who had
write access to the git repository, since they could add an annexed file
using such an url, or using an url that redirected to such an url,
and wait for the victim to get it into their repository and send them a copy.

* Added annex.security.allowed-url-schemes setting, which defaults
  to only allowing http and https URLs. Note especially that file:/
  is no longer enabled by default.

* Removed annex.web-download-command, since its interface does not allow
  supporting annex.security.allowed-url-schemes across redirects.
  If you used this setting, you may want to instead use annex.web-options
  to pass options to curl.

With annex.web-download-command removed, nearly all url accesses in
git-annex are made via Utility.Url via http-client or curl. http-client
only supports http and https, so no problem there.
(Disabling one and not the other is not implemented.)

Used curl --proto to limit the allowed url schemes.

Note that this will cause git annex fsck --from web to mark files using
a disallowed url scheme as not being present in the web. That seems
acceptable; fsck --from web also does that when a web server is not available.

youtube-dl already disabled file: itself (probably for similar
reasons). The scheme check was also added to youtube-dl urls for
completeness, although that check won't catch any redirects it might
follow. But youtube-dl goes off and does its own thing with other
protocols anyway, so that's fine.

Special remotes that support other domain-specific url schemes are not
affected by this change. In the bittorrent remote, aria2c can still
download magnet: links. The download of the .torrent file is
otherwise now limited by annex.security.allowed-url-schemes.

This does not address any external special remotes that might download
an url themselves. Current thinking is all external special remotes will
need to be audited for this problem, although many of them will use
http libraries that only support http and not curl's menagarie.

The related problem of accessing private localhost and LAN urls is not
addressed by this commit.

This commit was sponsored by Brett Eisenberg on Patreon.
2018-06-16 11:57:50 -04:00
..
Android
android
assistant
automatic_conflict_resolution
backends
bare_repositories
benchmarking close bug; copy benchmarking info to new page 2017-10-31 13:13:40 -04:00
bugs close old bug 2018-06-15 14:44:32 -04:00
coding_style
contribute
copies
design add GETINFO to external protocol (for ronnypfa) 2018-06-08 11:56:24 -04:00
devblog devblog 2018-05-08 16:37:45 -04:00
direct_mode
download
ekg
encryption Added a comment: headless configs 2018-05-17 21:02:32 +00:00
footer
forum Added a comment 2018-06-13 17:18:49 +00:00
future_proofing
git-annex-add Added a comment: Sounds great! 2018-05-21 18:09:35 +00:00
git-annex-addurl response 2018-05-30 12:31:24 -04:00
git-annex-adjust answer 2017-11-07 16:22:25 -04:00
git-annex-config response 2018-03-06 13:40:00 -04:00
git-annex-copy
git-annex-direct
git-annex-drop
git-annex-enableremote
git-annex-importfeed
git-annex-move
git-annex-preferred-content
git-annex-reinject
git-annex-unannex
git-annex-undo
git-annex-unused
how_it_works
install Add install page for Guix 2018-06-01 14:37:08 +00:00
internals response 2018-02-22 12:59:44 -04:00
license
links
metadata
news add news item for git-annex 6.20180529 2018-05-29 13:07:19 -04:00
not
polls
preferred_content response 2018-04-04 12:24:32 -04:00
required_content
scalability
special_remotes limit url downloads to whitelisted schemes 2018-06-16 11:57:50 -04:00
stickers
sync
templates
testimonials
thanks update 2018-06-04 10:22:13 -04:00
tips limit url downloads to whitelisted schemes 2018-06-16 11:57:50 -04:00
todo limit url downloads to whitelisted schemes 2018-06-16 11:57:50 -04:00
trust
tuning response 2017-08-28 13:41:19 -04:00
upgrades
use_case
users fix plan list and add sorting annex diagram/explanation 2018-04-04 08:53:37 +00:00
videos
walkthrough response 2018-03-02 15:10:51 -04:00
Android.mdwn
assistant.mdwn
automatic_conflict_resolution.mdwn
backends.mdwn Added backends for the BLAKE2 family of hashes. 2018-03-13 16:23:42 -04:00
bare_repositories.mdwn
benchmarking.mdwn close bug; copy benchmarking info to new page 2017-10-31 13:13:40 -04:00
bugs.mdwn limit rss/atom feeds to 10 pages to avoid enormous files 2017-09-29 12:42:09 -04:00
builds.mdwn windows autobuilder no longer firewalled 2017-10-16 15:07:51 -04:00
chunking.mdwn
coding_style.mdwn
comments.mdwn
contact.mdwn
contribute.mdwn
copies.mdwn
design.mdwn
devblog.mdwn
direct_mode.mdwn
distributed_version_control.mdwn
download.mdwn
ekg.mdwn
encryption.mdwn
favicon.ico
forum.mdwn limit rss/atom feeds to 10 pages to avoid enormous files 2017-09-29 12:42:09 -04:00
future_proofing.mdwn Fixed typo: "repisitory" 2017-11-02 20:39:05 +00:00
git-annex-add.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-addunused.mdwn
git-annex-addurl.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-adjust.mdwn
git-annex-assistant.mdwn
git-annex-calckey.mdwn
git-annex-checkpresentkey.mdwn
git-annex-config.mdwn annex.merge-annex-branches 2018-02-22 14:25:32 -04:00
git-annex-contentlocation.mdwn
git-annex-copy.mdwn remove the older move --force, which never behaved as documented and seems useless 2018-05-21 13:21:19 -04:00
git-annex-dead.mdwn
git-annex-describe.mdwn
git-annex-diffdriver.mdwn improve 2018-02-06 13:45:14 -04:00
git-annex-direct.mdwn
git-annex-drop.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-dropkey.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-dropunused.mdwn
git-annex-edit.mdwn
git-annex-enable-tor.mdwn
git-annex-enableremote.mdwn
git-annex-examinekey.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-expire.mdwn
git-annex-export.mdwn Support exporttree=yes for rsync special remotes. 2018-02-28 13:36:20 -04:00
git-annex-find.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-findref.mdwn
git-annex-fix.mdwn
git-annex-forget.mdwn
git-annex-fromkey.mdwn
git-annex-fsck.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-fuzztest.mdwn
git-annex-get.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-group.mdwn
git-annex-groupwanted.mdwn document that multiple groupwanted are not combined 2018-06-12 12:44:53 -04:00
git-annex-import.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-importfeed.mdwn convert importfeed to youtube-dl 2017-11-29 17:30:02 -04:00
git-annex-indirect.mdwn
git-annex-info.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-init.mdwn .noannex file 2017-12-13 14:34:32 -04:00
git-annex-initremote.mdwn
git-annex-inprogress.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-list.mdwn
git-annex-lock.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-log.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-lookupkey.mdwn
git-annex-map.mdwn
git-annex-matchexpression.mdwn
git-annex-matching-options.mdwn
git-annex-merge.mdwn
git-annex-metadata.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-migrate.mdwn
git-annex-mirror.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-move.mdwn remove the older move --force, which never behaved as documented and seems useless 2018-05-21 13:21:19 -04:00
git-annex-multicast.mdwn
git-annex-numcopies.mdwn
git-annex-p2p.mdwn
git-annex-post-receive.mdwn
git-annex-pre-commit.mdwn
git-annex-preferred-content.mdwn document that multiple groupwanted are not combined 2018-06-12 12:44:53 -04:00
git-annex-proxy.mdwn
git-annex-readpresentkey.mdwn
git-annex-registerurl.mdwn
git-annex-reinit.mdwn
git-annex-reinject.mdwn
git-annex-rekey.mdwn
git-annex-remotedaemon.mdwn
git-annex-repair.mdwn
git-annex-required.mdwn fsck: Warn when required content is not present in the repository that requires it. 2018-02-08 14:08:41 -04:00
git-annex-resolvemerge.mdwn
git-annex-rmurl.mdwn
git-annex-schedule.mdwn
git-annex-semitrust.mdwn
git-annex-setkey.mdwn
git-annex-setpresentkey.mdwn setpresentkey: Added --batch support (for ronnypfa) 2018-05-27 14:56:14 -04:00
git-annex-shell.mdwn GIT_ANNEX_SHELL_APPENDONLY 2018-05-25 13:17:56 -04:00
git-annex-smudge.mdwn
git-annex-status.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-sync.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex-test.mdwn add links 2017-11-09 11:34:53 -04:00
git-annex-testremote.mdwn add links 2017-11-09 11:34:53 -04:00
git-annex-transferkey.mdwn
git-annex-transferkeys.mdwn
git-annex-trust.mdwn
git-annex-unannex.mdwn
git-annex-undo.mdwn
git-annex-ungroup.mdwn
git-annex-uninit.mdwn
git-annex-unlock.mdwn better doc for --json-error-messages 2018-02-19 15:33:59 -04:00
git-annex-untrust.mdwn
git-annex-unused.mdwn
git-annex-upgrade.mdwn
git-annex-vadd.mdwn
git-annex-vcycle.mdwn
git-annex-version.mdwn
git-annex-vfilter.mdwn
git-annex-vicfg.mdwn
git-annex-view.mdwn
git-annex-vpop.mdwn
git-annex-wanted.mdwn
git-annex-watch.mdwn
git-annex-webapp.mdwn
git-annex-whereis.mdwn document the -A shorthand for --all 2018-04-03 23:12:04 -04:00
git-annex.mdwn limit url downloads to whitelisted schemes 2018-06-16 11:57:50 -04:00
git-remote-tor-annex.mdwn
git-union-merge.mdwn
how_it_works.mdwn
index.mdwn
install.mdwn Add Guix to the installation instructions, as there is now package available! 2018-06-01 14:38:16 +00:00
internals.mdwn change export.log format to support multiple export remotes 2017-09-12 17:45:52 -04:00
license.mdwn
location_tracking.mdwn
logo-old-bw.svg
logo-old.png
logo-old.svg
logo-old_small.png
logo.mdwn
logo.svg
logo_16x16.png
logo_32x32.png
logo_small.png
meta.mdwn
metadata.mdwn
news.mdwn
not.mdwn Update boar link 2018-01-12 01:15:23 +00:00
polls.mdwn
preferred_content.mdwn
privacy.mdwn
publicrepos.mdwn Added datalad "super-dataset". 2017-09-05 17:00:38 +00:00
related_software.mdwn link to recastex 2018-04-06 11:27:18 -04:00
repomap.png
required_content.mdwn fsck: Warn when required content is not present in the repository that requires it. 2018-02-08 14:08:41 -04:00
scalability.mdwn
shortcuts.mdwn
sidebar.mdwn
sitemap.mdwn
special_remotes.mdwn Added adb special remote which allows exporting files to Android devices. 2018-03-27 14:54:41 -04:00
stickers.mdwn
submodules.mdwn
summary.mdwn
sync.mdwn
testimonials.mdwn
thanks.mdwn updates 2018-01-02 16:28:33 -04:00
tips.mdwn
todo.mdwn limit rss/atom feeds to 10 pages to avoid enormous files 2017-09-29 12:42:09 -04:00
transferring_data.mdwn
trust.mdwn
tuning.mdwn
upgrades.mdwn add backticks so asterisks are visible 2018-03-27 16:26:06 +00:00
users.mdwn
videos.mdwn
Void.mdwn
walkthrough.mdwn
workflow.mdwn