Apply additional security recommendations (#2050)

* enable sandbox

* enable CSP (umami tentatively works?) and reduce amount of ipc APIs exposed

* remove csp from index
This commit is contained in:
Kendall Garner
2026-05-23 05:09:22 +00:00
committed by GitHub
parent 0de1e1aa3e
commit 7befd70e21
19 changed files with 179 additions and 190 deletions
+2 -1
View File
@@ -7,9 +7,10 @@ import { pid } from 'node:process';
import process from 'process';
import { getMainWindow, sendToastToRenderer } from '../../../index';
import { createLog, isMacOS, isWindows } from '../../../utils';
import { createLog } from '../../../utils';
import { store } from '../settings';
import { isMacOS, isWindows } from '/@/main/env';
import { PlayerData } from '/@/shared/types/domain-types';
declare module 'node-mpv';
+1 -1
View File
@@ -1,8 +1,8 @@
import { BrowserWindow, globalShortcut, systemPreferences } from 'electron';
import { isLinux, isMacOS } from '../../../utils';
import { store } from '../settings';
import { isLinux, isMacOS } from '/@/main/env';
import { PlayerType } from '/@/shared/types/types';
export const enableMediaKeys = (window: BrowserWindow | null) => {
+1 -1
View File
@@ -9,8 +9,8 @@ import { deflate, gzip } from 'zlib';
import manifest from './manifest.json';
import { isLinux } from '/@/main/env';
import { getMainWindow } from '/@/main/index';
import { isLinux } from '/@/main/utils';
import { QueueSong } from '/@/shared/types/domain-types';
import { ClientEvent, ServerEvent } from '/@/shared/types/remote-types';
import { PlayerRepeat, PlayerStatus, SongState } from '/@/shared/types/types';