Skip to content

docs(code-execution): document HERMES_* env narrowing + passthrough workaround#34594

Open
teknium1 wants to merge 1 commit into
mainfrom
docs/execute-code-hermes-env-passthrough
Open

docs(code-execution): document HERMES_* env narrowing + passthrough workaround#34594
teknium1 wants to merge 1 commit into
mainfrom
docs/execute-code-hermes-env-passthrough

Conversation

@teknium1

Copy link
Copy Markdown
Contributor

Why

The execute_code sandbox-child env scrub (landed in 108397726, hardening for #27303) deliberately removed the broad HERMES_ prefix passthrough, keeping only an operational 4-var allowlist:

HERMES_HOME, HERMES_PROFILE, HERMES_CONFIG, HERMES_ENV

This is correct hardening — the broad prefix leaked HERMES_*-named config that lacks a secret substring (HERMES_BASE_URL, HERMES_KANBAN_DB, HERMES_*_WEBHOOK) into arbitrary sandboxed code. But it's a silent behavior change: a script (or a repo/plugin module it imports at import time) that read a non-secret HERMES_* var outside those four now finds it unset in the child, with no doc explaining why.

What this adds

A ### HERMES_* variables in the child subsection in the code-execution docs covering:

  • The exact 4-var operational allowlist + the explicitly-injected RPC vars
  • A :::note Behavior change callout explaining the drop is intentional
  • The workaround, both routes:
    • terminal.env_passthrough in config.yaml (per-machine)
    • required_environment_variables in skill frontmatter (per-skill)
  • How to diagnose it: the existing debug log line (execute_code: dropped N non-allowlisted HERMES_* var(s)) and how to surface it via hermes logs --level DEBUG

Neither workaround weakens the secret-stripping guarantee — Hermes-managed provider credentials can never be re-allowed through env_passthrough (GHSA-rhgp-j443-p4rf).

Docs-only. No code change.

…orkaround

The execute_code sandbox-child env scrub (1083977, #27303) deliberately
dropped the broad HERMES_ prefix passthrough, keeping only an operational
4-var allowlist (HERMES_HOME/PROFILE/CONFIG/ENV). A script that relied on a
non-secret HERMES_* var (HERMES_BASE_URL, HERMES_KANBAN_DB, HERMES_*_WEBHOOK,
or a plugin-defined one) now sees it unset in the child.

Document the behavior change and the two recovery routes (terminal.env_passthrough
in config.yaml, or required_environment_variables in skill frontmatter), plus
the debug log line that surfaces the drop for diagnosis.
@alt-glitch alt-glitch added type/docs Documentation improvements P3 Low — cosmetic, nice to have tool/code-exec execute_code sandbox labels May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have tool/code-exec execute_code sandbox type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants