Skip to content

Commit 5055ded

Browse files
authored
Merge pull request #13 from dwolfson/docs/issue-121-mcp-adapter-logs-password
docs: log ISSUE-121, mcp_adapter writes user_pass to stderr and log
2 parents 9e83422 + e727ccb commit 5055ded

3 files changed

Lines changed: 39 additions & 2 deletions

File tree

‎.github/workflows/python-tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
python-version: ["3.12", "3.13"]
1515

1616
steps:
17-
- uses: actions/checkout@v4
17+
- uses: actions/checkout@v7
1818

1919
- name: Install uv
2020
uses: astral-sh/setup-uv@v7

‎.github/workflows/scorecard.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: "Checkout code"
28-
uses: actions/checkout@v4
28+
uses: actions/checkout@v7
2929
with:
3030
persist-credentials: false
3131

‎PYEGERIA_ISSUES.md‎

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1188,6 +1188,43 @@ lacks `deleteMethod`, `permittedSynchronization`, `connectionName` and
11881188
`metadataCollectionQualifiedName`, which the Java relationship accepts.
11891189

11901190

1191+
---
1192+
1193+
### ISSUE-121: `core/mcp_adapter.py` writes the caller's user name and plaintext password to stderr and the log on every report call
1194+
1195+
**Layer:** pyegeria (credential leak in diagnostics) · **Status:** open,
1196+
logged only, not fixed (per the gaps-tracking rule, awaiting explicit
1197+
approval) · **Found:** 2026-10-03, read-only security sweep by the Resource
1198+
Explorer coordinator session; no value was read or recorded.
1199+
1200+
**What:** the report-execution entry point in `pyegeria/core/mcp_adapter.py`
1201+
(the function whose docstring covers the `token` / `user` / `user_pass`
1202+
fallback, around lines 170-180) builds a "Format set" diagnostic string that
1203+
includes `user` and `user_pass`, then emits it twice: once with
1204+
`print(..., file=sys.stderr)` and once with `logger.info(...)`. Both run
1205+
before the settings fallback, so whatever the caller passed, and for the
1206+
fallback path the configured profile, is written in clear text on every call.
1207+
The log sink is loguru, so the password also lands in any rotated debug-log
1208+
file (this repo's untracked `debug_log.*.zip` archives are the kind of file
1209+
that would carry it) and in anything that captures the MCP server's stderr.
1210+
1211+
**Severity (owner, 2026-10-03):** low for the current demo/dev systems; it becomes a real problem the moment anyone runs this against a production Egeria with real accounts.
1212+
1213+
**Why it matters:** the password reaches files and terminals that are
1214+
routinely attached to issues, zipped and shared. Rotating the credential
1215+
does not remove the copies already written.
1216+
1217+
**Candidate fix (not applied):** drop `user_pass` from both statements, and
1218+
never log `token`. Log `user` only if the owner wants it. Rotate any
1219+
Egeria account whose password was used through this adapter, and treat
1220+
existing `debug_log.*` archives as containing it. A regression test should
1221+
capture stderr and the log sink for a call with a sentinel password and
1222+
assert the sentinel is absent.
1223+
1224+
**Related:** the same sweep found two hard-coded database passwords in
1225+
untracked Airflow DAG files in egeria-workspaces-fs; that is tracked in that
1226+
repo, not here.
1227+
11911228
---
11921229

11931230
### ISSUE-114: `get_guid_for_name`'s miss-sentinel string ("No elements found") is truthy and repeatedly fools callers' existence checks — a caller guideline, not a candidate fix here

0 commit comments

Comments
 (0)