diff --git a/changes/34157-run-sh-ingestion b/changes/34157-run-sh-ingestion new file mode 100644 index 0000000000..37a7d5d6fd --- /dev/null +++ b/changes/34157-run-sh-ingestion @@ -0,0 +1 @@ +* Revised macOS software ingestion to correctly show application names for Steam games instead of `run.sh`. diff --git a/docs/Contributing/product-groups/orchestration/understanding-host-vitals.md b/docs/Contributing/product-groups/orchestration/understanding-host-vitals.md index 2cacd29839..2bf7d869b3 100644 --- a/docs/Contributing/product-groups/orchestration/understanding-host-vitals.md +++ b/docs/Contributing/product-groups/orchestration/understanding-host-vitals.md @@ -716,7 +716,7 @@ WITH cached_users AS (WITH cached_groups AS (select * from groups) FROM users LEFT JOIN cached_groups USING (gid) 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 <> '')) SELECT - COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(bundle_executable, ''), TRIM(name, '.app') ) AS name, + COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(NULLIF(bundle_executable, ''), 'run.sh'), TRIM(name, '.app') ) AS name, COALESCE(NULLIF(bundle_short_version, ''), bundle_version) AS version, bundle_identifier AS bundle_identifier, '' AS extension_id, diff --git a/server/service/osquery_utils/queries.go b/server/service/osquery_utils/queries.go index d42e78207d..9ea6dea55a 100644 --- a/server/service/osquery_utils/queries.go +++ b/server/service/osquery_utils/queries.go @@ -909,7 +909,7 @@ var softwareMacOS = DetailQuery{ // which is used in vulnerability scanning. Query: withCachedUsers(`WITH cached_users AS (%s) SELECT - COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(bundle_executable, ''), TRIM(name, '.app') ) AS name, + COALESCE(NULLIF(display_name, ''), NULLIF(bundle_name, ''), NULLIF(NULLIF(bundle_executable, ''), 'run.sh'), TRIM(name, '.app') ) AS name, COALESCE(NULLIF(bundle_short_version, ''), bundle_version) AS version, bundle_identifier AS bundle_identifier, '' AS extension_id,