mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-03 13:19:58 -05:00
A repo's .gitmodules is chosen by whoever controls the repo, so a submodule URL could make WROLPi fetch https://localhost:8443/..., https://10.0.0.1/..., etc. (SSRF), and show the response's error. Every submodule URL is now checked before git fetches it: relative URLs, the repo's own host, and hosts whose addresses are all public are allowed; anything else defers the download with the reason. Nested submodules are checked out one level at a time (instead of git's --recursive) so each level is checked, at most 5 levels deep. Submodule fetches do not follow HTTP redirects, so a checked host cannot redirect git into the network. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| test | ||
| __init__.py | ||
| api.py | ||
| conftest.py | ||
| downloader.py | ||
| errors.py | ||
| lib.py | ||
| models.py | ||
| schema.py | ||