You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit f9a5cd6
Browse filesBrowse the repository at this point in the historyBrowse files
Review LocalAuthentication safety and document caller obligations
Enable blanket safety defaults on reviewed methods. Keep context and right operations unsafe where framework-internal concurrency can access shared state, and emit selector-specific safety documentation on generated methods and property accessors.
On macOS 26.6.2, context and right construction can update unsynchronized process-wide counters. Callback error pointers can be null, and direct persisted-right initialization is unsupported. Behavior on other Apple OS releases remains unverified.
class.LAContext.methods.init.unsafe-reason = "The caller must serialize construction with all concurrent `LocalAuthentication` operations in the process, including asynchronous completions, because it can update shared counters."
24
+
class.LAContext.methods.new.unsafe-reason = "The caller must serialize construction with all concurrent `LocalAuthentication` operations in the process, including asynchronous completions, because it can update shared counters."
class.LAContext.methods."canEvaluatePolicy:error:".unsafe-reason = "The caller must serialize this call with all concurrent `LocalAuthentication` operations in the process, including `LAContext` and `LARight` construction and asynchronous completions."
28
+
class.LAContext.methods.invalidate.unsafe-reason = "The caller must synchronize mutable state shared with the evaluation completion that invalidation may trigger on a framework-private queue."
29
+
class.LAContext.methods."setCredential:type:".unsafe-reason = "The caller must synchronize accesses to this context's credential state with other operations that can read or change it."
30
+
class.LAContext.methods."isCredentialSet:".unsafe-reason = "The caller must synchronize accesses to this context's credential state with other operations that can read or change it."
class.LAContext.methods.biometryType.unsafe-reason = "The caller must prevent concurrent `LocalAuthentication` operations in the process from accessing biometry state, including operations on other contexts and asynchronous completions."
35
+
class.LAContext.methods.domainState.unsafe-reason = "The caller must prevent concurrent `LocalAuthentication` operations in the process from accessing biometry state, including operations on other contexts and asynchronous completions."
36
+
class.LAContext.methods.evaluatedPolicyDomainState.unsafe-reason = "The caller must prevent concurrent `LocalAuthentication` operations in the process from accessing biometry state, including operations on other contexts and asynchronous completions."
class.LAContext.methods.maxBiometryFailures.unsafe-reason = "The caller must synchronize reads and writes of this deprecated non-atomic property across threads."
41
+
class.LAContext.methods."setMaxBiometryFailures:".unsafe-reason = "The caller must synchronize reads and writes of this deprecated non-atomic property across threads."
42
+
class.LAContext.methods.localizedFallbackTitle.unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
43
+
class.LAContext.methods."setLocalizedFallbackTitle:".unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
44
+
class.LAContext.methods.localizedCancelTitle.unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
45
+
class.LAContext.methods."setLocalizedCancelTitle:".unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
46
+
class.LAContext.methods.touchIDAuthenticationAllowableReuseDuration.unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
47
+
class.LAContext.methods."setTouchIDAuthenticationAllowableReuseDuration:".unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
48
+
class.LAContext.methods.localizedReason.unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
49
+
class.LAContext.methods."setLocalizedReason:".unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
50
+
class.LAContext.methods.interactionNotAllowed.unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
51
+
class.LAContext.methods."setInteractionNotAllowed:".unsafe-reason = "The caller must serialize access to this non-atomic property with concurrent reads, writes, and pending evaluations on this context."
class.LAContext.methods."evaluatePolicy:localizedReason:reply:".unsafe-reason = "The caller must serialize the evaluation and its completion with concurrent `LocalAuthentication` operations in the process, including context and right construction, and treat callback error pointers as nullable borrowed values."
class.LAContext.methods."evaluateAccessControl:operation:localizedReason:reply:".unsafe-reason = "The caller must serialize the evaluation and its completion with concurrent `LocalAuthentication` operations in the process, including context and right construction, and treat callback error pointers as nullable borrowed values."
class.LARight.methods."authorizeWithLocalizedReason:completion:".unsafe-reason = "The caller must serialize this operation and its completion with concurrent `LocalAuthentication` operations, including accesses to this right's state, and treat callback error pointers as nullable borrowed values."
class.LARight.methods."checkCanAuthorizeWithCompletion:".unsafe-reason = "The caller must serialize this operation and its completion with concurrent `LocalAuthentication` operations, including accesses to this right's state, and treat callback error pointers as nullable borrowed values."
class.LARight.methods."deauthorizeWithCompletion:".unsafe-reason = "The caller must serialize this operation and its completion with concurrent `LocalAuthentication` operations, including accesses to this right's state."
class.LARightStore.methods."rightForIdentifier:completion:".unsafe-reason = "The caller must treat the completion's result pointers as nullable borrowed values and synchronize mutable state accessed by the sendable completion across threads."
class.LARightStore.methods."saveRight:identifier:completion:".unsafe-reason = "The caller must treat the completion's result pointers as nullable borrowed values and synchronize mutable state accessed by the sendable completion across threads."
class.LARightStore.methods."saveRight:identifier:secret:completion:".unsafe-reason = "The caller must treat the completion's result pointers as nullable borrowed values and synchronize mutable state accessed by the sendable completion across threads."
class.LARightStore.methods."removeRight:completion:".unsafe-reason = "The caller must treat the completion's error pointer as a nullable borrowed value and synchronize mutable state accessed by the sendable completion across threads."
class.LARightStore.methods."removeRightForIdentifier:completion:".unsafe-reason = "The caller must treat the completion's error pointer as a nullable borrowed value and synchronize mutable state accessed by the sendable completion across threads."
class.LARightStore.methods."removeAllRightsWithCompletion:".unsafe-reason = "The caller must treat the completion's error pointer as a nullable borrowed value and synchronize mutable state accessed by the sendable completion across threads."
class.LAPrivateKey.methods."signData:secKeyAlgorithm:completion:".unsafe-reason = "The caller must synchronize mutable state accessed by the sendable completion across threads and treat callback result pointers as nullable borrowed values."
class.LAPrivateKey.methods."decryptData:secKeyAlgorithm:completion:".unsafe-reason = "The caller must synchronize mutable state accessed by the sendable completion across threads and treat callback result pointers as nullable borrowed values."
class.LAPrivateKey.methods."exchangeKeysWithPublicKey:secKeyAlgorithm:secKeyParameters:completion:".unsafe-reason = "The caller must synchronize mutable state accessed by the sendable completion across threads and treat callback result pointers as nullable borrowed values."
class.LAPublicKey.methods."exportBytesWithCompletion:".unsafe-reason = "The caller must synchronize mutable state accessed by the sendable completion across threads and treat callback result pointers as nullable borrowed values."
class.LAPublicKey.methods."encryptData:secKeyAlgorithm:completion:".unsafe-reason = "The caller must synchronize mutable state accessed by the sendable completion across threads and treat callback result pointers as nullable borrowed values."
class.LAPublicKey.methods."verifyData:signature:secKeyAlgorithm:completion:".unsafe-reason = "The caller must synchronize mutable state accessed by the sendable completion across threads and treat callback error pointers as nullable borrowed values."
class.LASecret.methods."loadDataWithCompletion:".unsafe-reason = "The caller must synchronize mutable state accessed by the sendable completion across threads and treat callback result pointers as nullable borrowed values."
class.LAEnvironment.methods."addObserver:".unsafe-reason = "The caller must keep the weakly held observer alive and synchronize its state with callbacks invoked on framework-private queues."
class.LAEnvironment.methods."removeObserver:".unsafe-reason = "The caller must keep the observer alive during removal and synchronize mutable state shared with its callback on the framework-private queue."
protocol.LAEnvironmentObserver.methods."environment:stateDidChangeFromOldState:".unsafe-reason = "Implementors must synchronize observer state with other calls because this callback can run on a framework-private queue."
class.LAAuthenticationRequirement.methods.init.unsafe-reason = "Callers must use documented factory methods because this initializer has no specified behavior for creating a usable requirement."
class.LAAuthenticationRequirement.methods.new.unsafe-reason = "Callers must use documented factory methods because this constructor has no specified behavior for creating a usable requirement."
class.LABiometryFallbackRequirement.methods.init.unsafe-reason = "Callers must use documented factory methods because this initializer has no specified behavior for creating a usable requirement."
class.LABiometryFallbackRequirement.methods.new.unsafe-reason = "Callers must use documented factory methods because this constructor has no specified behavior for creating a usable requirement."
class.LAPersistedRight.methods."initWithRequirement:".unsafe-reason = "This inherited initializer must not be called on `LAPersistedRight` because instances are only obtained through `LARightStore`."
107
+
108
+
class.LARight.unsafe = true
109
+
class.LARight.methods.init.unsafe-reason = "The caller must serialize construction with all concurrent `LocalAuthentication` operations in the process, including asynchronous completions, because it can construct an `LAContext`."
110
+
class.LARight.methods."initWithRequirement:".unsafe-reason = "The caller must serialize construction with all concurrent `LocalAuthentication` operations in the process, including asynchronous completions, because it can construct an `LAContext`."
111
+
class.LARight.methods.new.unsafe-reason = "The caller must serialize construction with all concurrent `LocalAuthentication` operations in the process, including asynchronous completions, because it can construct an `LAContext`."
112
+
113
+
class.LARight.methods.state.unsafe = true
114
+
class.LARight.methods.state.unsafe-reason = "The caller must ensure no concurrent operation can update this right's state while reading it, including framework-managed authorization completions."
115
+
class.LARight.methods.tag.unsafe-reason = "The caller must serialize reads and writes of this right's non-atomic `tag` property across threads."
116
+
class.LARight.methods."setTag:".unsafe-reason = "The caller must serialize reads and writes of this right's non-atomic `tag` property across threads."
0 commit comments