Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Signing packages #1749
Comments
purcell
added
the
feature
label
Jun 4, 2014
tzz
commented
Jun 4, 2014
|
Would you expect the Emacs side to have a way to verify those signatures, or will you expect users to trust your keys manually? |
|
I believe that |
|
the only thing we are saying though is that the package was created by our On Wed, Jun 4, 2014 at 10:10 AM, Steve Purcell notifications@github.com
|
tzz
commented
Jun 5, 2014
|
@purcell yes, it uses EPG/EPA to verify the signatures, but we've discussed adding the GNU ELPA maintainers' public keys to a default verification keychain, separate from the user's keychains. I was wondering if you have ideas about that, and yes it's entirely hypothetical. |
|
I'd be wary of adding a bunch of individual authors' signatures to a keychain that you'd then have to distribute, if that's the suggestion. Seems to me that users should simply be prompted to accept a key specific to each archive. |
tzz
commented
Jun 5, 2014
|
It wouldn't be individual keys but the signing key that was added. I mention this because there are some plans to add the GNU ELPA key to such a keychain. This was added to
...which means that, if this plan happens, you can instruct the user to add the MELPA key to that keychain instead of waiting for a prompt (in a multi-user system that would be especially sensible). Anyhow, I'm just bringing it up for your information, there's no action needed. |
|
Aha, okay, makes sense -- so that's just like the Debian APT key scheme. Thanks for the explanation. I wonder what would happen to those with old Emacs installations if you update the ELPA key, though. Debian can ship new authorized key signatures as packages, but ELPA wouldn't be able to. I guess the user would just be prompted if a new key was presented by ELPA. In a multi-user system with a shared Emacs installation, the packages would still be installed under |
chipdude
commented
Sep 4, 2014
|
ping? |
|
sorry, still on the backburner. |
tzz
commented
Oct 2, 2014
|
The emacs-24 branch now has everything in place, including the function Because the process uses the |
|
Thanks for the update Ted! |
glyph
commented
Jan 26, 2015
|
I'm a little confused as to what the proposed threat model is here. A signature is a cryptographic assertion of ... something. If a package is signed through MELPA, what exactly is being asserted about it? Has someone inspected the code? Does someone have some level of trust in the individual who has uploaded the package or committed to github? I definitely don't want to import a key into my GPG keyring that signs random stuff via an unmonitored, automated system that anyone can inject stuff into... Particularly, if a user has to accept new root signing keys on a regular basis, then part of the regular user experience is getting man-in-the-middled and hitting "OK, this is fine, update packages from this unknown and unexpected source". |
Nobody inspects the code which gets into MELPA, other than when recipes are first added. Like most package systems, we implicitly trust that authors will not introduce malicious code: building packages directly from those authors' version control systems is how we verify that the code is from the authors. (Other package repositories instead allow registered users - who may not be verified authors - to upload content.) Package signatures would indicate that the corresponding packages were built on our server using the recipes and the corresponding source fetched from upstream repositories, but they're no guarantee of safe content. Serving unsigned packages over SSL would provide a similar level of assurance to users, but users have experienced various issues since Marmalade switched to HTTPS, which makes me think that the signing route is worth investigating. Ultimately, we can serve signed packages over SSL, but when those packages are built from upstream sources, we can't guarantee their safety for users. |
glyph
commented
Jan 27, 2015
|
If you send packages over TLS, then the assurance is fairly clear: the trust roots are the more or less immutable CA cartel. This isn't the best, but at least it's consistent: users shouldn't ever accept a random trust root, and you know that you're always talking to MELPA at least. For a package-signing solution to provide a useful level of assurance, the trust roots must be similarly immutable, so directly trusting Melpa to be its own CA creates a bootstrapping problem. Presuming that you have some way of addressing the bootstrapping issue of getting the key to users in a way which doesn't transparently invite MITM of that step... If you don't inspect the code, then the trust path would presumably be something like: MELPA trusts github to properly authenticate the author, and the author to properly manage their credentials. Does that sound right? |
Correct, with the exception of the minority of upstream sources which are retrieved over http or other unsecured connections, e.g. CVS, SVN, EmacsWiki. (That last one will disappear over time as we phase it out, but it's currently a gaping security hole -- certain packages like dired+ are relatively popularly and freely editable on EmacsWiki.
Yes, with the exception of authors always having the ability to monkey-patch code in other packages. |
glyph
commented
Jan 27, 2015
Sure, but at that point you're talking about the runtime, not the bytes in the package itself. Plus, I'm sure nobody expects MELPA to fix the disaster that is elisp singlehandedly |
glyph
commented
Jan 27, 2015
Wow, that sounds like a super bad scene. Is there a checkbox in the package.el UI somewhere that says "this package is definitely malware, throw your computer in a lake"? |
glyph
commented
Jan 27, 2015
|
More seriously, would turning those package sources off entirely be an option? |
:-)
We're working on that. See #2342. At the moment there are non-Wiki packages which depend on Wiki-sourced packages, so there's some untangling to be done if we're to keep everything installable. Note that MELPA Stable doesn't contain any Wiki packages, but it also doesn't contain most of the non-Wiki packages, which means it's of limited utility to users as a sole package source (see also #1955)... |
glyph
referenced this issue
Aug 9, 2015
Open
start refusing to pull packages from unauthenticated upstreams #3004
|
Forgive the intrusion, but IIUC, there's nothing stopping a malicious actor from editing a wiki-sourced package to do something like run |
tzz
commented
Apr 5, 2017
|
I suggest moving MELPA to a pinned model against VCS-sourced packages, similar to how Docker operates their official repositories: https://docs.docker.com/docker-hub/official_repos/#how-can-i-get-involved (note the necessarily complex roles and process). If there's something Emacs can provide to help the work, great. But if there's things MELPA needs from volunteers, that should be clear as well. Right now this has been waiting for many months without any progress or plan, and the security risks are not just limited to the EmacsWiki-sourced packages. |
|
Long term, I dream of a system like Debian has, where new package versions would be put into an I do realize that this would be a major restructuring under-the-hood. But for users, it might be doable in a transparent way: just create an Not sure how the existing MELPA Stable would fit into this scheme. In a way it could almost obsolete it, but I'd still prefer to keep tagged versions available. |
|
MELPA Stable is the way to go, but that will only gain traction if the "regular" MELPA is discontinued, which will probably never happen. Many packages in the Emacs world (some of mine included) aren't "released" in any meaningful way and people are just expected to run whatever is on master. This is terrible and I'm now trying to release my packages in more reasonable manner. But the culture in Emacsland is just so terrible that you would have to inconvenience many many people to inflict some change, and that is something peolpe are unwilling to do (eventhough MELPA now has basically a monopol and smart people running it who could dictate meaningful change). There are still many problems with it like serving only the latest version (maybe this is package.el problem?) so rollbacks or support for multiple emacs Versions are impossible (and dependency conflicts can happen which will destroy your setup). The fact that users update their packages rather unfrequently and don't much need reproducability also doesn't help much, because nobody values things like locking enough to implement it (package.el only included package name locking in e25, so we'll wait 2 more releases for version locking). Sometimes I wonder why not just copy some "modern" package solution like npm/yarn or composer... |
|
Not npm, please! D: And PHP scares me... Everything else I agree with. ;) Seriously though, you're right that most package authors don't release packages in a serious, versioned way. Sad but true. So if that's the reality that we have to work with, what about the unstable->testing idea? Making up numbers here, if 10% of the MELPA users being on I guess the chief problem with the idea is, as you said, the lack of version pinning. If package A is updated to work with breaking changes in package B, and package A migrated to I guess there's not much that can be done until we get version pinning. Even then, as long as we're using made-up, date-based version numbers, there doesn't seem to be much of a way to guarantee that packages that depend on each other will have compatible versions installed. Maybe, theoretically, MELPA could somehow track the date-based versions and try to migrate packages together, but just thinking about how it might work seems like it would lead to a combinatorial explosion of complexity when confronted with the whole archive. Another possibility (though still not very appealing): when we get working version pinning, interested volunteers could maintain a kind of "overlay" or "virtual" repo on top of MELPA which would point to specific versions of packages that would be known to be compatible and relatively bug-free. Actually, I guess that could be done now using, e.g. Quelpa, which can pin specific commits of each package. The end result would be sort of like how Debian works, with a middleman bringing sanity and compatibility to the wild world of independently developed software. That actually seems like a fairly workable solution, technically. The problem would of course be the human effort required to maintain it. |
purcell
referenced this issue
Apr 16, 2017
Open
Keep/build old package versions in MELPA Stable #4712
We're open to doing that where it makes sense, but don't forget that our time is limited. While version pinning seems like a prerequisite, we could start by building & keeping older versions of packages in MELPA Stable, which might help drive upstream/3rd-party support for pinning. I've filed #4712 to track this, so please take any related discussions over there. |
kirk86
commented
Aug 22, 2017
|
Hi guys, can someone verify this for me:
I just updated emacs and now every time that I refresh the packages I get the following message. Previously I didn't used to get this message. |
|
@kirk86 This bug is about signing packages, not the TLS cert for the MELPA site. Your problem is most likely not specific to MELPA either, but probably an issue with your system cert store or with the way your Emacs package was put together. This is probably a distro-level issue, or an issue with your personal config outside of Emacs. |
kirk86
commented
Aug 23, 2017
•
|
@alphapapa yeah you're right upon closer look I found that this was related to |
purcell commentedJun 4, 2014
It's possible to provide
.sigsignatures for packages. We should do that, if reasonably convenient, because recent versions ofpackage.elare requesting the.sigfiles from our server anyway.