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
Stop printing API keys back out, and bound the hosted listing walk
Four things the review found, all in the hosted-engine path this PR added.
`RequestBuilder::bearer_auth` marks its value sensitive; `header` handed a
plain string does not. So the two schemes with no such helper -- Cognee's
`X-API-Key` and Mem0's `Authorization: Token` -- carried a live credential
through every `Debug` rendering of the request. The test that pins this
prints the leak when reverted: `no sensitive header on {"x-api-key":
"cg-secret"}`. Both now go through one helper that sets the flag, and that
parses the value up front so a credential holding a newline fails at the
call site by name rather than inside `send` where it reads as a transport
fault. The parse error carries no value, so the refusal cannot echo the key
either.
Mem0's hosted listing stopped on an empty page or a null `next` -- both
server-controlled. A server that keeps answering a full page and a cursor
spun the loop and grew the buffer until the process died. It is now bounded
at 500 pages of 200 and fails saying so, which is what the self-hosted arm
already did at its own ceiling. The page size became a constant so the
message cannot drift from the request.
The `X-API-Key` doc line had ended up above `token` instead of `api_key`,
leaving one constructor with two contradictory doc lines and the other with
none. The README still said "plus self-hosted Mem0" one paragraph after the
table started advertising the hosted platform, and showed `CogneeMemory::api`
twice with the same shape; the second is now the `Mem0Memory::cloud`
constructor that section exists to document, and the auth paragraph names
Mem0's two schemes.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
0 commit comments