Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement code signing for plugins #275

Open
456dev opened this issue Feb 26, 2021 · 3 comments
Open

Implement code signing for plugins #275

456dev opened this issue Feb 26, 2021 · 3 comments
Labels
Enhancement New feature, request, or thing

Comments

@456dev
Copy link
Contributor

456dev commented Feb 26, 2021

Features

  • Support for importing plugins from a zip file (modules already support this)
  • Generate a private distribution key to sign build information and confirm it has been reviewed and is safe
  • Use a private developer key to confirm the author of the code to a developer
    • Think about how this should work with repositories and many contributors. author should sign off on module being published?
  • Publish a github action to automate building of plugin zip file (zip it up, code sign it using github secrets), trigger rest api of plugin distribution server with artifact (module) and public signed thing
    server should find find public cert url and verify authenticity of plugin zip.
  • Developer signs build, now malicious actor cant change file without invalidating dev cert signing
  • Publishes to distributor, distributor uses their private key to sign the build information, including module file hash. this prevents distributor of file information (mitm) the distributor should only sign file info if it is confirmed to be safe (after reviewing built code, and inspecting it for malice/TOS breaking stuff.
  • Needs to be a way to revoke the previous signing, say if bad code sneaks through there isn't a authentic but misleading signature,

Reasons

  • This prevents man in the middle attacks between the developer and the distribution server, and the distribution server and the user. it also prevents against a bad actor re-packing malicious code to pretend to be the dev, as they do not have the signing cert.
  • The single file zip plugin is to make it easy to download and sign.
  • The client should be able to verify both certs, and also trust custom ones.
  • It should follow the trust tree, starting with the official server signing cert. it should be the cert authority for trusting other distribution servers at different levels. also, import own cert authority allows for internal use, and for third parties

https://stackoverflow.com/questions/21122426/pgp-gpg-signed-python-code

@456dev 456dev added the Enhancement New feature, request, or thing label Feb 26, 2021
@Iapetus-11 Iapetus-11 changed the title plugins: impliment code signing Implement code signing for plugins Feb 26, 2021
@456dev
Copy link
Contributor Author

456dev commented Feb 26, 2021

Import processing
-> finds all plugins in a directory, stores as a list of paths to import
for each, call import with the extra hook. this extra hook verifys the developer signiture and the publisher/distrobution signiture. if either check fails, should either: warn the user, ask to continue
if debug mode: -> warn in console, contiue w/o prompt (maybe a config option just for plugin development, and documented that it reduces saftey/security)
if secure mode: reject plugin outright with error, require all plugins be signed.

@Sh-wayz
Copy link
Member

Sh-wayz commented Feb 26, 2021

@all-contributors add @the456gamer ideas

@allcontributors
Copy link
Contributor

@Sh-wayz

I've put up a pull request to add @the456gamer! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature, request, or thing
Projects
None yet
Development

No branches or pull requests

2 participants