@overlayed/app/security module provides security utilities for Electron applications.
assertNoProhibitedArgs
Checks for prohibited command line arguments and aborts the app if any are found.-
Type
-
Details
This function checks command line arguments for potentially dangerous command line arguments. If any prohibited
arguments are found, the application will exit.
Important Notes:
- It’s strongly recommended to call this function before any other code is executed
- You may want to only call this function in production via
import.meta.env.PRODor similar - Individual argument checks can be disabled by passing them in the options object
-
Example
ProhibitedArgumentsOptions
Configuration options forassertNoProhibitedArgs.
-
Type
-
Details
The
argsproperty is a record where:- Keys are prohibited argument names
- Values are booleans indicating whether to check for that argument
true(default) means the argument is prohibitedfalsemeans the argument is allowed
-
Example

