Automated NPM secret rotation in GitHub Actions
michaelheap.com·7w
Preview
Report Post

NPM recently announced that all long-lived tokens are being revoked, and that going forwards any new tokens may be valid for a maximum of 90 days.

This presents a challenge for me, as I’ve built a system where when I tag a release on GitHub in my JavaScript projects, it builds and publishes to NPM using an access token. Rotating those tokens regularly would be a lot of toil.

Upgrading to OIDC

The correct way to solve this is to adopt trusted publishing (OIDC). However, I don’t have time to update all of my projects right now. I’d like to keep using an access token until I have time to update each project.

Rotating GitHub Actions user secrets at scale

Fortunately, back in 2020 I was feeling the pain of rotati…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help