fix: flag Windows PII usernames that start with s - #95
Conversation
The Windows personal-path rule was single-quoted, so the character class treated s as a literal rather than whitespace. Usernames like steve were skipped. Quote it the same way as the macOS rule. Fixes NVIDIA#87 Signed-off-by: mimran-khan <mohammed_imran.khan@outlook.com>
rng1995
left a comment
There was a problem hiding this comment.
Reviewed the exact current head and the linked #87 reproduction. The loaded regex now excludes backslash and whitespace rather than the literal letter s, preserving existing alice detection while correctly matching s, sam, steve, session, case variants, and dotted usernames. Focused/adversarial security coverage passed (243 tests), with Ruff and diff checks clean. No actionable findings; approved. The sole red Gitleaks job is caused by unrelated historical commits on other fetched branches, not this PR diff.
|
@mimran-khan - Please resolve merge conflicts |
|
Merged main in. Changelog conflict is resolved. |
Signed-off-by: Christopher Kevin <christopherk@nvidia.com>
|
Merged latest main (including #102) and resolved the CHANGELOG conflict. Ready for another look. |
|
Please resolve merge conflict in CHANGELOG.md so that I can merge it. Thanks for your contribution and patience @mimran-khan |
…n-khan/SkillEvaluator into fix/windows-pii-username-s
Head branch was pushed to by a user without write access
Summary
The Windows personal-path PII rule was single-quoted YAML, so
\\sstayed backslash plus the letter s. Usernames starting with s (steve, sam, session) never matched. Alice still did.I quoted the pattern the same way as the macOS rule so the class is "not backslash, not whitespace". Fixes #87.
Verification
make lintmake testmake buildRelease Impact
CHANGELOG.mdFocused tests cover alice (still flagged) and steve (the miss). I also asserted the loaded regex matches sam/session and does not match
C:\Temp\....make lintis clean. The PII test files pass (243). Fullmake teston this machine hits a pre-existing Python 3.12.2HTMLParser.set_cdata_mode(escapable=...)failure intest_markdown.py/test_quality_score.py. That fails on main with no local changes too. Not part of this PR.