Skip to content

Add direnv style approval of running mdbook-check-code#5

Merged
ryanorendorff merged 2 commits intomainfrom
security
Oct 6, 2025
Merged

Add direnv style approval of running mdbook-check-code#5
ryanorendorff merged 2 commits intomainfrom
security

Conversation

@ryanorendorff
Copy link
Contributor

@ryanorendorff ryanorendorff commented Oct 6, 2025

Implements a direnv-style approval system requiring explicit user approval before executing compilers specified in book.toml, preventing automatic execution of arbitrary code from untrusted book configurations. The system uses SHA256 hash verification of the canonical path and file content (matching direnv's approach), stores approvals in platform-appropriate XDG directories, and adds four new CLI commands (allow, deny, status, list) to manage approvals. Only changes to book.toml require re-approval—markdown file changes do not.

@ryanorendorff ryanorendorff merged commit 5c39577 into main Oct 6, 2025
4 checks passed
@ryanorendorff ryanorendorff deleted the security branch October 6, 2025 22:47
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