-
Notifications
You must be signed in to change notification settings - Fork 5.8k
feat: --secret-env <env-var-name>
#31351
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
base: main
Are you sure you want to change the base?
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Tip 📝 Customizable high-level summaries are now available in beta!You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.
Example instruction:
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later. Comment |
--secret <env-var-name>--secret-env <env-var-name>
|
What if I have the following code: const { execSync } = require('node:child_process');
const secret = execSync('bash -lc \'printf "%s" "$secret"\'').toString();
console.log(secret); |
It will have the placeholder value. This is only for fetch headers atm. |
Experiment.
This allows for specifying environment variables that should be hidden from user code, but sent if contained in fetch headers.
For example, with the following code:
...main.ts won't see the
SECRET_VALUEof123, but instead will see a placeholder value. Then when the request is sent to say example.com containing that placeholder value it will be replaced with123.This has some obvious limitations like the environment variable value needing to actually be used in user code (ex. it's base64-ed or something).