Skip to content

fix(integrations): mask credentials on the hermes capture path - #1764

Merged
phernandez merged 2 commits into
basicmachines-co:mainfrom
k0nnect:hermes-credential-masking
Oct 14, 2026
Merged

phernandez merged 2 commits into
basicmachines-co:mainfrom
k0nnect:hermes-credential-masking

Conversation

@k0nnect

@k0nnect k0nnect commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

fixes #1650

hermes writes user + assistant text into session notes verbatim, so a key pasted into a message (or quoted from tool output) ends up in the note as-is. tau already masks this with public_text() in integrations/tau/privacy.py; hermes had nothing.

  • copies tau's credential patterns into the hermes plugin as _public_text(). the plugin installs and loads as a single module, so it carries its own copy (same idea as the shared schemas)
  • masks on every capture write: per-turn transcript, the cached first user message, and the session-end summary
  • masks before _truncate, so a private key longer than the 4000 char cap can't lose its END line and slip through unmatched
  • adds a test that fails if the hermes copy ever drifts from tau's patterns
  • also closes two gaps in the shared patterns (flagged in review), in both tau and hermes: bearer / assignment values are masked before bare tokens, so Bearer sk-.../suffix can't leave the suffix behind, and quoted field names like {"password": "..."} are caught

tested: hermes test recipe (293 passed), tau test recipe (ty + 78 passed), manifest-check, ruff check + format. the new masking tests fail on main and pass with this change

openclaw and pi (typescript) aren't touched here

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T08:05:17.850493Z 3e1364b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@CLAassistant

CLAassistant commented Oct 13, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3e1364b35d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread integrations/hermes/__init__.py Resolved
Comment thread integrations/hermes/__init__.py Resolved
@phernandez

Copy link
Copy Markdown
Member

Thanks @k0nnect !

@k0nnect

k0nnect commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @k0nnect !

np! basic memory cloud has been a lifesaver in my workflows

@phernandez
phernandez merged commit 08dd273 into basicmachines-co:main Oct 14, 2026
11 checks passed
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.

No secret redaction on the Hermes capture path; tau/privacy.py reads as general but is Tau-only

3 participants