Repository navigation
Conversation
tony
added a commit
that referenced
this pull request
Nov 21, 2026
why: The two entries named the neighbouring example pull request. what: - Cite #906 for the masking and redactor-setting entries
This was referenced Nov 21, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #906 +/- ##
==========================================
+ Coverage 57.66% 57.81% +0.15%
==========================================
Files 29 29
Lines 4360 4393 +33
Branches 882 890 +8
==========================================
+ Hits 2514 2540 +26
- Misses 1536 1542 +6
- Partials 310 311 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
tony
force-pushed
the
example/866-mask-all-opt-out
branch
2 times, most recently
from
November 21, 2026 22:09
1d37f7b to
112dcae
Compare
tony
added a commit
that referenced
this pull request
Nov 21, 2026
why: libtmux logs the full tmux command line on every DEBUG record and on errors, including the values of -e NAME=value and set-environment. The logging conventions already say to log environment variable names only. Typed keys and buffer data are left visible; masking them is a separate decision with two example PRs, #905 and #906. Part of #866. what: - Mask the value of -e NAME=value on the commands that take it, and the value of set-environment, in the logged command line; keep the variable names - Leave the command tmux runs unchanged - Test that names are logged, values are not, and tmux still stores the real value - Note the masking in the logging conventions, and record the fix under Fixes in CHANGES
tony
force-pushed
the
example/866-mask-all-opt-out
branch
5 times, most recently
from
November 23, 2026 02:55
a18c214 to
38195da
Compare
Member
Author
|
Side-by-side of #905 and #906, the two alternatives for the rest of #866 (after #898 masked environment values). Both are rebased onto master; the only conflict was CHANGES. What both do, from the same first commit:
#905, mask with no setting:
#906, mask by default, with a process-wide setting:
The decision: whether logging typed keys needs an escape hatch (#906) or masking is unconditional (#905). Both keep |
4 of 16 tasks
why: The logged tmux command line showed send-keys text and set-buffer data, so a password typed into a pane or copied into a buffer reached any DEBUG log handler. what: - Mask the key arguments of send-keys and the data argument of set-buffer in the logged command line; keep flags, targets, buffer names and send-keys -X copy-mode commands - Test that neither value is logged and tmux still stores the buffer - Note the masking in the logging conventions
why: Masking typed keys and buffer data by default hides what most readers of DEBUG logs look for, so an application needs a way to log them again, or to mask more. what: - Add set_argv_redactor() to replace the function that turns a tmux argument vector into the one that is logged; None restores the default - Add redact_argv() (the default) and redact_env_values() (environment values only) as ready-made redactors - Test replacing and restoring the redactor - Describe the setting in the logging conventions
why: Logged tmux command lines mask typed keys and buffer data by default, and callers can change that. what: - Add a Breaking changes entry for what logs now mask, with the migration - Add a What's new entry for set_argv_redactor and the ready-made redactors
tony
force-pushed
the
example/866-mask-all-opt-out
branch
from
November 24, 2026 01:48
38195da to
09ddf89
Compare
This branch has not been deployed
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.
Summary
send-keystext andset-bufferdata in the logged tmux command line by default.libtmux.common.set_argv_redactor()to replace the function that decides what is logged.redact_argv()(the default) andredact_env_values()(environment values only).Part of #866, on top of the merged #898. This branch includes #905's change plus the setting.
Usage
Passing
Nonerestores the default, andlistlogs the command line unmasked.Trade-offs
argv-redactionbranch, which madesend-keysmasking opt-in; here it is on by default.Test plan
test_set_argv_redactor_replaces_and_restores_the_default: with the environment-only redactor typed keys are logged and the token is not; afterNonetyped keys are masked again. It failed on the missing name before the changetest_logged_command_line_masks_keys_and_buffer_data: the default masks both valuesruff check,ruff format --check,mypy,just build-docs