Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

RC npm: do not recommend publishing from CI #13

Closed
ljharb opened this issue May 9, 2022 · 2 comments
Closed

RC npm: do not recommend publishing from CI #13

ljharb opened this issue May 9, 2022 · 2 comments

Comments

@ljharb
Copy link
Member

ljharb commented May 9, 2022

Automation publish tokens are explicitly one-factor, which imo is less secure than publishing directly from a dev's laptop.

If npm supported staged builds, then publishing a staged build from CI, and then a human using 2FA locally to "promote" it, would be the most secure way to publish - but lacking that, the best I think we can get is using CI to generate a tagged release commit, and then having a publisher locally download it, run npm install or npm ci, and npm publish.

@lumjjb
Copy link

lumjjb commented May 11, 2022

I think what you say is true for some scenarios. I do think that this is a little more nuanced, depending on the use cases and environment/setup.

Having strong authentication (including 2fa) and tightly scoped tokens implemented for the request of the release pipeline would provide a similar (and if some cases, stronger - by allowing de-privileging builders) trust model.

However, I do agree that there is definitely a nice QOL in being able to take a look of the release that comes out before finalization it. I think there is a place for it.

Depending on how the api around CI releasing is done, I think generalizing it as "less secure" is a bit too strong of a statement.

@jeffmendoza
Copy link
Member

Closed with #27

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants