Skip to content

santactl/fileinfo: Change how Rule field is populated#436

Merged
russellhancox merged 7 commits into
mainfrom
rah/cel-rules-3
Jun 13, 2025
Merged

santactl/fileinfo: Change how Rule field is populated#436
russellhancox merged 7 commits into
mainfrom
rah/cel-rules-3

Conversation

@russellhancox

Copy link
Copy Markdown
Member

Instead of showing the decision that would (probably) be made by santad, the Rule field now shows which rule matches. This more accurately reflects the field name and allows us to show that a CEL rule exists (which largely precludes being able to actually give a decision). If we wanted, we could later expand on this to also

This involved removing the (now unneeded) decisionForFilePath:identifiers:reply: method from the XPC control interface, and moving the databaseRuleForIdentifiers:reply: method from the privileged to the unprivileged interface. I also moved a stringifyRule:withColor: method that had been in SNTCommandRule into SNTRule itself so it can easily be used by both commands.

@russellhancox russellhancox requested a review from a team as a code owner June 11, 2025 20:47
@github-actions github-actions Bot added comp/santad Issues or PRs related to the daemon comp/santactl Issues or PRs related to santactl lang/objc PRs modifying files in ObjC lang/objc++ PRs modifying files in ObjC++ comp/common size/m Size: medium labels Jun 11, 2025
@russellhancox russellhancox added the 💣 breaking A change that may require notice to users during an update label Jun 11, 2025
tburgin
tburgin previously approved these changes Jun 12, 2025

@tburgin tburgin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a welcome refactor.

Comment thread Source/santactl/Commands/SNTCommandFileInfo.m
@github-actions github-actions Bot added size/l Size: large and removed size/m Size: medium labels Jun 12, 2025
Comment thread Source/common/SNTRule.m Outdated
Comment thread Source/santactl/Commands/SNTCommandFileInfo.m Outdated
@russellhancox russellhancox requested a review from mlw June 13, 2025 00:07
@russellhancox russellhancox merged commit d6a1e49 into main Jun 13, 2025
10 checks passed
@russellhancox russellhancox deleted the rah/cel-rules-3 branch June 13, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💣 breaking A change that may require notice to users during an update comp/common comp/santactl Issues or PRs related to santactl comp/santad Issues or PRs related to the daemon lang/objc PRs modifying files in ObjC lang/objc++ PRs modifying files in ObjC++ size/l Size: large

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants