fix(gateway): deny sibling-profile credential paths in media delivery - #47220
fix(gateway): deny sibling-profile credential paths in media delivery#47220JiraiyaETH wants to merge 1 commit into
Conversation
Runtime-only carry from 4950298476af; tests/support kept in external overlay artifact, not live checkout.
|
Thanks for identifying the sibling-profile delivery gap. The issue remains present on current Problems
Suggested changes
Automated hermes-sweeper review. |
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Summary
Two PRs address the sibling-profile credential-exfiltration gap in default media delivery. #47220 adds a narrow four-entry denylist, while #70144 applies the full current credential policy to every live profile directory and adds regression coverage for both blocked credentials and permitted non-credential files.
Related pull requests
- #47220
related— (+14/-0) — superseded by #70144: This identifies the correct cause and denies four sibling-profile control paths, but its list omits current OAuth/token stores, auth.lock, webhook secrets, cache/bws_cache.json, pairing/, and mcp-tokens/, and it adds no regression test. Despite the keep_open review on #47220, that review explicitly requires the full current policy and sibling-profile test coverage, both of which #70144 supplies. - #70144
duplicate— (+133/-12) — preferred fix: This reuses one live profile-directory enumeration path, applies the complete existing file-and-directory credential policy to active, shared-root, and sibling profiles, and deduplicates resolved roots. Its tests cover the reported non-strict-mode exfiltration path, root-home mode, the full sensitive-path set, and continued delivery of sibling non-credential files.
Duplicates
#47220 and #70144 address the same sibling-profile media-delivery vulnerability; #70144 is the comprehensive superset of #47220.
Suggested consolidation
Merge #70144 because its diff closes the full policy gap and provides targeted regression coverage. Close #47220 as superseded by #70144; this does not disregard its keep_open review, because the review's blocking concerns—an incomplete credential list and missing sibling-profile tests—are addressed by #70144 rather than by #47220's current diff.
Complex graph
flowchart LR
classDef open fill:#dbeafe,stroke:#1d4ed8,color:#1e3a8a
classDef merged fill:#dcfce7,stroke:#15803d,color:#14532d
classDef closed fill:#e5e7eb,stroke:#6b7280,color:#1f2937
classDef unverified fill:#f3f4f6,stroke:#9ca3af,color:#374151
classDef best stroke-width:3px,stroke:#b45309
classDef target stroke-width:3px,stroke:#4338ca
subgraph Dup47220 ["PRs duplicating each other"]
P47220["PR #47220 (open)"]
P70144["PR #70144 (open)"]
end
class P47220 open
class P70144 open
class P47220 target
click P47220 "https://github.com/NousResearch/hermes-agent/pull/47220"
click P70144 "https://github.com/NousResearch/hermes-agent/pull/70144"
Graph: solid arrow = fixes / best fix, dashed arrow = partial or unverified (see edge label); boxed group = PRs duplicating each other; amber border = best fix; indigo border = target; gray node = closed or no verify verdict yet (state tag in the node label).
Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 10 kB of PR diffs, 4 kB of issue/PR text, 2 kB of discussion (2 comments), 1 verify verdict. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
GottZ
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Delta since our previous triage comment
@egilewski identified a fail-open residual bypass in #70144 when the profiles directory cannot be enumerated, correcting our earlier assumption that enumeration alone was sufficient. @fangliquanflq then changed the implementation to classify sibling-profile credential paths structurally without directory listing and added a regression test for the enumeration-failure case; the supplied current diff confirms both changes. @teknium1’s new keep_open review remains appropriate until the contributor-requested fix is re-reviewed and the updated head receives passing verification.
Changed pull requests
- #70144
duplicate— (+266/-53) — preferred fix, pending re-review and verification: The current diff now denies the full credential policy under<root>/profiles/<name>/structurally, including when profile enumeration fails, while preserving delivery of non-credential sibling files and testing that boundary. This addresses @egilewski’s blocking fail-open objection in code, but does not justify merging over the outstanding changes-requested review until that resolution is confirmed; it is also consistent with @teknium1’s keep_open review.
Suggested consolidation
The recommendation is unchanged: keep #70144 open for contributor re-review and passing verification, then merge it and close #47220 as superseded.
Complex graph unchanged since our previous triage comment.
Cross-PR triage: Reviewed 2 pull requests and 0 issues in this complex. Each diff was read against this issue; Assessment working set: 18 kB of PR diffs, 4 kB of issue/PR text, 8 kB of discussion (3 comments), 0 verify verdicts. verdicts reflect diff content, not PR titles. Part of an automated triage batch.
|
not enough evidence I could not form a coherent review tree against current GitHub Please rebase or resolve the patch onto current Read-only inspection confirmed that current Signed: GPT-5.6-sol-xhigh in Codex |
_media_delivery_denied_paths()blocks the active profile's control files (auth.json/.env/config.yaml/credentials) but not other profiles' on a multi-profile host — a message referencing~/.hermes/profiles/<other>/.envpasses through. Fix: iterate the profiles root and deny all profile credential files. Closes a multi-profile credential-exfiltration vector.