-
-
Notifications
You must be signed in to change notification settings - Fork 134
Set up NX-based monorepo #1773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Set up NX-based monorepo #1773
Conversation
Here we need to ensure that there is no `node_modules` in `apps/desktop` since electron-forge will pick it up and use only that, meaning that all the hoisted dependencies available in the project root will not be accessible and it will error out. See pnpm/pnpm#7880 for more information.
helmet({ | ||
hidePoweredBy: false, // errors out in electron | ||
contentSecurityPolicy: false, | ||
crossOriginEmbedderPolicy: false | ||
}) |
Check failure
Code scanning / CodeQL
Insecure configuration of Helmet security middleware High
contentSecurityPolicy
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 12 hours ago
To address the issue, we will enable the contentSecurityPolicy
option in the Helmet configuration. Instead of disabling it, we will provide a custom CSP configuration that allows the application to function correctly while maintaining security. This involves:
- Replacing
contentSecurityPolicy: false
with a valid CSP configuration. - Ensuring the configuration is compatible with the application's requirements, such as allowing specific script and style sources.
The updated configuration will include directives for script-src
and style-src
to allow resources from trusted origins. If the application has specific requirements (e.g., loading scripts from a CDN), these can be added to the CSP directives.
-
Copy modified lines R99-R107
@@ -98,3 +98,11 @@ | ||
hidePoweredBy: false, // errors out in electron | ||
contentSecurityPolicy: false, | ||
contentSecurityPolicy: { | ||
directives: { | ||
"default-src": ["'self'"], | ||
"script-src": ["'self'", "example.com"], // Adjust as needed | ||
"style-src": ["'self'", "'unsafe-inline'"], // Adjust as needed | ||
"img-src": ["'self'", "data:"], // Allow images from self and data URIs | ||
"connect-src": ["'self'"], // Allow connections to self | ||
}, | ||
}, | ||
crossOriginEmbedderPolicy: false |
No description provided.