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
Obfuscation: a bare top-level value after a complete document is kept as sent instead of obfuscated #2577
This was a finding from a follow-up AI-based differential audit of the reworked Saluki obfuscation PR as I introduce libdatadog in agent-data-plane. I've widened it since filing: the Agent leaks the same way after an object document, so matching the Agent isn't enough. I'd like a bare value after a complete document to always be obfuscated.
AI
A bare top-level value after a complete JSON document is copied as sent instead of obfuscated. At libdatadog rev 9b339e982 and Agent rev 17ecddf4e3e, both scanners accept concatenated documents for Elasticsearch-style bodies: on non-whitespace after a completed document they reset and scan afresh (Rust end_top; Go stateEndTop). A stray scalar in that position can be read as an object key and copied verbatim, so a string or a card-number-shaped number is sent unobfuscated.
After an object document, both implementations expect a key: libdd because its stack is empty, the Agent because its retained outermost closure is an object. Both copy the scalar.
The Agent's array-case result is a side effect of that retained closure, not a deliberate rule, and its object case leaks. Nothing legitimate depends on the copy: concatenated documents are whole objects or arrays, and those are obfuscated correctly ({"a":1} {"b":2} → {"a":"?"} {"b":"?"}).
Could a bare top-level value after a complete document always be obfuscated, with regression tests for these two cases?
[1,2] "secret" → ["?","?"] "?"
{"a":1} "secret" → {"a":"?"} "?"
This diverges from the Agent only on malformed input, and only toward obfuscating more.
AI
Saluki #2601 carries both expectations as #[ignore]d tests; we'll unskip them when this is fixed.
changed the title [-]Obfuscation: a bare top-level value after an array document is kept as sent instead of obfuscated[/-][+]Obfuscation: a bare top-level value after a complete document is kept as sent instead of obfuscated[/+]on Sep 25, 2026
Activity
[-]Obfuscation: a bare top-level value after an array document is kept as sent instead of obfuscated[/-][+]Obfuscation: a bare top-level value after a complete document is kept as sent instead of obfuscated[/+]fix(otlp): obfuscate malformed json queries and keep key order (#2601)
fix(otlp): obfuscate malformed json queries and keep key order (#2601)