mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
fix: also exclude .env from default profile exports
The original PR excluded auth.json from _DEFAULT_EXPORT_EXCLUDE_ROOT and filtered both auth.json and .env from named profile exports, but missed adding .env to the default profile exclusion set. Default exports would still leak .env containing API keys. Added .env to _DEFAULT_EXPORT_EXCLUDE_ROOT, added test coverage, and updated the existing test that incorrectly asserted .env presence.
This commit is contained in:
parent
d435acc2c0
commit
b267516851
3 changed files with 7 additions and 2 deletions
|
|
@ -17,6 +17,10 @@ class TestCredentialExclusion:
|
|||
"""auth.json must be in the default export exclusion set."""
|
||||
assert "auth.json" in _DEFAULT_EXPORT_EXCLUDE_ROOT
|
||||
|
||||
def test_dotenv_in_default_exclude_set(self):
|
||||
""".env must be in the default export exclusion set."""
|
||||
assert ".env" in _DEFAULT_EXPORT_EXCLUDE_ROOT
|
||||
|
||||
def test_named_profile_export_excludes_auth(self, tmp_path, monkeypatch):
|
||||
"""Named profile export must not contain auth.json or .env."""
|
||||
profiles_root = tmp_path / "profiles"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue