Skip to content

Fix activation PATH shadowing - #609

Merged
alecthomas merged 3 commits into
masterfrom
fix-dx-27
Aug 13, 2026
Merged

Fix activation PATH shadowing#609
alecthomas merged 3 commits into
masterfrom
fix-dx-27

Conversation

@alecthomas

@alecthomas alecthomas commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

Prevent Hermit's own activation helpers from resolving through an environment bin directory that has already been prepended to PATH. The activation templates invoke /bin/date, the launcher uses Bash's OSTYPE instead of uname, and basename is invoked by its trusted system path.

Adds unit coverage for the affected activation paths and an integration regression proving a repository-provided bin/date passes validation but is not executed during bash or zsh activation.

Co-authored-by: Codex noreply@openai.com

alecthomas and others added 3 commits August 13, 2026 13:50
Use trusted system helper paths because environment bin directories are prepended before activation completes, allowing committed executables to shadow date, uname, or basename.

Co-authored-by: Codex <noreply@openai.com>
Add an integration regression test proving that a repository-provided bin/date is accepted by validation but not executed while Hermit activates the environment.

Co-authored-by: Codex <noreply@openai.com>
Use Bash OSTYPE so the launcher identifies macOS and Linux without executing a PATH-shadowable helper whose absolute location differs by platform. Record only the final canary and stable launcher hashes.

Co-authored-by: Codex <noreply@openai.com>
@alecthomas
alecthomas merged commit 400dd4d into master Aug 13, 2026
8 checks passed
@alecthomas
alecthomas deleted the fix-dx-27 branch August 13, 2026 04:04
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