SPB Git

Repository Public

SECURITY.md 3.9 KB

# Security and privacy

# Data

  • Everything is local: projects live in the app container (macOS: ~/Library/Containers/ai.spboucher.splecturestudio/Data/Library/Application Support/Lectures; iOS: Documents/Lectures, visible in the Files app). No account, no analytics, no network use in the record → edit → export path.
  • iOS file protection: completeUntilFirstUserAuthentication on project files, so a recording can continue with the screen locked while files stay encrypted before the first unlock after boot.
  • Source recordings, the PDF copy and the event log are never rewritten or deleted by editing or exporting. Deleting a project moves it to the library trash (.Trash), restorable until the user explicitly empties it (with a confirmation).
  • SHA-256 of every finalized segment and of the PDF copy is stored in the manifest; "Vérifier l'intégrité" re-computes them.

# Permissions

  • Microphone, camera and speech recognition are requested only when the user starts the feature that needs them. A denied microphone leads to an explanation and the PDF-only mode, never to a silent failure.
  • The recording state (pill, red clock, and a dot in the presentation window) is always visible while capturing. The app records only its own PDF canvas, the chosen microphone and, if enabled, the chosen camera. It never captures other apps or the screen.

# Sandbox and signing

  • macOS: App Sandbox + hardened runtime. Entitlements: device.audio-input, device.camera, files.user-selected.read-write, network.client (only used by the optional upload and remote transcription). No restricted entitlement, no provisioning profile. Developer ID signed, notarized, stapled. scripts/archive-macos.sh fails if get-task-allow is present or the runtime flag is missing.
  • iOS/iPadOS: automatic signing, App Store Connect distribution. Background mode: audio only.
  • No credential, identity or secret is stored in the repository. The App Store Connect key ids are read from ~/.config/splecturestudio/asc.env; the notary credentials stay in the keychain profile. Scripts never print them.
  • ITSAppUsesNonExemptEncryption is false: the app only uses Apple's CryptoKit / CommonCrypto (AES-GCM, PBKDF2, SHA-256) for the optional encrypted bundle. The owner should confirm this export-compliance answer before public distribution.

# Optional network features (all off until configured)

  • Upload: explicit, per file, to a user-configured tus endpoint. HTTPS is required (plain HTTP only for localhost). Bearer token in the Keychain (AfterFirstUnlockThisDeviceOnly), optionally gated by Face ID / Touch ID (LocalAuthentication; the biometric check is local and nothing biometric is transmitted). Resumable; the upload state holds no secret.
  • Remote transcription: user-configured OpenAI-compatible endpoint, HTTPS required, used only after an explicit consent toggle and only when the user starts a transcription with that engine. Audio is sent as 16 kHz WAV chunks; nothing is kept by the app on the server and the app cannot vouch for the server's retention.
  • Encrypted bundle (SecureBundle, library code): AES-256-GCM in 1 MB chunks, key from PBKDF2-HMAC-SHA256 (310 000 iterations), chunk counter and "last chunk" flag authenticated so truncation, reordering and tampering are detected. Tested; not yet exposed in the UI.

# Review notes

  • ZIP import refuses absolute paths, .. components and paths escaping the destination, and verifies CRCs.
  • The event log reader tolerates damaged lines; the manifest reader refuses newer schemas instead of rewriting them.
  • Debug-only code (SelfTest.swift: demo PDF, scripted end-to-end test) is compiled out of Release builds (#if DEBUG).
  • Not done: third-party security audit, fuzzing of the PDF / ZIP / event parsers, privacy manifest review for App Store submission.
Files main
Menu

Theme