feat: `--secret-env <env-var-name>`
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:
> SECRET_VALUE=123 deno run --secret-env SECRET_VALUE --allow-net=example.com main.ts
...main.ts won't see the SECRET_VALUE of 123, 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 with 123.
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).
[!IMPORTANT]
Review skipped
Draft detected.
Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.You can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.
โจ Finishing touches
๐งช Generate unit tests (beta)
- [ ] Create PR with unit tests
- [ ] Post copyable unit tests in a comment
[!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.
- Provide your own instructions using the
high_level_summary_instructionssetting.- Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
- Use
high_level_summary_in_walkthroughto move the summary from the description to the walkthrough section.Example instruction:
"Divide the high-level summary into five sections:
- ๐ Description โ Summarize the main change in 50โ60 words, explaining what was done.
- ๐ References โ List relevant issues, discussions, documentation, or related PRs.
- ๐ฆ Dependencies & Requirements โ Mention any new/updated dependencies, environment variable changes, or configuration updates.
- ๐ Contributor Summary โ Include a Markdown table showing contributions:
| Contributor | Lines Added | Lines Removed | Files Changed |- โ๏ธ Additional Notes โ Add any extra reviewer context. Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."
Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.
Comment @coderabbitai help to get the list of available commands and usage tips.
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);
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.