Readit News logoReadit News
bramblerose · 3 months ago
I find the repeated deprecations on GitHub Actions frustrating to work with. One of the key goals of a build system is to be able to come back to a project after several years and just having the build work out of the box.

Yet with GHA I need to update actions/checkout@v2 to actions/checkout@vwhatever (or, what I'm doing now, actions/checkout@main because the actual API haven't actually changed) because... some Node version is "out of maintenance"?!

GHA is literally code execution as a service. Why would I care whether the Node runner has a security vulnerability?

toomuchtodo · 3 months ago
> GHA is literally code execution as a service. Why would I care whether the Node runner has a security vulnerability?

"Why do I care if there is a potentially insecure code interpreter in my arbitrary code execution service?"

As someone where appsec is a component of my work in financial services, please believe you should care.

burnt-resistor · 3 months ago
NPM package security is a far bigger problem than some ephemeral invocation that probably isn't under PCI-DSS or HIPAA and doesn't serve content to the wild interwebs. Amount of caring should be nuanced for the use-case rather than projecting blanket, absolutist declarations.
haskellshill · 3 months ago
I mean he's been running version 20 for years already, what's changed to make it now suddenly insecure?
nicoburns · 3 months ago
Surely 101 of "come back to a project and it still works unchanged" is "dont use proprietary hosted services"?
haskellshill · 3 months ago
As well as "don't use anything JS related"
danpalmer · 3 months ago
I think GitHub Actions is missing a distinction between builds and automation.

When I build my software I care less about eliminating security vulnerabilities (after all, I need to build while updating to fix security issues), but also don't need, or ideally don't want any external access. A vulnerability in the build toolchain should be encoded into the artifacts but shouldn't necessarily prevent artifacts being generated.

However when I automate processes, like categorising bugs etc, I care a lot about eliminating security vulnerabilities because there is necessary external access, often write access, to my sensitive data.

GitHub considers these two things the same, but they're distinct use-cases with distinct approaches to maintenance, updating, and security.

apatheticonion · 3 months ago
Then don't use the GitHub Actions defaults? Write your own Nodejs install script and use that instead.

That's what I do and it's pretty stable: https://github.com/alshdavid-templates/siteforge/blob/main/....

koolba · 3 months ago
Why both the pipe into sh and eval? The latter could handle all everything.

Couple more thoughts and unsolicited feedback from a quick eyeball:

- Use https://

- Wrap everything in a shell function to ensure that partial content is not executed.

- Wrap variable substitutions with "${OUTPUT_DIR}" to prevent arg splitting if they contain whitespace. Line 124, `rm -rf $OUT_DIR_INSTALL` is pretty scary if invoked with whitespace in OUT_DIR.

- Download nodejs tarball to temp directory and then extract them to prevent partial extraction

bramblerose · 3 months ago

   uses: actions/checkout@v4
That uses the Node that is provided by GitHub, and that will break in the future.

easton · 3 months ago
> Why would I care whether the Node runner has a security vulnerability?

I’m guessing they know you don’t care, but the big company customers cant have a CVE anywhere and won’t accept a EOL node version so they can check a box on something.

(I guess there’s also people with self hosted runners, who might be running them inside networks that aren’t segmented.)

Wowfunhappy · 3 months ago
Those are also the sorts of people who could pay for commercial support past the EOL date, no? (endoflife.date/nodejs indicates this exists.)
csomar · 3 months ago
> Why would I care whether the Node runner has a security vulnerability?

Because that "build" process has free access to your repo and potentially your organization. If your repo is also where you deploy from, then potentially deploying a vulnerable version of your software, live to your users.

turboponyy · 3 months ago
If that's something you care about, then don't define your CI build in terms of GitHub Actions steps. Instead, call your build that takes care of using whichever version of Node you want in CI.
solid_fuel · 3 months ago
Real question here - why is `actions/checkout` dependent on Node at all? Seems like we wouldn't need to be on `actions/checkout@v5` at all if it was just written in, say, shell.
madeofpalk · 3 months ago
You can host the GitHub actions runner yourself and decide which node versions you want to keep around
thiht · 3 months ago
Are you serious? Is updating dependencies and runners controversial somehow?

Just update your dependencies, it's not that hard. And it's even easier when you do it routinely as part of a deprecation planning.

rkagerer · 3 months ago
literally code execution as a service

As in, kills your old build code dead?

cryptonector · 3 months ago
Stuff rots even when you self-host just because of OS updates.
zenmac · 3 months ago
That's why we should have all the dependencies for the project in our own repo!

Then don't use Docker. You never know the image you are using will be outdated.

tuananh · 3 months ago
you use their shared runner, that's what you should expect.
tracker1 · 3 months ago
... then your infrastructure deployment keys leak as a result.
niffydroid · 3 months ago
I don't expect to come back after x years and a build system to work. You're very much at the mercy of multiple components in your stack and environment. For example you could be on a Mac and 2 years ago you were using x64, but now you are on ARM64. Whole load of stuff just breaks from that alone.
stackskipton · 3 months ago
Ops type here, something important to understand is Node is language the runner client uses so in particular, this is impactful for anyone building self-hosted runners and a will be a problem for anyone still writing Node 20 applications that just use self-hosted runner Node.
fisf · 3 months ago
And this is particularly painful, if you actually need to run, build, and test on old OS versions, that come with old Node versions.
sethops1 · 3 months ago
Just want to plug https://github.com/ChristopherHX/github-act-runner (not mine)

It's re-implementation of the GHA self-hosted runner in Go for self-hosted runners, based on the popular https://github.com/nektos/act for running GHA locally. Been using this for over a year now and it's been infinitely useful for CI on otherwise unsupported systems (e.g. freeBSD, openBSD in my case).

hamandcheese · 3 months ago
From the readme:

> Local Task Runner - I love make. However, I also hate repeating myself. With act, you can use the GitHub Actions defined in your .github/workflows/ to replace your Makefile!

This is ass backwards. Throwing out a tried and true build system in favor of a vendor-specific yaml format? Wtf? Just invoke make from your actions ffs.

wiether · 3 months ago
I 100% get the purpose of the `act` tool, but I don't get why they wrote this sentence around `make`.

The tool is here to run GHA tasks locally, period. It's not a replacement for a Makefile.

And I agree with you: use `make` in your actions!

If I want to make sense of the sentence, the only thing I can think of is that, before making this tool, they were using a Makefile locally to replicate the content of their GHA tasks.

zipy124 · 3 months ago
One annoying thing is you'd expect a company the size of microsoft to have an agreement for extended support. For example ubuntu 20.04 is no longer available as a runner on github actions as support ended in May of 2025, but extended support is available for a price until 2030. You'd think for a paid service they could pony up for a few licenses to keep things running, or provide an option for you to provide your own license.

Deleted Comment

Wowfunhappy · 3 months ago
> Node24 is incompatible with macOS 13.4 and lower versions.

...wait, really?

I have NodeJS 24 working all the way back on macOS 10.9 [1]. I realize official support is a very different thing, but I'm still surprised they can't do better than Ventura.

1: https://github.com/Wowfunhappy/Node-24-Mavericks/blob/master...

vintagedave · 3 months ago
Brilliant. I think very few people care about older OSes and this is magical to see.
esafak · 3 months ago
It's safe to use the LTS, which you can track here: https://endoflife.date/nodejs
OptionOfT · 3 months ago
Very sad they went from 20 to 24. No 22.

OTOH I've been moving from native NodeJS actions to packing them in a Docker container to separate code from compiled code.

If you wanted to use Typescript for your action you always had a 2 step process because GitHub Actions required you to pack dependencies with ncc or vite or webpack.

This packaged version was subsequently committed to the main branch.

Technically I could do a composite action where I compile the typescript on the fly, but that was fragile last time I tried it.

chrisweekly · 3 months ago
Yeah, strange to skip 22. If GHA is mandating 24, while other vendors like Netlify currently max out at 22, there isn't even overlap in an LTS version I can deploy to both places? Just, wat.
vinnymac · 3 months ago
Same for Vercel which doesn’t support 24 officially yet.

https://vercel.com/docs/functions/runtimes/node-js/node-js-v...

romellem · 3 months ago
Is there a specific part of Node 22 that isn’t there in Node 24?
mirekrusin · 3 months ago
Sadly docker actions can't be used in workflows that run on custom image (docker is not available in docker and making it available is an anti pattern) - they loose on their composability.
STRiDEX · 3 months ago
What are you doing that requires checking in the compiled version. Esbuild takes like one second
OptionOfT · 3 months ago
The code is written in typescript. So we go from

    * cloning the action 
    * running the dist/index.js
to

    * Cloning the action
    * npm install
    * npm compile
    * npm run