-
Notifications
You must be signed in to change notification settings - Fork 440
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove homebrew app casks #24593
base: main
Are you sure you want to change the base?
Remove homebrew app casks #24593
Conversation
path AS installed_path | ||
FROM homebrew_packages | ||
WHERE type = 'cask' | ||
AND NOT EXISTS (SELECT 1 FROM file WHERE file.path LIKE CONCAT(homebrew_packages.path, '/%%%%', '/%%.app%%') LIMIT 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double checking: LIKE
with double %%
(recursive search) on the file
table can only be used at the end.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double wildcards can NEVER be used mid-string (infix)
https://blog.1password.com/the-file-table-osquerys-secret-weapon/
path AS installed_path | ||
FROM homebrew_packages | ||
WHERE type = 'cask' | ||
AND NOT EXISTS (SELECT 1 FROM file WHERE file.path LIKE CONCAT(homebrew_packages.path, '/%%%%', '/%%.app%%') LIMIT 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Am probably missing something, why not do CONCAT(homebrew_packages.path, '/%%%%/%%.app%%')
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we cannot do the filtering cleanly and without performance impact on the device we could filter results server side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some questions.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #24593 +/- ##
==========================================
+ Coverage 63.51% 63.53% +0.01%
==========================================
Files 1592 1592
Lines 151140 151184 +44
Branches 3885 3885
==========================================
+ Hits 95994 96048 +54
+ Misses 47492 47484 -8
+ Partials 7654 7652 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
#22944
Removing homebrew casks that install app bundles from the macos software detail query as they are already reported in the
apps
table.apps
table provides bundle_identifer which is used in vulnerability (CPE) matching to grab the correct vendor.changes/
,orbit/changes/
oree/fleetd-chrome/changes
.See Changes files for more information.