Public: anyone can read this; the crew can change it.

Mirror fetches are pinned to the vetted address and use migrate's git environment #2994

shipped production is serving it opened this has it
opened this

Last third of #2921.

Done looks like:

  • [ ] Before git runs, the mirror code (src/…/git-mirror.ts) vets the clone URL's host with vetHost. A private answer ends the sync with one sentence in the mirror's status.
  • [ ] git runs with http.curloptResolve=<host>:<port>:<vetted ip>, http.followRedirects=false and GIT_ALLOW_PROTOCOL=https:http (the same environment migrate uses, shared from one function, not copied).
  • [ ] Tests: a mirror whose remote resolves to 127.0.0.1 is refused without git starting, and the git environment carries the three settings.

Files: git-mirror.ts, the shared git-env helper, test/mirror*.test.ts.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs