What creates/updates the hacs.repositories file?

After dusting off my HA instance earlier today, I noticed HACS was failing to load. The logs indicated there was an invalid character at a specific position in the hacs.repositories file, preventing the service from being able to parse the. Sure enough, at that position there was some garbled text which I deleted, and the service was subsequently restored.

But before I did that, I tried to reinstall HACS (I even removed the hacs.repositories file and then re-installed HACS), but it never attempted to give me a “good” version of this file.

So where does this come from, when/how is it updated, and is it possible for me to force an update?