fix(security): classify broad Windows SIDs as world principals#74383
fix(security): classify broad Windows SIDs as world principals#74383dwc1997 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Made-with: Cursor
Greptile SummaryThis PR correctly expands the Windows ACL classifier to treat Confidence Score: 4/5Safe to merge — the change is security-conservative and well-tested, with only a stale inline comment as a minor concern. All logic changes are correct and covered by new tests. The only finding is a P2 stale comment in buildTrustedPrincipals that could mislead a future reader but does not affect runtime behavior. No files require special attention beyond the stale comment on line 131 of windows-acl.ts.
|
|
Codex review: needs changes before merge. Summary Reproducibility: yes. Source inspection on current main shows a SID such as Next step before merge Security Review findings
Review detailsBest possible solution: Land a focused Do we have a high-confidence way to reproduce the issue? Yes. Source inspection on current main shows a SID such as Is this the best way to solve the issue? Mostly yes. Expanding the classifier-owned SID/principal sets with focused unit and filesystem-audit tests is the narrow maintainable fix; the safer merge path is to add the changelog entry, refresh the stale comment, then get security-owner review. Full review comments:
Overall correctness: patch is incorrect Acceptance criteria:
What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against d583662fd905. |
Made-with: Cursor
Summary
Anonymous Logon,BUILTIN\Guests) asgroupinstead ofworld.worldWritable(critical) togroupWritable(warn), reducing severity for effectively world-accessible paths.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Root Cause (if applicable)
classifyPrincipalonly treated a narrow world-equivalent set asworld(Everyone,Authenticated Users,BUILTIN\Users), so other broad-access principals fell through togroup.S-1-5-7,S-1-5-32-546,S-1-5-4,S-1-2-0,S-1-5-2, or audit severity impact from those entries.worldWritable(critical) andgroupWritable(warn), so misclassification directly affects security signal strength.Regression Test Plan (if applicable)
src/security/windows-acl.test.tssrc/security/audit-filesystem-windows.test.tsuntrustedWorld(notuntrustedGroup).*S-1-5-7:(F)triggersfs.state_dir.perms_world_writablewith critical severity.User-visible / Behavior Changes
Anonymous Logon,Guests,Interactive,Local, andNetworkare now treated as world-equivalent in security audit classification.worldWritablecritical severity.Diagram (if applicable)