-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Filter NODE_OPTIONS from env for file output #2775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@cory-miller @TingluoHuang I started seeing these errors on our worker (we set NODE_OPTIONS by writing to $GITHUB_ENV). Can you clarify why setting this envvar is not allowed? |
|
@cory-miller Our whole CI pipeline is failing since today morning due to this. We need to increase Node.js's memory and without it our commands are failing on OOMs. Up until this point setting I checked both PRs related to blocking The problem is that our deployments are blocked by this quite hidden change. And it took us a while to find this PR as well. There is no note about |
|
For the deprecated I will look at the docs and update them. |
…to website and snackager" This reverts commit d0b8c0b. Github does not allow setting `NODE_OPTIONS` through `$GITHUB_ENV`. See: actions/runner#2775
This reverts commit 3cbbcaf. GitHub does not allow setting `NODE_OPTIONS` through `$GITHUB_ENV`. See: actions/runner#2775
This reverts commit 3cbbcaf. GitHub does not allow setting `NODE_OPTIONS` through `$GITHUB_ENV`. See: actions/runner#2775
* refactor: upgrade workflows to node `18.17.1` * refactor: upgrade skaffold to node `18.17.1` * refactor: upgrade volta to node `18.17.1` * fix: add `NODE_OPTIONS=--openssl-legacy-provider` workaround to website and snackager * refactor: clean up `NODE_OPTIONS` workaround in workflows * Revert "refactor: clean up `NODE_OPTIONS` workaround in workflows" This reverts commit 3cbbcaf. GitHub does not allow setting `NODE_OPTIONS` through `$GITHUB_ENV`. See: actions/runner#2775
|
For anyone looking for a workaround, you can set the value as an output parameter and then set it as the env for each step that requires it. eg steps:
- name: Calculate NODE_OPTIONS
id: node_ops
run: |
MAX_OLDSPACE_SIZE_MB=8192
echo "val=--max-old-space-size=${MAX_OLDSPACE_SIZE_MB}" >> "$GITHUB_OUTPUT"
- name: Tests
run: npm run test
env:
NODE_OPTIONS: ${{steps.node_ops.outputs.val}} |
|
The workaround works. What is the threat model here? |
|
This workaround is not working for me anymore... :/ |
This is a bizarre security call. There are tons of ways to get arbitrary code execution if you can write to environmental variables. The security model expressly doesn't allow untrusted writing to env vars. Why would just this one environmental variable result in blacklist. And, are omissions from this blacklist now also considered security vulns by GitHub having patched just |
No, you can send report with other env variable leading to code execution, and they will not be considered as vulns. However, The special issue with |
|
I doubt that's the case. Why not just run the processes specified in the action without the variable? Why ambient |
|
It's weird, it's not really efficient. But this is the reason. It's also weird that "action/checkout" did not work when that env variable is badly set (especially that people may not be aware that checkout is done with node). I agree that (most?) env var should just not passed to action, they are "input" if we want to pass thing. |
This matches the deprecated command equivalent as seen here.