From eb6b0877d83a04671ca3155f7a47775b4df0655b Mon Sep 17 00:00:00 2001 From: Artem Chepurnoy Date: Sat, 1 Jun 2024 21:26:55 +0300 Subject: [PATCH] improvement: Add Firefix Nightly to the list of privileged apps #364 --- .github/update_gpm_passkeys_priv_apps.py | 26 +++++++++++++++++++ .../files/gpm_passkeys_privileged_apps.json | 12 +++++++++ 2 files changed, 38 insertions(+) diff --git a/.github/update_gpm_passkeys_priv_apps.py b/.github/update_gpm_passkeys_priv_apps.py index f30f6be..18d84cc 100644 --- a/.github/update_gpm_passkeys_priv_apps.py +++ b/.github/update_gpm_passkeys_priv_apps.py @@ -3,11 +3,37 @@ import requests URL_APPS = "https://www.gstatic.com/gpm-passkeys-privileged-apps/apps.json" +EXTRA_APPS = [ + # Firefox Nightly for Developers + # https://play.google.com/store/apps/details?id=org.mozilla.fenix + { + "type": "android", + "info": { + "package_name": "org.mozilla.fenix", + "signatures": [ + { + "build": "release", + "cert_fingerprint_sha256": "50:04:77:90:88:E7:F9:88:D5:BC:5C:C5:F8:79:8F:EB:F4:F8:CD:08:4A:1B:2A:46:EF:D4:C8:EE:4A:EA:F2:11" + } + ] + } + }, +] + response = requests.get( URL_APPS, ) json_obj = response.json() +# Add extra apps to the resulting privileged +# apps list. +for extra in EXTRA_APPS: + apps = json_obj["apps"] + for app in apps: + if app["type"] == extra["type"] and app["info"]["package_name"] == extra["info"]["package_name"]: + break + else: + apps.append(extra) json_text = json.dumps(json_obj, indent=2) with open('common/src/commonMain/composeResources/files/gpm_passkeys_privileged_apps.json', 'w') as f: diff --git a/common/src/commonMain/composeResources/files/gpm_passkeys_privileged_apps.json b/common/src/commonMain/composeResources/files/gpm_passkeys_privileged_apps.json index 263805e..bcc1df7 100644 --- a/common/src/commonMain/composeResources/files/gpm_passkeys_privileged_apps.json +++ b/common/src/commonMain/composeResources/files/gpm_passkeys_privileged_apps.json @@ -531,6 +531,18 @@ } ] } + }, + { + "type": "android", + "info": { + "package_name": "org.mozilla.fenix", + "signatures": [ + { + "build": "release", + "cert_fingerprint_sha256": "50:04:77:90:88:E7:F9:88:D5:BC:5C:C5:F8:79:8F:EB:F4:F8:CD:08:4A:1B:2A:46:EF:D4:C8:EE:4A:EA:F2:11" + } + ] + } } ] } \ No newline at end of file