diff --git a/ee/maintained-apps/ingesters/winget/ingester.go b/ee/maintained-apps/ingesters/winget/ingester.go index e8e9e2da5ee..61aaa4235bf 100644 --- a/ee/maintained-apps/ingesters/winget/ingester.go +++ b/ee/maintained-apps/ingesters/winget/ingester.go @@ -348,12 +348,26 @@ func (i *wingetIngester) ingestOne(ctx context.Context, input inputApp) (*mainta } // TODO - consider UpgradeCode here? - existsTemplate := "SELECT 1 FROM programs WHERE name = '%s' AND publisher = '%s';" - if input.FuzzyMatchName { - existsTemplate = "SELECT 1 FROM programs WHERE name LIKE '%s %%' AND publisher = '%s';" + var existsQuery string + switch { + case input.FuzzyMatchName.Custom != "": + existsQuery = fmt.Sprintf( + "SELECT 1 FROM programs WHERE name LIKE '%s' AND publisher = '%s';", + input.FuzzyMatchName.Custom, publisher, + ) + case input.FuzzyMatchName.Enabled: + existsQuery = fmt.Sprintf( + "SELECT 1 FROM programs WHERE name LIKE '%s %%' AND publisher = '%s';", + name, publisher, + ) + default: + existsQuery = fmt.Sprintf( + "SELECT 1 FROM programs WHERE name = '%s' AND publisher = '%s';", + name, publisher, + ) } out.Queries = maintained_apps.FMAQueries{ - Exists: fmt.Sprintf(existsTemplate, name, publisher), + Exists: existsQuery, } out.InstallScript = installScript processedUninstallScript, err := preProcessUninstallScript(uninstallScript, productCode) @@ -433,6 +447,33 @@ func isFileType(installerType string) bool { return ok } +// fuzzyMatch supports three JSON representations: +// - false (or omitted): exact match on programs.name +// - true: automatic LIKE pattern "name LIKE ' %'" +// - "": a custom LIKE pattern used verbatim, e.g. "Mozilla Firefox % ESR %" +type fuzzyMatch struct { + Enabled bool // true when the JSON value is the boolean `true` + Custom string // non-empty when the JSON value is a string pattern +} + +func (f *fuzzyMatch) UnmarshalJSON(data []byte) error { + // Try boolean first (handles true, false, and omitted-via-zero-value). + var b bool + if err := json.Unmarshal(data, &b); err == nil { + f.Enabled = b + f.Custom = "" + return nil + } + // Try string. + var s string + if err := json.Unmarshal(data, &s); err == nil { + f.Custom = s + f.Enabled = s != "" + return nil + } + return fmt.Errorf("fuzzy_match_name must be a boolean or a string, got %s", string(data)) +} + type inputApp struct { Name string `json:"name"` Slug string `json:"slug"` @@ -440,16 +481,16 @@ type inputApp struct { // AgileBits) and an app part (e.g. 1Password), joined by a "." PackageIdentifier string `json:"package_identifier"` // The value matching programs.name for the primary app package in osquery - UniqueIdentifier string `json:"unique_identifier"` - InstallScriptPath string `json:"install_script_path"` - UninstallScriptPath string `json:"uninstall_script_path"` - InstallerArch string `json:"installer_arch"` - InstallerType string `json:"installer_type"` - InstallerScope string `json:"installer_scope"` - InstallerLocale string `json:"installer_locale"` - ProgramPublisher string `json:"program_publisher"` - UninstallType string `json:"uninstall_type"` - FuzzyMatchName bool `json:"fuzzy_match_name"` + UniqueIdentifier string `json:"unique_identifier"` + InstallScriptPath string `json:"install_script_path"` + UninstallScriptPath string `json:"uninstall_script_path"` + InstallerArch string `json:"installer_arch"` + InstallerType string `json:"installer_type"` + InstallerScope string `json:"installer_scope"` + InstallerLocale string `json:"installer_locale"` + ProgramPublisher string `json:"program_publisher"` + UninstallType string `json:"uninstall_type"` + FuzzyMatchName fuzzyMatch `json:"fuzzy_match_name"` // Whether to use "no_check" instead of the app's hash (e.g. for non-pinned download URLs) IgnoreHash bool `json:"ignore_hash"` DefaultCategories []string `json:"default_categories"` diff --git a/ee/maintained-apps/ingesters/winget/ingester_test.go b/ee/maintained-apps/ingesters/winget/ingester_test.go index f4751f11812..8ddab96bb2e 100644 --- a/ee/maintained-apps/ingesters/winget/ingester_test.go +++ b/ee/maintained-apps/ingesters/winget/ingester_test.go @@ -1,12 +1,80 @@ package winget import ( + "encoding/json" "testing" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) +func TestFuzzyMatchUnmarshalJSON(t *testing.T) { + tests := []struct { + name string + input string + wantEnabled bool + wantCustom string + wantErr bool + }{ + { + name: "boolean true", + input: `{"fuzzy_match_name": true}`, + wantEnabled: true, + wantCustom: "", + }, + { + name: "boolean false", + input: `{"fuzzy_match_name": false}`, + wantEnabled: false, + wantCustom: "", + }, + { + name: "omitted defaults to disabled", + input: `{}`, + wantEnabled: false, + wantCustom: "", + }, + { + name: "custom LIKE pattern string", + input: `{"fuzzy_match_name": "Mozilla Firefox % ESR %"}`, + wantEnabled: true, + wantCustom: "Mozilla Firefox % ESR %", + }, + { + name: "empty string treated as disabled", + input: `{"fuzzy_match_name": ""}`, + wantEnabled: false, + wantCustom: "", + }, + { + name: "invalid type (number)", + input: `{"fuzzy_match_name": 42}`, + wantErr: true, + }, + { + name: "invalid type (array)", + input: `{"fuzzy_match_name": [1,2]}`, + wantErr: true, + }, + } + + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + var out struct { + FuzzyMatchName fuzzyMatch `json:"fuzzy_match_name"` + } + err := json.Unmarshal([]byte(tt.input), &out) + if tt.wantErr { + require.Error(t, err) + return + } + require.NoError(t, err) + assert.Equal(t, tt.wantEnabled, out.FuzzyMatchName.Enabled) + assert.Equal(t, tt.wantCustom, out.FuzzyMatchName.Custom) + }) + } +} + func TestBuildUpgradeCodeBasedUninstallScript(t *testing.T) { tests := []struct { name string diff --git a/ee/maintained-apps/inputs/homebrew/abstract.json b/ee/maintained-apps/inputs/homebrew/abstract.json index 432b9d6eb6a..fc5be04a6fa 100644 --- a/ee/maintained-apps/inputs/homebrew/abstract.json +++ b/ee/maintained-apps/inputs/homebrew/abstract.json @@ -1,6 +1,6 @@ { "name": "Abstract", - "unique_identifier": "com.SweetScape.010Editor", + "unique_identifier": "com.elasticprojects.abstract-desktop", "token": "abstract", "installer_format": "zip", "slug": "abstract/darwin", diff --git a/ee/maintained-apps/inputs/homebrew/teleport-suite.json b/ee/maintained-apps/inputs/homebrew/teleport-suite.json index 5f244380bba..825945e86b2 100644 --- a/ee/maintained-apps/inputs/homebrew/teleport-suite.json +++ b/ee/maintained-apps/inputs/homebrew/teleport-suite.json @@ -1,11 +1,9 @@ { "name": "Teleport Suite", - "unique_identifier": "com.gravitational.teleport", + "unique_identifier": "com.gravitational.teleport.tsh", "token": "teleport-suite", "installer_format": "pkg", "slug": "teleport-suite/darwin", - "default_categories": [ - "Developer tools" - ], + "default_categories": ["Developer tools"], "uninstall_script_path": "ee/maintained-apps/inputs/homebrew/scripts/teleport-suite-uninstall.sh" -} \ No newline at end of file +} diff --git a/ee/maintained-apps/inputs/winget/010-editor.json b/ee/maintained-apps/inputs/winget/010-editor.json index 8c7c3fed72f..88c4bc2b088 100644 --- a/ee/maintained-apps/inputs/winget/010-editor.json +++ b/ee/maintained-apps/inputs/winget/010-editor.json @@ -2,7 +2,8 @@ "name": "010 Editor", "slug": "010-editor/windows", "package_identifier": "SweetScape.010Editor", - "unique_identifier": "010 Editor 16.0.2 (64-bit)", + "unique_identifier": "010 Editor", + "fuzzy_match_name": true, "installer_arch": "x64", "installer_type": "exe", "installer_scope": "machine", diff --git a/ee/maintained-apps/inputs/winget/7-zip.json b/ee/maintained-apps/inputs/winget/7-zip.json index a17f231bf08..0142a3e21a2 100644 --- a/ee/maintained-apps/inputs/winget/7-zip.json +++ b/ee/maintained-apps/inputs/winget/7-zip.json @@ -2,7 +2,8 @@ "name": "7-zip", "slug": "7-zip/windows", "package_identifier": "7zip.7zip", - "unique_identifier": "7-Zip 25.01 (x64)", + "unique_identifier": "7-Zip", + "fuzzy_match_name": true, "installer_arch": "x64", "installer_type": "msi", "installer_scope": "machine", diff --git a/ee/maintained-apps/inputs/winget/airtame.json b/ee/maintained-apps/inputs/winget/airtame.json index 0b28acb4707..843cc1fc378 100644 --- a/ee/maintained-apps/inputs/winget/airtame.json +++ b/ee/maintained-apps/inputs/winget/airtame.json @@ -2,7 +2,8 @@ "name": "Airtame", "slug": "airtame/windows", "package_identifier": "Airtame.Airtame", - "unique_identifier": "Airtame 4.15.0", + "unique_identifier": "Airtame", + "fuzzy_match_name": true, "installer_arch": "x86", "installer_type": "exe", "installer_scope": "machine", diff --git a/ee/maintained-apps/inputs/winget/firefox@esr.json b/ee/maintained-apps/inputs/winget/firefox@esr.json index d40c7dfbe07..4d286fe9bd2 100644 --- a/ee/maintained-apps/inputs/winget/firefox@esr.json +++ b/ee/maintained-apps/inputs/winget/firefox@esr.json @@ -2,7 +2,8 @@ "name": "Mozilla Firefox ESR", "slug": "firefox@esr/windows", "package_identifier": "Mozilla.Firefox.ESR", - "unique_identifier": "Mozilla Firefox 140.7.1 ESR (x64 en-US)", + "unique_identifier": "Mozilla Firefox ESR", + "fuzzy_match_name": "Mozilla Firefox % ESR %", "install_script_path": "ee/maintained-apps/inputs/winget/scripts/firefox_esr_install.ps1", "uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/firefox_esr_uninstall.ps1", "installer_arch": "x64", diff --git a/ee/maintained-apps/inputs/winget/gimp.json b/ee/maintained-apps/inputs/winget/gimp.json index f2fda58a050..cf53a63b631 100644 --- a/ee/maintained-apps/inputs/winget/gimp.json +++ b/ee/maintained-apps/inputs/winget/gimp.json @@ -2,7 +2,8 @@ "name": "GIMP", "slug": "gimp/windows", "package_identifier": "GIMP.GIMP.3", - "unique_identifier": "GIMP 3.0.8-2", + "unique_identifier": "GIMP", + "fuzzy_match_name": true, "install_script_path": "ee/maintained-apps/inputs/winget/scripts/gimp_install.ps1", "uninstall_script_path": "ee/maintained-apps/inputs/winget/scripts/gimp_uninstall.ps1", "installer_arch": "x64", diff --git a/ee/maintained-apps/inputs/winget/notion.json b/ee/maintained-apps/inputs/winget/notion.json index 55e1f62b38a..600831b5645 100644 --- a/ee/maintained-apps/inputs/winget/notion.json +++ b/ee/maintained-apps/inputs/winget/notion.json @@ -2,7 +2,8 @@ "name": "Notion", "slug": "notion/windows", "package_identifier": "Notion.Notion", - "unique_identifier": "Notion 6.1.0", + "unique_identifier": "Notion", + "fuzzy_match_name": true, "installer_arch": "x64", "installer_type": "exe", "installer_scope": "user", diff --git a/ee/maintained-apps/inputs/winget/postman.json b/ee/maintained-apps/inputs/winget/postman.json index dfe14830c36..02a2988e7c3 100644 --- a/ee/maintained-apps/inputs/winget/postman.json +++ b/ee/maintained-apps/inputs/winget/postman.json @@ -2,7 +2,8 @@ "name": "Postman", "slug": "postman/windows", "package_identifier": "Postman.Postman", - "unique_identifier": "Postman x64 11.75.4", + "unique_identifier": "Postman x64", + "fuzzy_match_name": true, "installer_arch": "x64", "installer_type": "exe", "installer_scope": "user", diff --git a/ee/maintained-apps/inputs/winget/putty.json b/ee/maintained-apps/inputs/winget/putty.json index b77cd4446d4..7ab9065cc39 100644 --- a/ee/maintained-apps/inputs/winget/putty.json +++ b/ee/maintained-apps/inputs/winget/putty.json @@ -2,7 +2,8 @@ "name": "PuTTY", "slug": "putty/windows", "package_identifier": "PuTTY.PuTTY", - "unique_identifier": "PuTTY release 0.83 (x64)", + "unique_identifier": "PuTTY release", + "fuzzy_match_name": true, "installer_arch": "x64", "installer_type": "msi", "installer_scope": "machine", diff --git a/ee/maintained-apps/outputs/010-editor/windows.json b/ee/maintained-apps/outputs/010-editor/windows.json index 7613f9bf835..6026bec5276 100644 --- a/ee/maintained-apps/outputs/010-editor/windows.json +++ b/ee/maintained-apps/outputs/010-editor/windows.json @@ -3,16 +3,14 @@ { "version": "16.0.4", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = '010 Editor 16.0.2 (64-bit)' AND publisher = 'SweetScape Software';", + "exists": "SELECT 1 FROM programs WHERE name LIKE '010 Editor %' AND publisher = 'SweetScape Software';", "patch": "" }, "installer_url": "https://download.sweetscape.com/010EditorWin64Installer16.0.4.exe", "install_script_ref": "5764f801", "uninstall_script_ref": "07227ac7", "sha256": "36bae5d17aac1919ac3b66ce22954794b36a058b459290440a7fed9ff2b379be", - "default_categories": [ - "Developer tools" - ] + "default_categories": ["Developer tools"] } ], "refs": { diff --git a/ee/maintained-apps/outputs/7-zip/windows.json b/ee/maintained-apps/outputs/7-zip/windows.json index 72cf1293119..e5b50a6ec82 100644 --- a/ee/maintained-apps/outputs/7-zip/windows.json +++ b/ee/maintained-apps/outputs/7-zip/windows.json @@ -3,16 +3,14 @@ { "version": "26.00", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = '7-Zip 25.01 (x64)' AND publisher = 'Igor Pavlov';", + "exists": "SELECT 1 FROM programs WHERE name LIKE '7-Zip %' AND publisher = 'Igor Pavlov';", "patch": "" }, "installer_url": "https://7-zip.org/a/7z2600-x64.msi", "install_script_ref": "8959087b", "uninstall_script_ref": "a94a6acc", "sha256": "c388d0444871ca11b21237001af158cfddad7e137851795e5b65cee69b518495", - "default_categories": [ - "Productivity" - ], + "default_categories": ["Productivity"], "upgrade_code": "{23170F69-40C1-2702-0000-000004000000}" } ], diff --git a/ee/maintained-apps/outputs/abstract/darwin.json b/ee/maintained-apps/outputs/abstract/darwin.json index d4fc801f153..cb377673ca8 100644 --- a/ee/maintained-apps/outputs/abstract/darwin.json +++ b/ee/maintained-apps/outputs/abstract/darwin.json @@ -3,20 +3,18 @@ { "version": "98.6.3", "queries": { - "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.SweetScape.010Editor';", + "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.elasticprojects.abstract-desktop';", "patch": "" }, "installer_url": "https://downloads.goabstract.com/mac/Abstract-98.6.3.zip", "install_script_ref": "40f16970", "uninstall_script_ref": "e76ec506", "sha256": "9bccf9b6a748039f69bb28f7aec453dc236035caf9cfba131fba92aeeaaca060", - "default_categories": [ - "Productivity" - ] + "default_categories": ["Productivity"] } ], "refs": { - "40f16970": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath $INSTALLER_PATH)\")\n# functions\n\nquit_and_track_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local timeout_duration=10\n\n # check if the application is running\n if ! osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null; then\n eval \"export $var_name=0\"\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 && \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n eval \"export $var_name=0\"\n return\n fi\n\n # App was running, mark it for relaunch\n eval \"export $var_name=1\"\n echo \"Application '$bundle_id' was running; will relaunch after installation.\"\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\nrelaunch_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local was_running\n\n # Check if the app was running before installation\n eval \"was_running=\\$$var_name\"\n if [[ \"$was_running\" != \"1\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 && \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping relaunching application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Relaunching application '$bundle_id'...\"\n\n # Try to launch the application\n if osascript -e \"tell application id \\\"$bundle_id\\\" to activate\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' relaunched successfully.\"\n else\n echo \"Failed to relaunch application '$bundle_id'.\"\n fi\n}\n\n\n# extract contents\nunzip \"$INSTALLER_PATH\" -d \"$TMPDIR\"\n# copy to the applications folder\nquit_and_track_application 'com.SweetScape.010Editor'\nif [ -d \"$APPDIR/Abstract.app\" ]; then\n\tsudo mv \"$APPDIR/Abstract.app\" \"$TMPDIR/Abstract.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Abstract.app\" \"$APPDIR\"\nrelaunch_application 'com.SweetScape.010Editor'\n", + "40f16970": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nTMPDIR=$(dirname \"$(realpath $INSTALLER_PATH)\")\n# functions\n\nquit_and_track_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local timeout_duration=10\n\n # check if the application is running\n if ! osascript -e \"application id \\\"$bundle_id\\\" is running\" 2>/dev/null; then\n eval \"export $var_name=0\"\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 && \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping quitting application ID '$bundle_id'.\"\n eval \"export $var_name=0\"\n return\n fi\n\n # App was running, mark it for relaunch\n eval \"export $var_name=1\"\n echo \"Application '$bundle_id' was running; will relaunch after installation.\"\n\n echo \"Quitting application '$bundle_id'...\"\n\n # try to quit the application within the timeout period\n local quit_success=false\n SECONDS=0\n while (( SECONDS < timeout_duration )); do\n if osascript -e \"tell application id \\\"$bundle_id\\\" to quit\" >/dev/null 2>&1; then\n if ! pgrep -f \"$bundle_id\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' quit successfully.\"\n quit_success=true\n break\n fi\n fi\n sleep 1\n done\n\n if [[ \"$quit_success\" = false ]]; then\n echo \"Application '$bundle_id' did not quit.\"\n fi\n}\n\n\nrelaunch_application() {\n local bundle_id=\"$1\"\n local var_name=\"APP_WAS_RUNNING_$(echo \"$bundle_id\" | tr '.-' '__')\"\n local was_running\n\n # Check if the app was running before installation\n eval \"was_running=\\$$var_name\"\n if [[ \"$was_running\" != \"1\" ]]; then\n return\n fi\n\n local console_user\n console_user=$(stat -f \"%Su\" /dev/console)\n if [[ $EUID -eq 0 && \"$console_user\" == \"root\" ]]; then\n echo \"Not logged into a non-root GUI; skipping relaunching application ID '$bundle_id'.\"\n return\n fi\n\n echo \"Relaunching application '$bundle_id'...\"\n\n # Try to launch the application\n if osascript -e \"tell application id \\\"$bundle_id\\\" to activate\" >/dev/null 2>&1; then\n echo \"Application '$bundle_id' relaunched successfully.\"\n else\n echo \"Failed to relaunch application '$bundle_id'.\"\n fi\n}\n\n\n# extract contents\nunzip \"$INSTALLER_PATH\" -d \"$TMPDIR\"\n# copy to the applications folder\nquit_and_track_application 'com.elasticprojects.abstract-desktop'\nif [ -d \"$APPDIR/Abstract.app\" ]; then\n\tsudo mv \"$APPDIR/Abstract.app\" \"$TMPDIR/Abstract.app.bkp\"\nfi\nsudo cp -R \"$TMPDIR/Abstract.app\" \"$APPDIR\"\nrelaunch_application 'com.elasticprojects.abstract-desktop'\n", "e76ec506": "#!/bin/sh\n\n# variables\nAPPDIR=\"/Applications/\"\nLOGGED_IN_USER=$(scutil <<< \"show State:/Users/ConsoleUser\" | awk '/Name :/ { print $3 }')\n# functions\n\ntrash() {\n local logged_in_user=\"$1\"\n local target_file=\"$2\"\n local timestamp=\"$(date +%Y-%m-%d-%s)\"\n local rand=\"$(jot -r 1 0 99999)\"\n\n # replace ~ with /Users/$logged_in_user\n if [[ \"$target_file\" == ~* ]]; then\n target_file=\"/Users/$logged_in_user${target_file:1}\"\n fi\n\n local trash=\"/Users/$logged_in_user/.Trash\"\n local file_name=\"$(basename \"${target_file}\")\"\n\n if [[ -e \"$target_file\" ]]; then\n echo \"removing $target_file.\"\n mv -f \"$target_file\" \"$trash/${file_name}_${timestamp}_${rand}\"\n else\n echo \"$target_file doesn't exist.\"\n fi\n}\n\nsudo rm -rf \"$APPDIR/Abstract.app\"\ntrash $LOGGED_IN_USER '~/Library/Application Support/Abstract'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.elasticprojects.abstract-desktop'\ntrash $LOGGED_IN_USER '~/Library/Caches/com.elasticprojects.abstract-desktop.ShipIt'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.elasticprojects.abstract-desktop.helper.plist'\ntrash $LOGGED_IN_USER '~/Library/Preferences/com.elasticprojects.abstract-desktop.plist'\ntrash $LOGGED_IN_USER '~/Library/Saved Application State/com.elasticprojects.abstract-desktop.savedState'\n" } } diff --git a/ee/maintained-apps/outputs/airtame/windows.json b/ee/maintained-apps/outputs/airtame/windows.json index 1e74d1aa942..68dbd87d437 100644 --- a/ee/maintained-apps/outputs/airtame/windows.json +++ b/ee/maintained-apps/outputs/airtame/windows.json @@ -3,16 +3,14 @@ { "version": "4.15.0", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = 'Airtame 4.15.0' AND publisher = 'Airtame';", + "exists": "SELECT 1 FROM programs WHERE name LIKE 'Airtame %' AND publisher = 'Airtame';", "patch": "" }, "installer_url": "https://downloads.airtame.com/app/latest/win/Airtame-4.15.0-setup.exe", "install_script_ref": "8a919fae", "uninstall_script_ref": "1e649d42", "sha256": "1c627548a1cea11e1998c6814b5d731ee6a955db3253d244cc0ccfb95d52edd7", - "default_categories": [ - "Productivity" - ] + "default_categories": ["Productivity"] } ], "refs": { diff --git a/ee/maintained-apps/outputs/apps.json b/ee/maintained-apps/outputs/apps.json index aacead860f6..4baf7a4197c 100644 --- a/ee/maintained-apps/outputs/apps.json +++ b/ee/maintained-apps/outputs/apps.json @@ -131,7 +131,7 @@ "name": "Amazon Chime", "slug": "amazon-chime/darwin", "platform": "darwin", - "unique_identifier": "com.runningwithcrayons.Alfred", + "unique_identifier": "com.amazon.Amazon-Chime", "description": "Amazon Chime is a communications service that lets you meet, chat, and place business calls inside and outside your organization." }, { @@ -257,7 +257,7 @@ "name": "Beyond Compare", "slug": "beyond-compare/darwin", "platform": "darwin", - "unique_identifier": "com.scootersoftware.BeyondCompare", + "unique_identifier": "com.ScooterSoftware.BeyondCompare", "description": "Beyond Compare is an app used to compare files and folders." }, { diff --git a/ee/maintained-apps/outputs/firefox@esr/windows.json b/ee/maintained-apps/outputs/firefox@esr/windows.json index f29d189e9db..88708dbed66 100644 --- a/ee/maintained-apps/outputs/firefox@esr/windows.json +++ b/ee/maintained-apps/outputs/firefox@esr/windows.json @@ -3,16 +3,14 @@ { "version": "140.9.0", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = 'Mozilla Firefox 140.7.1 ESR (x64 en-US)' AND publisher = 'Mozilla';", + "exists": "SELECT 1 FROM programs WHERE name LIKE 'Mozilla Firefox % ESR %' AND publisher = 'Mozilla';", "patch": "" }, "installer_url": "https://download-installer.cdn.mozilla.net/pub/firefox/releases/140.9.0esr/win64/en-US/Firefox%20Setup%20140.9.0esr.exe", "install_script_ref": "36995f4f", "uninstall_script_ref": "5dc712f7", "sha256": "cf734896cbacc7bf2ab81eba6cb934bb11fb3d26b818e9917eafd14f80cae056", - "default_categories": [ - "Browsers" - ] + "default_categories": ["Browsers"] } ], "refs": { diff --git a/ee/maintained-apps/outputs/gimp/windows.json b/ee/maintained-apps/outputs/gimp/windows.json index 8e38798ff43..c7bfa3d2216 100644 --- a/ee/maintained-apps/outputs/gimp/windows.json +++ b/ee/maintained-apps/outputs/gimp/windows.json @@ -3,16 +3,14 @@ { "version": "3.2.0.0", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = 'GIMP 3.0.8-2' AND publisher = 'The GIMP Team';", + "exists": "SELECT 1 FROM programs WHERE name LIKE 'GIMP %' AND publisher = 'The GIMP Team';", "patch": "" }, "installer_url": "https://download.gimp.org/gimp/v3.2/windows/gimp-3.2.0-setup.exe", "install_script_ref": "7e5269bc", "uninstall_script_ref": "79fb181d", "sha256": "6332ab8fdf9d1f229abd7aab18874d476ae31405e2fe75bf786b8fdc90b891a8", - "default_categories": [ - "Productivity" - ] + "default_categories": ["Productivity"] } ], "refs": { diff --git a/ee/maintained-apps/outputs/notion/windows.json b/ee/maintained-apps/outputs/notion/windows.json index 3b176fb0c99..dd84fcdfc5b 100644 --- a/ee/maintained-apps/outputs/notion/windows.json +++ b/ee/maintained-apps/outputs/notion/windows.json @@ -3,16 +3,14 @@ { "version": "7.9.0", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = 'Notion 6.1.0' AND publisher = 'Notion Labs, Inc';", + "exists": "SELECT 1 FROM programs WHERE name LIKE 'Notion %' AND publisher = 'Notion Labs, Inc';", "patch": "" }, "installer_url": "https://desktop-release.notion-static.com/Notion%20Setup%207.9.0.exe", "install_script_ref": "0803ad8c", "uninstall_script_ref": "a8fdd9b7", "sha256": "f0d20c10a3d4da1c06a46024653b9eb2243c0b0855b554dc6bef3272aa11b436", - "default_categories": [ - "Productivity" - ] + "default_categories": ["Productivity"] } ], "refs": { diff --git a/ee/maintained-apps/outputs/postman/windows.json b/ee/maintained-apps/outputs/postman/windows.json index 060faac09ce..507b3f37a50 100644 --- a/ee/maintained-apps/outputs/postman/windows.json +++ b/ee/maintained-apps/outputs/postman/windows.json @@ -3,16 +3,14 @@ { "version": "12.3.6", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = 'Postman x64 11.75.4' AND publisher = 'Postman';", + "exists": "SELECT 1 FROM programs WHERE name LIKE 'Postman x64 %' AND publisher = 'Postman';", "patch": "" }, "installer_url": "https://dl.pstmn.io/download/version/12.3.6/windows_64", "install_script_ref": "538f63bf", "uninstall_script_ref": "cd01b68f", "sha256": "865373a080f8cabff725c36047820edd4daaa1b1c58b7a43eeaf56f04a2ea88a", - "default_categories": [ - "Developer tools" - ] + "default_categories": ["Developer tools"] } ], "refs": { diff --git a/ee/maintained-apps/outputs/putty/windows.json b/ee/maintained-apps/outputs/putty/windows.json index 50b455c956f..a6ad58ff33e 100644 --- a/ee/maintained-apps/outputs/putty/windows.json +++ b/ee/maintained-apps/outputs/putty/windows.json @@ -3,16 +3,14 @@ { "version": "0.83.0.0", "queries": { - "exists": "SELECT 1 FROM programs WHERE name = 'PuTTY release 0.83 (x64)' AND publisher = 'Simon Tatham';", + "exists": "SELECT 1 FROM programs WHERE name LIKE 'PuTTY release %' AND publisher = 'Simon Tatham';", "patch": "" }, "installer_url": "https://the.earth.li/~sgtatham/putty/0.83/w64/putty-64bit-0.83-installer.msi", "install_script_ref": "8959087b", "uninstall_script_ref": "4968aa57", "sha256": "aa8e5036d973688f1e8622fbe9ab22e037346e0def0197bf5e7cdf37da4e223d", - "default_categories": [ - "Productivity" - ], + "default_categories": ["Productivity"], "upgrade_code": "{C9EAA861-2B72-4FAF-9FEE-EEB1AD5FD15E}" } ], diff --git a/ee/maintained-apps/outputs/teleport-suite/darwin.json b/ee/maintained-apps/outputs/teleport-suite/darwin.json index dbba5465659..1b5a7993b3a 100644 --- a/ee/maintained-apps/outputs/teleport-suite/darwin.json +++ b/ee/maintained-apps/outputs/teleport-suite/darwin.json @@ -3,16 +3,14 @@ { "version": "18.7.3", "queries": { - "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.gravitational.teleport';", + "exists": "SELECT 1 FROM apps WHERE bundle_identifier = 'com.gravitational.teleport.tsh';", "patch": "" }, "installer_url": "https://cdn.teleport.dev/teleport-18.7.3.pkg", "install_script_ref": "3435fc52", "uninstall_script_ref": "42474e69", "sha256": "ecec5030b99b5981d3d9be8e0478bfde21940ccf29e426fb2403de6211fc12a0", - "default_categories": [ - "Developer tools" - ] + "default_categories": ["Developer tools"] } ], "refs": {