mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-16 08:17:11 +00:00
PR-Agent on #1248 flagged two remaining sensitive-mask edge cases: 1. The TOML array walker stepped through triple-quoted strings one single quote at a time. With a body containing both quotes and structural characters, like """abc"]xyz""", a stray `]` inside the string body could escape the string-skip pair and terminate the array scan early. Add skipTomlString that recognizes triple-quoted strings ("""…""", '''…''') and skips them as one unit. 2. The JSON regex matched any "...": pattern, so substrings inside escaped value strings, like "description": "use \\"API_KEY\\": header", could mask unrelated text. Replace the JSON branch with a state-aware scanner that only registers a string as a key when it sits at an object-key position (preceded by `{` or `,`, followed by `:`). Adds regression tests for both cases.