Overview
The@overlayed/app/security module provides utilities to keep your application secure and prevent abuse.
assertNoProhibitedArgs
TheassertNoProhibitedArgs function checks for prohibited command line arguments and exits the application if any are
found. This prevents users from launching your app with flags that could:
- Enable remote debugging
- Disable security features
- Open developer tools
- Load unauthorized extensions
- Bypass sandboxing
Basic Usage
We strongly recommend calling this function. Ideally, it should be called before any other code is executed.
Production-Only Usage
You may want to only enforce this check in production builds:Selectively Allowing Arguments
In some cases, you may need to allow specific arguments (e.g., for debugging in development):Prohibited Arguments
The following command line arguments are blocked by default:--inspect--inspect-brk--inspect-port--remote-debugging-port--remote-debugging-address--remote-debugging-pipe--remote-allow-origins--auto-open-devtools-for-tabs--devtools--disable-web-security--allow-file-access-from-files--allow-running-insecure-content--unsafely-treat-insecure-origin-as-secure--load-extension--proxy-server--proxy-bypass-list--no-sandbox--disable-gpu-sandbox

