Repository navigation
fix(hermes): mask kubectl cp and oc rsync read-backs (RIG-12066) - #244
Open
rigel-mintaka wants to merge 1 commit into
Conversation
Track copied pod paths and bounded local values per terminal session; limits fall back to destination path tracking. Registered values have at least eight characters, no whitespace, and a digit or symbol unless at least 20 characters. Over-masking of short structured values is accepted; a leak is not. Known limits: all-letter secrets under 20 characters and values containing whitespace are not registered; indirect reads can leak values from skipped files or after the value cap is reached. Non-local backends retain path tracking because their files are not host accessible. The read_file tool and background output are out of scope. Co-Authored-By: Matt Wilkinson <matt@rigel.build> Co-authored-by: Matt Wilkinson <matt@rigel.build>
Contributor
Author
|
All-clear at 67fec22 |
Contributor
Author
Review rounds 1-7 (RIG-12066)
|
This branch had an error being 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.
What does this do
Masks secret values that come back through a terminal read after
kubectl cporoc rsynccopies a file out of a pod.cat $(ls),xargsandgit diff.#text and padded base64 are registered.Why do we need it
Matt ruled (RIG-12066) to mask copied values rather than block the commands.
Summary
tools/terminal_tool*.py: records copy destinations and values per session; masks read-backs; writes an audit line without the value.Verification
a5ea3da1) is clean. Its probes mask every round-3, 5 and 6 leak on direct and indirect reads, andecho hellostays clear.Risks
Over-masking of short structured values, e.g.
kube-systemafter copying a Deployment. Known limits: all-letter values under 20 characters, values with whitespace, files over 64 KiB, and the full value cap. The read_file tool and background output are out of scope.Rollback: revert this commit.
Spec impact
Spec-impact: none.
Checks skipped:
nebula has no pre-push hook config; GitHub Actions ci.yaml runs its checksRefs RIG-12066
Co-authored-by: Matt Wilkinson matt@rigel.build