fix(security): normalize concealed instruction text - #408
Conversation
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
Signed-off-by: Nir Paz <npaz@nvidia.com>
rng1995
left a comment
There was a problem hiding this comment.
Requesting changes because the normalizer still has two fail-open concealed-instruction paths. Each current-head repro yields only the raw view, no P1/AE6 finding, risk 0, SAFE, complete analysis, and safe_to_install=True.
| start = offset | ||
| while offset < len(text) and _is_token_gap_character(text[offset]): | ||
| offset += 1 | ||
| if ( |
There was a problem hiding this comment.
[P1] Normalize default-ignorables at token boundaries too. Requiring word characters on both sides misses ignore\u034f previous instructions. (and the inverse boundary form), so the concealed directive reaches a SAFE install verdict with no normalized view. Remove contextual default-ignorables when they adjoin a word boundary while preserving source-offset mapping and emoji-sensitive cases.
| break | ||
|
|
||
| next_letter_end = cursor + 1 | ||
| if next_letter_end < len(text) and text[next_letter_end].isalpha(): |
There was a problem hiding this comment.
[P1] The fail-closed AE6 path reuses an exact recognizer that rejects common adversarial spacing. i g n o r eall previous instructions. stops here because the next character is alphabetic; i.-g.-n.-o.-r.-e previous instructions. is rejected by the single-marker signature, and per-letter line breaks are excluded earlier. These inputs all receive a complete SAFE verdict. Use a broader, separately bounded detector for AE6/partial coverage instead of treating exact-compaction rejection as proof that no concealed run exists.
Signed-off-by: Nir Paz <npaz@nvidia.com>
|
Powered by Codex: PR council review result. This is a triage signal, not a maintainer approval.
|
Summary
Validation
git diff --check