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

Ensure integrity checksums exist in lockfile for all npm packages #2153

Closed
4 of 8 tasks
patcon opened this issue Feb 25, 2022 · 3 comments · Fixed by #2414
Closed
4 of 8 tasks

Ensure integrity checksums exist in lockfile for all npm packages #2153

patcon opened this issue Feb 25, 2022 · 3 comments · Fixed by #2414
Assignees
Labels
infrastructure Related to Azure server infrastructure. security Related to app security.

Comments

@patcon
Copy link
Contributor

patcon commented Feb 25, 2022

npm packages have a content-specific "integrity" hash for all their contained files. This comes from the npmjs repository, and so if any files are different from what was in the package, then npm can notice. These integrity hashes are stored in package-lock.json.
https://docs.npmjs.com/cli/v6/configuring-npm/package-lock-json#integrity

Sometimes these are missing, and we should know when that happens.

This may involve:

  • a GitHub Action or npm package that checks for missing integrity hashes in package-lock.json during CI, or
  • some flag in npm that enforces strictness (??), or
  • all of the above, for added confidence

Related issue: npm/cli#4460

Related: No pressure to pollute our labels, but do you think it's worth having a security label to make security tasks more visible, @tristan-orourke?

To Do

@patcon patcon added the infrastructure Related to Azure server infrastructure. label Feb 25, 2022
@tristan-orourke
Copy link
Member

tristan-orourke commented Mar 3, 2022

do you think it's worth having a security label to make security tasks more visible

For sure @patcon, added the label!

@patcon
Copy link
Contributor Author

patcon commented Apr 25, 2022

Not sure how we want to handle this. Technically, this could be a collector issue for the remaining steps, but I understand if people want the endorphin rush of closing it, and we can treat those new tickets as standalone :)

@patcon
Copy link
Contributor Author

patcon commented Apr 25, 2022

Wondering if maybe this is helpful to show what we're trying to cover, that for some reason it seems npm cli is not doing for us right now: (we assume NPM website is trusted)

Item NPM <=> local cache <=> project folder
hash ~/.npm/foo/x.y.z/package/package.json package-lock.json
content ~/.npm/foo/x.y.z/package.tgz node_modules/foo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Related to Azure server infrastructure. security Related to app security.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants