Add tee handler that respects redirect rules#40
Merged
Conversation
Add redirect_targets field to Classification dataclass, allowing CLI handlers to specify file targets that should be checked against redirect rules. The analyzer checks all targets and requires all to match allow rules for approval. The tee handler extracts target files from tee commands and returns them as redirect_targets, enabling commands like `tee /tmp/out.txt` to be auto-approved when matching an `allow-redirect /tmp/*` rule.
orgoj
added a commit
to orgoj/Dippy
that referenced
this pull request
Jan 17, 2026
* commit '77d03a7': Fix docs consistency Update docs: core philosophy and config rename Remove CLAUDE.md Remove unused GEMINI_MODE and CURSOR_MODE Remove dead code from cli/ Allowlist philosophy and security hardening Add support for coproc and cond-expr constructs (ldayton#41) Make awk internal redirects respect redirect rules (ldayton#42) Add tee handler that respects redirect rules (ldayton#40) Check for command substitutions in arithmetic expressions (ldayton#39) Add support for negation and arith-cmd constructs (ldayton#38) Add MCP tool rules support (ldayton#37)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #31
Summary
redirect_targetsfield toClassificationdataclass for handlers to specify file targetsteehandler that extracts target files and returns them asredirect_targetsThis enables
tee /tmp/out.txtto be auto-approved when anallow-redirect /tmp/*rule is configured.