mirror of
https://github.com/bitwarden/browser
synced 2025-12-10 05:13:29 +00:00
[BEEEP | PM-25358] Add process isolation on windows and mac desktop main process (#16156)
* Prevent memory dumping and debugger on windows and mac main process * Fix clippy * Only isolate process when isdev is false * Clean up * Add backticks around link
This commit is contained in:
2
apps/desktop/desktop_native/napi/index.d.ts
vendored
2
apps/desktop/desktop_native/napi/index.d.ts
vendored
@@ -82,7 +82,7 @@ export declare namespace sshagent {
|
||||
export declare namespace processisolations {
|
||||
export function disableCoredumps(): Promise<void>
|
||||
export function isCoreDumpingDisabled(): Promise<boolean>
|
||||
export function disableMemoryAccess(): Promise<void>
|
||||
export function isolateProcess(): Promise<void>
|
||||
}
|
||||
export declare namespace powermonitors {
|
||||
export function onLock(callback: (err: Error | null, ) => any): Promise<void>
|
||||
|
||||
@@ -337,8 +337,8 @@ pub mod processisolations {
|
||||
|
||||
#[allow(clippy::unused_async)] // FIXME: Remove unused async!
|
||||
#[napi]
|
||||
pub async fn disable_memory_access() -> napi::Result<()> {
|
||||
desktop_core::process_isolation::disable_memory_access()
|
||||
pub async fn isolate_process() -> napi::Result<()> {
|
||||
desktop_core::process_isolation::isolate_process()
|
||||
.map_err(|e| napi::Error::from_reason(e.to_string()))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user