From e23898b52bafd1b772ba93e69f2e8637d7266520 Mon Sep 17 00:00:00 2001 From: Florian Sonnenschein Date: Mon, 11 Mar 2024 12:21:51 +0100 Subject: [PATCH] Added PKGS-7305 Query macOS Apps in /Applications and Apple CoreServices and add them to the Report --- include/tests_ports_packages | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/include/tests_ports_packages b/include/tests_ports_packages index 81babdc3..d5625446 100644 --- a/include/tests_ports_packages +++ b/include/tests_ports_packages @@ -158,6 +158,29 @@ LogText "Result: emerge can NOT be found on this system" fi # +################################################################################# +# + # Test : PKGS-7305 + # Description : Query macOS Apps in /Applications and CoreServices + Register --test-no PKGS-7305 --os macOS --weight L --network NO --category security --description "Query macOS Apps in /Applications and CoreServices" + if [ ${SKIPTEST} -eq 0 ]; then + LogText "Test: Querying Apps in /Applications" + Display --indent 4 --text "- Querying macOS Apps in /Applications" + LogText "Output:"; LogText "-----" + for APP in /Applications/*.app; do + PACKAGE_NAME=$(basename "$APP" .app) + PACKAGE_VERSION=$(defaults read "$APP/Contents/Info" CFBundleShortVersionString 2>/dev/null || echo "N/A") + LogText "Found package: ${PACKAGE_NAME} (version: ${PACKAGE_VERSION})" + INSTALLED_PACKAGES="${INSTALLED_PACKAGES}|${PACKAGE_NAME},${PACKAGE_VERSION}" + done + Display --indent 4 --text "- Querying Apple CoreServices" + for CS in /Library/Apple/System/Library/CoreServices/*.app; do + PACKAGE_NAME=$(basename "$CS" .app) + PACKAGE_VERSION=$(defaults read "$CS/Contents/Info" CFBundleShortVersionString 2>/dev/null || echo "N/A") + LogText "Found CoreServices: ${PACKAGE_NAME} (version: ${PACKAGE_VERSION})" + INSTALLED_PACKAGES="${INSTALLED_PACKAGES}|${PACKAGE_NAME},${PACKAGE_VERSION}" + done + fi # ################################################################################# #