Skip to main content
The @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.PROD or similar
    • Individual argument checks can be disabled by passing them in the options object
  • Example

ProhibitedArgumentsOptions

Configuration options for assertNoProhibitedArgs.
  • Type
  • Details The args property 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 prohibited
    • false means the argument is allowed
  • Example