Replies: 4 comments 1 reply
-
I'm a 5, willing to be one of leaders, but my bandwidth is limited. I'll post that in the Slack as well, where the visual feedback takes place. |
Beta Was this translation helpful? Give feedback.
-
I'm a 1: Question: how exactly do we "copy our own I think some of the confusion between all of the posts talking about To clarify, I am a 4 on the spirit of the idea: we should be more strict with version pinning, I'm just not sure how it would work. |
Beta Was this translation helpful? Give feedback.
-
Thanks for that research! I see a number of concerns brought up.
I totally agree with 1. 2 is exactly what the previous plan would have hoped to address. Providing a 3 sounds like a great solution as long as we can figure out the workflow for it. I'll update the proposal to reflect following that thread instead. Edit:
Research My understanding of the flow so far:
Further research
The three rules I listed above conflict, so let's try again, summarizing 2016 https://stackoverflow.com/a/41103942/14144258:
That stackoverflow is very old, so I'm not sure how close current behavior is to that. More info:
We can't use our own shrinkwrap to update the user's shrinkwrap because our shrinkwrap won't include our own package. We'll have to get it from installing the latest version on a dependency. Note:
|
Beta Was this translation helpful? Give feedback.
-
When ready, folks should update their response to the proposal changes in Slack. |
Beta Was this translation helpful? Give feedback.
-
Quote from #532 (reply in thread)
Proposal: Explicitly use npm-shrinkwrap.json for us and our users
[Give your feedback in Slack pinned post. See fist to 5 process linked in Slack.]
We usenpm ci
instead ofnpm install
to install using ourpackage-lock.json
in both our repo for development and also in our user's packages through ouraction.yml
.Update from comment suggestion:
We create an npm-shrinkwrap.json and use that in place of
package-lock.json
in both our repo for development and also in our user's packages through ouraction.yml
.Problem
We need to align with what our users experience and possibly increase security.
Currently, our
action.yml
installs packages using onlypackage.json
meaning that our user's tests will use dependencies that are actually slightly different on every install (for every test).Do we want to use our own
package-lock.json
(exclusively) for both situations instead to increase security? Or do we want to remove ours completely?Note that just having a
package-lock.json
is not enough:Increase security
Have a
package-lock.json
and usenpm ci
to install files based on it. (From what I can tellnpm ci
is the right way)In our
action.yml
, we could copy our ownpackage-lock.json
. We'd usenpm ci
to install packages based on it. It would mean we would only be vulnerable when we update the lock file explicitly.We'd need to:
npm install
? I haven't been able to find a way.npm audit
more regularly perhaps?Research:
npm ci
instead ofnpm install
Some lock-file only flag(I think this was possibly never implemented)https://stackoverflow.com/a/46613465/14144258 (2017)Alternative: Remove
As an alternative, if we're not sticking to the package-lock.json I propose we get rid of our own and add it to the
.gitignore
so that we'll have an experience that's closer to the one our users have.Proposal History
2022/03/26
Beta Was this translation helpful? Give feedback.
All reactions