📮🔒 New post on the blog
No more tokens! Locking down npm Publish Workflows
https://www.zachleat.com/web/npm-security/
Includes a checklist of 8 important things you can do to improve your security footprint when using GitHub and npm.
Also posted to Bluesky.
16 replies
Thank you 🙏
@localnerve you’re welcome!
I know I need to read this, but I'm going to let npm completely removing token support and my nodemon deploys to start failing to actually get me off my arse to get around to it.
Future Rem is not impressed with Present Rem.
👆 THIS
oh no! 😱 Classic tokens are the only ones going away! I don’t think they’ll ever remove token support fully so elevated exposure will still be there 🫣
I should note if you don’t publish packages from your CI server the checklist would be shorter (basically require 2FA, restrict GitHub and npm to require 2FA): steps 1, 2, 4, and 6
have you figured out how to do a first release in ci? seems like you need to have published the package first before you can then set up trusted publishing right
yeah, afaik local publish with 2FA is still a super secure option and works fine. Locking down npm publishing access doesn’t prevent that (as long as 2FA is used and not tokens)
(but to be clear that first publish won’t be locked down at all because the package won’t exist and have settings that you can change 😅)
darn i really liked having every single publish automated and with provenance 🫠
yeah, fair point — I don’t think they care too much to secure packages that aren’t being used by anyone yet 😅
uh… a proper re-read of your question and the answer would be no 😅 I would just do a local publish and then set up my CI to be secure
@zachleat Ok but what did you do that makes the snowflakes only appear on some elements? Like headers but not body text? Some blend mode wizardry or *gasp* z-indexes?
@mottokrosh nothing magical — they are there. white snow on a white bg 😅
@zachleat I looked more closely, and can indeed see the snow on the body text occasionally. I guess since it's not so dense it simply isn't visible so much, whereas on larger dark areas it stands out more. Next time I'll examine more closely before yelling questions. :D
@mottokrosh no worries at all! happy to answer easy questions