fix(dashboard): block managed credential directories - #57865
Conversation
Related: #57833 (widens the |
Review — PR #57865 (fix(dashboard): block managed credential directories)Veredito: Código correto, bem testado. Aprovo. O que fazExpande o filtro de segurança do dashboard file browser: antes só bloqueava arquivos Pontos fortes
Observação menor (não blocker)
|
|
Priority corrected: P1 → P3 (triage calibration). Assessed against the repo The dashboard is loopback-by-default and its caller is the operator/agent already Keeping |
|
Thanks for the focused credential-directory coverage. This is already implemented on current
|
Summary
The dashboard managed-files API only filtered sensitive files by basename. That blocked
.envand.env.*, but directory-scoped credential stores still remained browsable when the managed files root pointed atHERMES_HOMEor a hosted/opt/datalayout.Affected examples:
mcp-tokens/<server>.jsonmcp-tokens/<server>.client.jsonpairing/*Those directories can contain live OAuth/MCP bearer tokens or pairing secrets. If the dashboard file browser is configured with a managed root that includes Hermes state,
/api/files,/api/files/read, and/api/files/downloadcould still list/read/download files under those sensitive directories.Changes
.envbasename behavior unchanged./api/fileslistings./api/files/readand/api/files/downloadaccess to files under those directories.mcp-tokens/andpairing/.Related
This is complementary to #57833. That PR widens the basename denylist for files like
auth.json,config.yaml, and.envrc. This PR covers the directory-scoped credential stores that cannot be represented by basename-only filtering.Tests