Repository navigation
Conversation
Collaborator
|
Thanks for tracing the single-quoted Problems
Suggested changes
Automated hermes-sweeper review. |
Collaborator
|
Salvaged onto current main in #92586 (your commit cherry-picked, authorship preserved) with two additions: the conflict resolution keeps main's newer .env-file-read gate in redact_terminal_output, and the repr key class was widened to mixed-case credential suffixes (UserPassword, sessionToken) per the same gap OpenHands fixed in software-agent-sdk#4508. Thanks @aerbaser — credit stays with you in the git history. #92586 will close this when it merges. |
RFingAdam
pushed a commit
to RFingAdam/hermes-agent
that referenced
this pull request
Aug 26, 2026
(cherry picked from commit 2af31a0)
teknium1
added a commit
that referenced
this pull request
Sep 14, 2026
teknium1
added a commit
that referenced
this pull request
Sep 14, 2026
Collaborator
QuixThe2nd
pushed a commit
to QuixThe2nd/hermes-ide
that referenced
this pull request
Sep 15, 2026
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 PR do?
Masks opaque credential values embedded in Python mapping
reproutput, including pytest/traceback shapes such as:Hermes already redacts
KEY=value, double-quoted JSON fields, known vendor prefixes, headers, URLs, and other credential forms. Pythonreprnormally uses single-quoted mapping fields, so an opaque value with no recognized vendor prefix bypassed bothredact_sensitive_text(..., force=True)and pytest diagnostic output.Before
After
The full value is replaced with
***rather than a head/tail mask. This prevents an escaped quote from being split at a masking boundary and keeps realrepr()output parseable for bothstrandbytesvalues.Design
api_key,access_token,client_secret,private_key, etc.);_API_KEY,_TOKEN,_PASSWORD, etc.).TOKEN_COUNT,AUTH_METHOD,PASSWORD_POLICY,SECRET_NAME, andCREDENTIAL_TYPEunchanged.bprefixes, and escaped characters.{'API_KEY': "os.getenv('OPENAI_API_KEY')"}.code_file=Truebyte-preserving.E ...) and final Python*Error/*Exception/*Warninglines. Ordinary source emitted bycat, Python scripts, or pytest remains unchanged.uv run pytest,poetry run pytest,coverage run -m pytest,/usr/bin/env pytest, etc.) behave consistently.force=Truebehavior; no new config or tool surface.Related work
hermes config show, but that report was closed as implemented through a config-specific structured path rather than the generic log/terminal redactor._JSON_FIELD_RE.No exact open issue/PR for generic Python mapping repr redaction was found.
Type of change
Verification
Additional synthetic verification:
str/bytesrepr oracle passed withast.literal_eval;All test values are synthetic; no real credentials are used.
Checklist
agent/redact.pyandtests/agent/test_redact.py