Skip to content

Security and usability review: remaining items #318

Open

Description

@lazzurs

I ran a static security and usability review of main at f484eb8 (app 1.2.0). Overall the codebase is in very good shape: no critical or high findings, and most of the usual problems for this kind of app (plaintext tokens, backups, exported components, logged secrets, TLS bypass) are already handled well.

This issue tracks what is left. I'll work through it in small PRs, one at a time, each referencing this issue. Paths use …/ for app/src/main/java/dev/wander/android/opentagviewer/; line numbers are as of f484eb8.

Merged: #314 (pin actions by SHA, Dependabot for actions), #317 (the eager sign-out below).
Open: #313 (split release signing into its own job), #315 (Remove deletes a tag's keys, optional erase of history and all data), #320 (keep app data off device-to-device transfer), #321 (location-history retention setting).

Larger changes

  • iCloud keychain join wording. The iCloud route adds the app to the account's iCloud Keychain as a trusted member and keeps the Apple ID password (encrypted with the Keystore). Neither is said on screen, and unlink/logout can't remove the membership. Say both before the passcode step, give verified removal steps or leave the circle on unlink, offer to forget the membership on logout, and consider StrongBox / setUnlockedDeviceRequired for the two Keystore aliases. (…/FetchFromICloudActivity.java:427-444, app/src/main/python/icloud_bridge.py:594-660, strings.xml:213-214,271, …/util/android/AppCryptographyUtil.java:139-145)
  • Release workflow tidy-up. Move the remaining ${{ }} values in release run: blocks (--tag "${{ github.ref }}", the MAPS_API_KEY echo, TAG="${{ inputs.tag || github.ref }}") to env:, and replace softprops/action-gh-release in the exporter release with gh as Sign the release APK in a job of its own #313 does for the app. (build-release.yml, macos-exporter-python.yml:70)
  • Exporter binaries. Publish SHA-256 checksums and build attestations; Developer ID signing / notarisation and Authenticode if wanted later. (macos-exporter-python.yml:250-418)

Security hardening

  • Exclude the database and user_auth DataStore from Android 12+ device-to-device transfer; data_extraction_rules.xml is still the template, and allowBackup="false" doesn't cover transfer. (AndroidManifest.xml:82-84) In Keep app data off device-to-device transfer and backups #320.
  • Lock Chaquopy's transitive Python dependencies with a constraints file (only FindMy.py, NSKeyedUnArchiver and PyYAML are pinned), and use --require-hashes for the bridge-test pip install. (app/build.gradle.kts:427-458)
  • Gradle distributionSha256Sum, wrapper validation, verification-metadata.xml, and Dependabot for gradle/pip/uv. (gradle/wrapper/gradle-wrapper.properties)
  • Encrypt the key columns (content, accessory_json, alignment_plist) at rest, possibly with AppCryptographyUtil under a new alias instead of SQLCipher, and add a location-history retention setting. (…/db/room/entity/OwnedBeacon.java:40,101) Retention in Add a setting for how long location history is kept #321; encryption will get its own issue first.
  • Size and entry-count limits on bundle and history imports; one huge entry currently causes an OutOfMemoryError crash. (…/util/parse/AppleZipImporterUtil.java:205-210, …/util/history/HistoryImporter.java:154-162)
  • Show a summary before an import updates tags already on the phone. Today refreshFromImport overwrites content, keeps the old accessory_json, and clears from_account and is_removed. (…/db/room/dao/OwnedBeaconDao.java:91-101, …/MapsActivity.java:1387-1388)
  • Reject unencrypted entries in a passcode-locked bundle (not tested against zip4j). (…/util/parse/AppleZipImporterUtil.java:177-184)
  • Warn on an http:// Anisette server URL, as the Find Hub screen already does. (…/util/validate/AnisetteUrlValidatorUtil.java:13, network_security_config.xml:9)
  • Drop unused READ_PHONE_STATE, WRITE_EXTERNAL_STORAGE and ACCESS_WIFI_STATE, and only set the AMap privacy flags when the user chooses AMap. (AndroidManifest.xml:52-54, …/OpenAirTagApplication.java:55,258-283)
  • Exporter: create the legacy decryptor's output 0700/0600 with a delete-when-done warning (python/exporter/airtag_decryptor.py), use a per-user log directory on Linux (python/exporter/wizard.py:1293-1301), and remove the stale "Android can't import encrypted bundles" docstring (python/opentagviewer_export/zipsink.py:41-44).
  • Minor: don't log rejected 2FA codes or the SMS number (…/AppleLoginActivity.java:979,1274,1313), mark the copied bundle passcode EXTRA_IS_SENSITIVE (…/ui/mydevices/ExportedBundleDialog.java:74-75), consider FLAG_SECURE on login screens, neutralise = + - @ in CSV export (…/util/export/HistoryCsvWriter.java:153-168).
  • Consider loading the Android ADI libraries in an isolated process like :macadi. (…/anisette/LocalAnisette.java:224-243)
  • Build hygiene: Chaquopy plugin declared as 16.0.0 in settings.gradle.kts:15 and 16.1.0 in libs.versions.toml.

Usability

  • Friendly, translated messages for a wrong password or wrong 2FA code; today a wrong password falls through to REASON_UNKNOWN and shows the Python exception text. Only suggest another Anisette server in remote mode. (app/src/main/python/main.py:604-650, …/AppleLoginActivity.java:870-873,1336-1340)
  • After a failed 2FA code request the login screen goes blank (the choice page is never re-shown), and Back does nothing anywhere in login. (…/AppleLoginActivity.java:215-220,952-963,972-983)
  • Refresh failures are silent (the toast is commented out); show an error with Retry and mark the location as stale. (…/MapsActivity.java:1771-1775,2998-3002)
  • contentDescription for icon-only buttons: map menu, navigate and my-location buttons, Back and page menu on every screen, history day navigation, icon picker; labels for the six 2FA boxes. (activity_maps.xml:65,124,142, inline_top_toolbar*.xml, view_history_bottom_sheet.xml:40,64,74, two_factor_code_row.xml)
  • History is only collected while the app is open (no WorkManager; look-back capped at 24 h), so the README's "automatically save" overstates it. Backfill up to 7 days on start, or say so in the README and History screen. (README.md:40, …/util/rx/RefreshPolicy.java:119-123)
  • iCloud passcode step: the 3-attempt counter resets when the page is re-entered, the copy encourages retrying, and nothing mentions Apple's limit. Persist attempts per device and give exhaustion its own message. (…/FetchFromICloudActivity.java:398,463-470, strings.xml:217)
  • Location-permission rationale says position is only shown on the map, but nearby sightings store the phone's position as tag history and exports include it. (strings.xml:67,479, …/AccessorySightingPersister.java:143)
  • Empty state on the map when there are no tags (onboarding's "Later" also suppresses the iCloud offer). (activity_maps.xml, …/OnboardingActivity.java)
  • 48dp touch targets (toolbar buttons are 35dp, map buttons 40dp) and flexible 2FA boxes for large font scales. (inline_top_toolbar*.xml:28, two_factor_code_row.xml:21,29)
  • Remaining hardcoded toasts, <plurals> for counts ("1 data points", "Found 1 tags"), and unused template strings (nav_header_title, menu_gallery, menu_slideshow). (…/AppleLoginActivity.java:889, …/DeviceInfoActivity.java:1437, …/HistoryViewActivity.java:621)
  • Map is locked to portrait despite landscape and wide-screen resources. (AndroidManifest.xml:234)
  • README: "Inactive" / "feature-complete as of 1.1.0" status, names malmeloo/FindMy.py rather than the fork, no minimum Android version (7.0), iCloud route described as needing only the phone, newer features missing. (README.md:12,16,22,75)

Found along the way

Activity

  1. added
    @app
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    @app

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions