SPB Git

Repository Public License

privacy.md 15.3 KB

# ORIX Secure — Privacy

Sources: ORIXSecureEngines/PrivacyAuditEngine.swift, ORIXSecureEngines/Checklist.swift (ChecklistCatalog.privacyItems), App/Sources/Core/AppModel.swift (permissions), AppLock.swift, AppSettings.swift, LocalStore.swift, ORIXReporting/Redaction.swift, App/Resources/Info.plist, PrivacyInfo.xcprivacy, ORIXSecure.entitlements.

# 1. Privacy assessment

flowchart TD
    subgraph Own["ORIX Secure's own permission states"]
        P1["PHPhotoLibrary.authorizationStatus(for: .readWrite)"]
        P2["AVCaptureDevice.authorizationStatus(for: .video)"]
        P3["CLLocationManager.authorizationStatus"]
        P4["Local network: no public API → .unknown"]
        P5["Face ID: inferred from SecuritySignals<br/>and AppSettings.appLockEnabled"]
    end
    P1 --> PERM["[AppPermission]<br/>AppModel.permissions(settings:signals:)"]
    P2 --> PERM
    P3 --> PERM
    P4 --> PERM
    P5 --> PERM
    ANS[("StoredAnswer rows")] --> RESP["[ChecklistResponse]"]
    PERM --> ENG["PrivacyAuditEngine.audit(permissions:responses:now:)"]
    RESP --> ENG
    CAT["ChecklistCatalog.privacyItems — 16 items"] --> ENG
    ENG --> F1["appPermissions: 5 findings<br/>privacy.app.KIND"]
    ENG --> F2["checklist: 16 findings<br/>SecurityChecklistEngine rules"]
    ENG --> F3["practices: 7 facts about the app"]
    ENG --> F4["notAssessable: 4 platform limits"]
    F1 --> AUD["PrivacyAudit"]
    F2 --> AUD
    F3 --> AUD
    F4 --> AUD
    AUD --> SUM["AssessmentSummary — counts and coverage, no score"]
    AUD --> REP["ReportBuilder.privacy → ReportDocument kind .privacyAudit"]
  • Permission findings (privacy.app.photos, .camera, .location, .localNetwork, .faceID) have state verified (measured / publicAPI) for every status except .unknown, which gives notAvailable (none / notVerifiable). verified here means "the state was read", not "the state is good": a denied permission is reported as a fact with the feature it disables. Each finding carries the purpose text (AppPermissionKind.purpose), the Settings path and the note that other apps' permissions cannot be read.
  • The Face ID status is not read from an OS permission API. It is denied when biometryEnrolled is unavailable with kind permissionRequired, else granted when App Lock is enabled, else notRequested.
  • Checklist findings follow the rules in security-engine.md §4. The 16 items cover tracking and advertising (priv.tracking, priv.ads, priv.safari.tracking, priv.mail), app permissions (priv.location.review, priv.photos.review, priv.mic.review, priv.camera.review, priv.contacts.review, priv.localnetwork.review, priv.bluetooth.review, priv.report), sharing (priv.safetycheck, priv.analytics, priv.significant — optional) and the Lock Screen (priv.previews). The app cannot read any of these settings; a result is always what the user reported.
  • PrivacyAuditEngine.practices states seven facts about the app: no account, no advertising or analytics SDK, no tracking, no data collected by the developer, results stored on the device only, network connections limited to the tests the user starts, photos analysed on the device.

# 2. The app's own permissions

Permission Info.plist key Where the request happens Without it
Photos (read-write) NSPhotoLibraryUsageDescription PhotoCleanupController.requestAccess() → PHPhotoLibrary.requestAuthorization(for: .readWrite), from the "Choose Photo Access" button in PhotoCleanupView; also by the photos.scan workflow step in ActionsController when access is notDetermined. Photo Cleanup stays off. Limited access works and is labelled as partial coverage.
Camera NSCameraUsageDescription LinkAnalyzerView.openScanner() → AVCaptureDevice.requestAccess(for: .video) when the status is .notDetermined, after the user taps "Scan QR"; the scanner sheet is then shown. The sheet shows "Camera not available" with a link to Settings; "QR from Photo" (PhotosPicker + Vision) works without any permission.
Location (when in use) NSLocationWhenInUseUsageDescription NetworkController.requestLocationForWiFi() → CLLocationManager.requestWhenInUseAuthorization(), from "Allow to Read Wi-Fi Security" in NetworkLabView. wifi.security is notAvailable with the reason; all other network checks work.
Local network NSLocalNetworkUsageDescription, NSBonjourServices (14 types) Triggered by iOS at the first NWBrowser start, i.e. "Scan Local Network" (NetworkController.browseLocalNetwork()). The browse reports permissionRequired.
Face ID NSFaceIDUsageDescription AppLock.enable() / disable() / unlock() → LAContext.evaluatePolicy(.deviceOwnerAuthentication), when the user turns App Lock on or off in Settings or the app is locked. The passcode remains a fallback; App Lock is optional.

Further facts:

  • CLLocationManager is used for its authorization and accuracy state only. No call to requestLocation, startUpdatingLocation or any other position API exists in the app; no coordinate is read or stored.
  • PHPhotoLibrary.authorizationStatus, AVCaptureDevice.authorizationStatus and CLLocationManager().authorizationStatus are read at every AppModel.recompute() without prompting.
  • The app never requests tracking authorization, contacts, microphone, Bluetooth, calendars, health or notifications; the corresponding usage-description keys are absent from Info.plist.
  • The single entitlement is com.apple.developer.networking.wifi-info. There is no iCloud, App Group, keychain-sharing, push or NetworkExtension entitlement.
  • Files reach the app through fileImporter (security-scoped URLs opened and closed around each operation), "Open in ORIX Secure" (document type public.data, not opened in place) and the PasteButton for links, which requires no pasteboard permission prompt. The file scanner writes to the pasteboard only when the user taps "Copy" on a hash.
  • Share extension: activation rule NSExtensionActivationSupportsWebURLWithMaxCount 1 and NSExtensionActivationSupportsText. It analyses the shared link in place with URLRiskAnalyzer, makes no network request, writes nothing, and shares no container with the app.

# 3. Privacy manifest (App/Resources/PrivacyInfo.xcprivacy)

Key Value
NSPrivacyTracking false
NSPrivacyTrackingDomains empty
NSPrivacyCollectedDataTypes empty
NSPrivacyAccessedAPICategoryDiskSpace reasons 85F4.1, E174.1 (volume capacity keys)
NSPrivacyAccessedAPICategoryFileTimestamp reasons DDA9.1, 3B52.1, C617.1 (file dates in the inspector and scanners)
NSPrivacyAccessedAPICategoryUserDefaults reason CA92.1 (AppSettings)
NSPrivacyAccessedAPICategorySystemBootTime reason 35F9.1 (kern.boottime)

The share extension has its own manifest, ShareExtension/Resources/PrivacyInfo.xcprivacy: tracking false, no tracking domains, no collected data types, and an empty NSPrivacyAccessedAPITypes array (it uses no required-reason API). ITSAppUsesNonExemptEncryption is false in the app's Info.plist.

# 4. Data stored and for how long

Data Where Written when Removed when
Saved reports (StoredReport) SwiftData store, Application Support/ORIXSecure/Database The user taps a save button; a file cleanup completes; a workflow generates its report; a link is analysed while link history is on. Per-report delete, "Delete N Report(s)", or "Erase All App Data". No automatic expiry.
Checklist answers (StoredAnswer) SwiftData store The user answers an item (one row per item). The user clears the answer, or "Erase All App Data". An answer older than the item's validityDays is ignored by the engine but stays stored.
Workflows (StoredWorkflow) SwiftData store The user saves a workflow. Deleted individually, or "Erase All App Data".
Preferences UserDefaults Settings changes. "Erase All App Data" calls AppSettings.reset() (link history, redaction and appearance return to their defaults), then restores hasSeenWelcome = true and the previous App Lock setting. Also reset by the debug launch option -ORIXReset.
Photo fingerprints Caches/ORIXSecure/orix-media-fingerprints.cache Each photo scan. Pruned to existing assets at each complete scan; "Clear Caches and Temporary Files"; iOS may purge Caches.
Export files tmp/ORIXSecureExports An export is rendered for the share sheet. "Clear Caches and Temporary Files", "Erase All App Data"; iOS may purge tmp. Not removed automatically after sharing.

Held in memory only and lost when the process ends: the device snapshot, security signals, network change log (200 entries), DNS / latency / TLS / HTTPS / Bonjour results, the photo analysis and selection, file inspection results and an unsaved link analysis.

What a report contains: ReportBuilder.deviceFacts writes the model identifier and system version (and a Simulator note). No device name, serial number, advertising identifier or account identifier is read anywhere in the code. A network report can contain this device's interface addresses, the SSID and BSSID, proxy endpoints and the probed host; a link report contains the link as received (clipped to 300 characters); a file report contains the file name, size, dates and SHA-256.

Protection at rest: the app's folders are created with FileProtectionType.complete as a directory attribute (see overview.md §4). Nothing is synced: there is no CloudKit configuration and no iCloud entitlement.

AppSettings.keepLinkHistory defaults to false (defaults.bool(forKey:) of an unset key). With the default, LinkAnalyzerView.analyze() keeps the analysis in view state only; it is stored only if the user taps "Save as Report". With the setting on, every analysed link is saved as a .urlAnalysis report. Links decoded from a QR code go through handleQR and are not auto-saved by this setting. The share extension never stores anything.

# 6. Export redaction

ReportsView.export renders a stored report as PDF, Markdown, JSON or plain text (ReportFormat) into AppFolders.exports and hands the file URL to UIActivityViewController. When AppSettings.redactExports is on (the default), it exports report.redacted(.all); the export menu header states which of the two applies. The stored report is never modified.

RedactionOptions fields, all enabled by .all (additionalTerms stays empty in the app):

Option Effect
deviceName Masks the value of any fact or evidence whose label contains a device/host-name term (English and French list), and every other occurrence of that value.
additionalTerms Extra literal strings to mask everywhere.
ipAddresses Masks IPv4 addresses (pattern) and IPv6 addresses (pattern proposes candidates, inet_pton decides).
networkIdentifiers Masks values labelled SSID / BSSID / network name, their other occurrences, and any MAC-style address.
filePathUsers Masks the user segment of /Users/<name>/, /home/<name>/ and container identifiers in app-container paths.
urlQueries Replaces the query string of full URLs with the marker.

Mechanics and limits, as coded in Redactor:

  • Label-sensitive values of at least 3 characters are collected first and replaced everywhere (case- and diacritic-insensitive, longest first), in titles, summaries, paragraphs, bullets, facts, finding text and evidence.
  • Detection is by label and by pattern. The doc comment on redacted(_:) says to review the result before sharing, because free text can still identify the user.
  • Host names, domains and file names are not masked by any option; only the query part of a URL is.
  • Redaction applies at export time only; reports viewed in the app are shown in full.

# 7. App Lock

AppLock (App/Sources/Core/AppLock.swift), off by default:

  • enable() requires a successful evaluatePolicy(.deviceOwnerAuthentication) before setting appLockEnabled, so the lock cannot be turned on without proving that authentication works. The toggle is disabled when AppLock.isAvailable is false (no device passcode).
  • isLocked starts as appLockEnabled at launch and is set again by lockIfEnabled() when the scene phase becomes .background.
  • While locked, ORIXSecureApp overlays LockScreen on the root view; it calls unlock() on appearance and from its button. The policy is .deviceOwnerAuthentication: biometrics first, device passcode as fallback. The authentication error text, if any, is shown on the lock screen.
  • disable() is async and requires a successful evaluatePolicy(.deviceOwnerAuthentication) before turning the setting off; on failure the Settings screen reports that App Lock stays on.
  • forceDisable() turns the setting off and unlocks without authentication. It is called by disable() after authentication and has no other caller in the app.
  • "Erase All App Data" keeps the App Lock setting as it was, so erasing data is not a way around the lock.
  • App Lock is a UI gate. It adds no encryption layer of its own and does not apply to the share extension.

# 8. What the app cannot see about other apps

PrivacyAudit.notAssessable lists four entries of PlatformLimits.securityAssessments, shown in the audit and written to the report's unavailable list:

id Limit
apps.permissions Permissions granted to other apps: an app reads its own states only (Settings › Privacy & Security).
apps.installed The list of installed apps cannot be enumerated.
safari.history Safari history and website data, like any other app's data, are outside the sandbox.
traffic.others Other apps' network traffic is invisible without a VPN or content-filter entitlement; ORIX Secure installs neither.

Consequences in the design: the privacy checklist sends the user to the relevant Settings pane (openSettings() opens the app's own Settings page) and records the answer as userReported; the item priv.report points to App Privacy Report, the system feature that holds per-app access and network activity. The app makes no claim about any other app.

# 9. Verification status

  • DeviceStoragePrivacyTests covers the permission findings for every kind and status and the audit structure; redaction is covered by ORIXReportingTests. They were not re-run while writing this document.
  • Permission prompts for Photos, camera, location and local network, and the Face ID / passcode sheet, were exercised in the iOS Simulator or compiled only; none was verified on a physical device.
  • The file-protection class of the SwiftData store and export files was not measured on a device; the app.dataProtection probe that would report the class of a new file is unavailable in the Simulator.
  • The App Lock overlay was not tested against the app-switcher snapshot taken when the app leaves the foreground: the lock is set on .background, not on .inactive.
Files main
Menu

Theme