Skip to content

Pass external renderers a minimal environment - #18

Merged
andrew merged 1 commit into
mainfrom
minimal-renderer-env
Nov 23, 2026
Merged

andrew merged 1 commit into
mainfrom
minimal-renderer-env

Conversation

@andrew

@andrew andrew commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

External renderers (asciidoctor, rst2html, pod2html, rdoc and the rest) inherited the host process's whole environment, including any tokens or API keys in it. They render untrusted input, so anything that got one of them to print or read its environment would expose those values.

Commands now receive only an allowlist of variables: PATH, HOME, the temp directory and locale variables, TZ, and the Ruby, Python and Perl library path variables that an installed renderer may depend on.

A host that relies on some other variable to run its renderers will need it added to envAllowlist.

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9233040f-d1c5-43c1-a2b8-15d8f95a5874
Commits

Reviewing files that changed from the base of the PR and between 7df2dfe and cf33ffb.

Files selected for processing: 2

  • external.go
  • markup_test.go
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Renderers process untrusted input and have no need for the host's
credentials.
@andrew
andrew force-pushed the minimal-renderer-env branch from 3d82bdd to cf33ffb Compare November 23, 2026 09:26
@andrew
andrew merged commit 673da4d into main Nov 23, 2026
6 checks passed
@andrew
andrew deleted the minimal-renderer-env branch November 23, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant