Skip to content

Scrub secrets from profile export archives - #83458

Merged
OutThisLife merged 1 commit into
mainfrom
bb/profile-export-redact
Aug 10, 2026
Merged

Scrub secrets from profile export archives#83458
OutThisLife merged 1 commit into
mainfrom
bb/profile-export-redact

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

Profile export already excludes auth.json / .env, but secret-shaped strings sitting in skills, SOUL.md, memories, and other text still left the machine in the shareable .tar.gz. Export now force-runs agent.redact.redact_sensitive_text(..., force=True) on the staged copy (same pass as hermes sessions export --redact) before writing the archive.

  • Live profile on disk is never rewritten
  • Symlinks to text files are materialized only when redaction changes content (so scrubbing cannot follow a link back into the source tree)
  • force=True ignores security.redact_secrets / HERMES_REDACT_SECRETS — share archives stay scrubbed even when live redaction is off
  • This is secret-pattern scrubbing, not general PII (names/emails/paths in prose still ship)

Test plan

  • scripts/run_tests.sh tests/hermes_cli/test_profile_export_credentials.py -q
  • Export a profile with a known sk-or-v1-… string in a skill/SOUL.md and confirm the archive does not contain it while the source file still does

Shareable profile tarballs already drop auth.json/.env, but keys pasted
into skills, SOUL.md, or memories still shipped in plaintext. Force-run
the same redact_sensitive_text pass sessions export --redact uses on the
staged copy so the live profile is never rewritten.
@github-actions

github-actions Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

૮ >ﻌ< ა ci review

ran on 6c5cb2d — fix(profiles): scrub secret-shaped strings from export archi

⚠️ Warnings

OSV vulnerability scan · View job

2 known vulnerabilities found in pinned dependencies.

How to fix:

Review the findings in the Security tab. Update the affected dependencies if a patched version is available.


debug info

CI timings

CI timings · View report · View job

Wall time 3m30s vs 7m12s (-51.4%). 11 job(s) slower, 13 faster, 1 unchanged.

  • Python tests / Run tests slice 7/12: +81.0s
  • Detect affected areas: +35.0s
  • Python tests / Run tests slice 12/12: -32.0s
  • Python tests / Run tests slice 10/12: +18.0s
  • Python tests / Run tests slice 8/12: -17.0s

@alt-glitch alt-glitch added type/security Security vulnerability or hardening comp/cli CLI entry point, hermes_cli/, setup wizard area/profiles Multi-profile isolation, HERMES_HOME scoping P3 Low — cosmetic, nice to have sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data labels Aug 10, 2026
@OutThisLife
OutThisLife merged commit fafbdd2 into main Aug 10, 2026
49 checks passed
@OutThisLife
OutThisLife deleted the bb/profile-export-redact branch August 10, 2026 22:12
prmartinow pushed a commit to prmartinow/hermes-agent that referenced this pull request Aug 26, 2026
…port-redact

Scrub secrets from profile export archives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/profiles Multi-profile isolation, HERMES_HOME scoping comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/security Security vulnerability or hardening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants