mapbox / mapbox/node-pre-gyp

Sign packages and verify signature on install

Open
#202 0 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.2k
Forks
271
Avg merge
23h 40m
Merged PRs (30d)
2

Description

Currently packages are just placed on S3 and the bucket restrictions are the only guarantee that the packages is not modified by a third-party.

In almost all cases we only want the build server to be able to place pre-build binaries there. If a third party modifies the package on purpose or by accident we want to know about this.
Similar if the package is modified in transit (MITM) we want to be able to detect that.

The usual way of doing this is through signing packages (or rather the checksum). This is a mechanism that is implemented in almost every package manager, for the reasons above.

Technical challenges:
1. Each publisher (read CI of a repository) needs its own GPG key.
2. Each client needs to know about the public GPG key of the publisher to verify the signature.
3. The client needs to obtain the public key from a trusted source

Possible solutions:
1. Store private GPG key in secure variable in travis and import on publishing.
2. Assume public key is bundled in NPM package.
3. Bundled with the published `npm` package: Assumption you trust the npm -> client transport: We do so anyway otherwise you could just change the S3 path in the package.

/cc @mikemorris

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how node-pre-gyp publishes pre-built packages to S3 and how clients install them. Review the proposed CI GPG key handling and how a trusted public key could be bundled with the npm package. Done means published packages are signed and installation detects modified packages.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
release, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.