You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(mcp): a manifest parse error can put manifest text on the append-only audit row #4265
An apply_system YAML parse failure returns a 400 whose detail quotes the manifest line (system_service.py, detail=f"{e.code}: {e}"). load_hardened_yaml was run on a malformed manifest and its message did contain the value from that line. After #4246, httpAuditReason (src/mcp-server/src/tools/systems.ts) keeps the first 200 characters of that detail on the audit row. The step from the message to the row was read from the code, not run.
The audit log is hash-chained and append-only, so what is written there cannot be purged. deploy_system's throw path already writes the same 400 uncapped through ApiError.message and the withAudit catch, so this exists today. Manifests are not designed to carry secrets, but an operator can paste one that does.
Expected
A manifest parse failure on either tool records a reason that carries no manifest text, such as a bare HTTP 400 or the error code alone.
Both paths are covered: the detail arm of httpAuditReason and the withAudit catch path.
Reasons on the row are capped in one place. Today only detail is capped, while status and the non-ApiError branches are not.
Acceptance criteria
A test drives a malformed manifest containing a marker value through apply_system and deploy_system and asserts the marker is absent from the audit row.
Activity