feat: add net deploy mirror and gpg verification mirror - #1081
Neko-vecter wants to merge 12 commits into
Conversation
|
Thanks. Unfortunately this continues to expose the the same security vulnerability. An attacker with access to an instance could take an existing validated installation, change the mirror, then update to version with a malicious payload. There are ways to add support for "mirrors" outside of configuration options and I have began implementation. That said I have other items prioritized at the moment so I can't give a specific timeline as to when I will complete it and merge it. One interim option would be to create a simple local GitHub API compatible server that is an intermediary between Moonraker and your mirror, then configure your router to redirect |
|
Thanks for reply. I understand the issue you mentioned. I'm looking into how to sign files and add a GPG key to the server. The public key can be install during installation. (Integration with KIAUH is required) OR inside moonraker example
then use command below to verify. gpg --verify mainsail.zip.asc mainsail.zip-Neko.vecter |
|
Keychain Directory Structure -Neko.vecter |
Update 2026 / 06 / 26GPG support is done it will require maintainer at upstream to submit there public key to moonraker repo. under Important it only requires when use mirror. if not use mirror it will behave same as before. Relate issue for add gpg to release what next?move moonraker mirror config to -Neko.vecter |
|
打卡喵 |
|
I'd like to request a feature addition. As a beginner to 3D printing and Klipper, I found the installation process extremely tedious and difficult. |
|
A very useful feature PR |
Update 2026 / 06 / 27Add GPG Signature in workflow to mainsail Relate PR relate issue can be benefit -Neko.vecter |
|
hello |
Hi Eric, Is this really true though? With GPG protection the attacker would need access to the filesystem and not just the config. Provided the public key is embedded within the actual moonraker installation and not the config then an attacker could point the mirror to whatever drivel they want and it would always fail signing checks. For them to actually install a malicious instance they would need filesystem so that they can swap out the public key. If they have that then they have no reason to worry about an installation from a mirror, they already have all of the access privilege that they need. Luke. |
That comment was made before signature validation was proposed. It is true that signed zip files would mitigate the issue. I'm not opposed to adding support for signature validation, as its real use is to help mitigate potential security issues outside of Moonraker's control such as MITM attacks. However it needs to be added under the following conditions:
Also, while GPG signature validation could be a solution for for the types supported by Finally, I would just like to reiterate that I already have much of the work done to support GitHub mirrors. Since this work is done on my end, and I intend to merge it when it is ready, I won't likely merge PRs that add support for mirrors unless I am convinced it is superior to my own implementation. |
|
I have no problem signing the Mainsail release zip-file. The only condition from our side is that there's actually a mechanism in Moonraker that consumes and verifies the signature. We'd rather not ship So once the verification side is defined and where the public key is anchored, we will implement/merge it in the Mainsail release workflow. Just let me know the expected scheme and we'll wire up signing in our release workflow accordingly. |
|
Following up on adding mirror and gpg support for moonraker
|
This PR allow Moonraker net-deploy / webui can use mirror.
It also verify gpg key on mirror server
Add gpg key to moonraker.
Important
it only requires when use mirror. if not use mirror it will behave same as before.
project.zipexample mainsail.zipConfig example
it will show below info if you enable and set mirror.
Tip
if you want setup a mirror at home.
Neko-vecter/moonraker-mirror-toolkit
Keychain Directory Structure
Relate issue for add GPG to release
mainsail-crew/mainsail#2559
fluidd-core/fluidd#1893
-Neko.vecter