r/github • u/kryakrya_it • May 12 '26
Question How do you harden GitHub Actions against npm install-time malware? TanStack issue
https://npmscan.com/vulnerability/GHSA-g7cv-rxg3-hmpxshort-lived credentials, permissions: read-all by default, no long-lived cloud keys, isolated runners, disabling scripts, and monitoring token usage.
7
Upvotes
6
u/drcforbin May 13 '26
Lock versions. I work in a regulated industry and we don't have the luxury of always installing the latest packages or saying >= on a version of something. When we want to upgrade something it has to be planned and deliberate, and involves a bunch of testing.
13
u/TomKavees May 12 '26 edited May 12 '26
There are many, many aspects to this but for starters:
Do not store tokens you do not absolutely positively have to. If you publish artifacts (e.g new versions of a library), set up OIDC workflows
Disable unattended update & publish workflows
pull_request_targettriggerpull_request_targettriggerThere are more aspects, but that's just the stuff off the top of my head. It's a shitshow out there.
3
u/Qs9bxNKZ May 12 '26
Actions runners don’t have access to the internet
1
u/Dependent-Net6461 May 13 '26
Dont use tanstack in your actions. Easy