Security Enhancements - #272
Open
Shashwat803 wants to merge 327 commits into
Open
Conversation
- Add a button to open the status recording page in Sprinto app - Add the api endpoint to record the time of last successful status recording - Rework the UI to match Sprinto colors
… Ubuntu disk encryption
to prevent DLL Hijacking vulnerabilities."
…events and will-navigate events
…-issue-shashwatmishra-01
…-issue-shashwatmishra-01
…-issue-shashwatmishra-01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Changes Made
1. Enhanced DLL Security in
start.js2. Added
app.manifestfor Windows Security3. Updated
package.jsonBuild Configuration{ "build": { "win": { "signAndEditExecutable": true, "signDlls": true, "requestedExecutionLevel": "asInvoker", "manifestPath": "app.manifest", "rfc3161TimeStampServer": "http://timestamp.digicert.com" }, "nsis": { "oneClick": false, } } }4. Implemented comprehensive CSP to protect against XSS and injection attacks:
5. Permission and Navigation Controls (
src/start.js)Added permission handling and navigation security:
6. Protocol Handler Security (
src/lib/protocolHandlers.js)Enhanced security for all protocol handlers:
7. URL Validation Utility (
src/lib/isTrustedUrl.js)Created a centralized URL validation function:
8. Added the following resolutions to
package.json:9. Build Configuration (
package.json)"linux": { "extraResources": [ "src/practices" ], "buildFlags": [ "-Wl,-z,relro,-z,now,-z,noexecstack" ] },10. Runtime Security (
src/start.js)if (process.platform === 'linux') { // Use absolute paths for libraries const absoluteLibPath = path.resolve(app.getAppPath(), 'lib'); // Set DT_RUNPATH instead of DT_RPATH process.env.LD_RUN_PATH = absoluteLibPath; }11. Added permission request handler that: