SECURITY.md (2455B)
1 # Security policy 2 3 ## Reporting 4 5 Use GitHub private vulnerability reporting when it is available. 6 7 Do not publish secret keys, nsec values, NIP-46 secrets, decrypted private 8 contracts, or exploitable operational details in a public issue. 9 10 ## Scope 11 12 Security-sensitive areas include: 13 14 - key generation and recovery; 15 - operating-system keyring custody; 16 - FFI compatibility; 17 - native library loading; 18 - database migrations and recovery; 19 - operation replay; 20 - relay transport; 21 - private Nostr events; 22 - package provenance; 23 - dependency policy. 24 25 ## Runtime boundaries 26 27 The implemented native runtime keeps private keys and signing behind the 28 UniFFI boundary with operating-system keyring custody. Kotlin handles opaque 29 identifiers and bounded public data. Native SQLx state, migrations, recovery, 30 installation identities, and FFI compatibility retain their existing contracts. 31 32 The planned browser runtime uses explicit extension identity/signing without 33 raw private-key custody. Its IndexedDB and sessions are separate from the 34 native database and keyring. Browser-specific threats include XSS, extension 35 interaction, private-session teardown, inbox ownership/readiness, and private 36 message authentication. Applesauce adapters and pure Radroots contract adapters 37 must follow `web/AGENTS.md`; the browser implementation and its security 38 qualification remain pending. 39 40 Keep private AUTH, decrypted messages, and private unsent plaintext out of 41 public caches, metadata, logs, analytics, static output, and long-lived UI 42 state. Browser private unsent plaintext stays in memory. Identity, signing, 43 and publication require explicit user action; a displayed name or message body 44 is not identity evidence. Reports and tests must distinguish controlled test 45 providers from real extension, relay, and independent-client qualification. 46 47 Source archives bind the complete exact clean Git tree under native artifact 48 contract v3, including tracked browser source. Compiled native packages and 49 future static website output have separate payload boundaries; neither may 50 include secrets, local databases, private transcripts, or parent documents. 51 Production archive and release qualification are deferred and unclaimed. 52 53 ## Expectations 54 55 Reports should include: 56 57 - affected commit; 58 - affected platform; 59 - reproduction steps that do not expose real secrets; 60 - expected and observed behaviour; 61 - impact. 62 63 The project makes no production-readiness claim during the alpha phase.