ChainSafe / ChainSafe/lodestar

Safer installation with npm of lodestar-cli

Open
#3,596 6 comments 0 reactions 0 assignees View on GitHub
good first issue help wanted meta-investigate prio-medium scope-security
Dominant language
TypeScript
Stars
1.4k
Forks
483
Avg merge
1d 16h
Merged PRs (30d)
150

Description

**Describe the bug**

Doing
```
npm lodestar-cli
```
is unsafe to dependency attacks, since the yarn.lock is not considered for dependency resolution.

**Expected behavior**

For npm installations, generate a package-lock.json (with https://github.com/imsnif/synp for example) and then generate a shrinkwrap file (see https://docs.npmjs.com/cli/v8/commands/npm-shrinkwrap). The shrinkwrap should take precedence on installation. This generation should happen in CI when publishing.

For yarn installations: investigate

- Related: https://github.com/ChainSafe/lodestar/issues/3470

**TODO**

To reduce the attack surface we should count who many individual authors we rely on and minimize that number and / or ensure we have a sufficient level of confidence towards them.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.