Skip to content

Commit 05825ee

Browse files
authored
Cherry-Pick: Fall back to app filename when ingesting macOS apps that have no display name/bundle name and run.sh as the bundle executable (#34179)
Merged into `main` in #34176.
1 parent db7f390 commit 05825ee

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

changes/34157-run-sh-ingestion

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Revised macOS software ingestion to correctly show application names for Steam games instead of `run.sh`.

docs/Contributing/product-groups/orchestration/understanding-host-vitals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ WITH cached_users AS (WITH cached_groups AS (select * from groups)
716716
FROM users LEFT JOIN cached_groups USING (gid)
717717
WHERE type <> 'special' AND shell NOT LIKE '%/false' AND shell NOT LIKE '%/nologin' AND shell NOT LIKE '%/shutdown' AND shell NOT LIKE '%/halt' AND username NOT LIKE '%$' AND username NOT LIKE '\_%' ESCAPE '\' AND NOT (username = 'sync' AND shell ='/bin/sync' AND directory <> ''))
718718
SELECT
719-
COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(bundle_executable, ''), TRIM(name, '.app') ) AS name,
719+
COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(NULLIF(bundle_executable, ''), 'run.sh'), TRIM(name, '.app') ) AS name,
720720
COALESCE(NULLIF(bundle_short_version, ''), bundle_version) AS version,
721721
bundle_identifier AS bundle_identifier,
722722
'' AS extension_id,

server/service/osquery_utils/queries.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ var softwareMacOS = DetailQuery{
909909
// which is used in vulnerability scanning.
910910
Query: withCachedUsers(`WITH cached_users AS (%s)
911911
SELECT
912-
COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(bundle_executable, ''), TRIM(name, '.app') ) AS name,
912+
COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(NULLIF(bundle_executable, ''), 'run.sh'), TRIM(name, '.app') ) AS name,
913913
COALESCE(NULLIF(bundle_short_version, ''), bundle_version) AS version,
914914
bundle_identifier AS bundle_identifier,
915915
'' AS extension_id,

0 commit comments

Comments
 (0)