This repository was archived by the owner on May 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 32
fix: Relates to #124. Security #451
Merged
Merged
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
4f6c2fd
feat: Security aspects for fether-electron. See #124
ltfschoen a0a80db
chore: merge latest master and fix conflicts
ltfschoen 0f9c3d1
feat: Add Source Maps support
ltfschoen 845c0cc
docs: Add Source Maps guide to Readme
ltfschoen 944bd9d
feat: Add webpack-build-notifier add-on with custom Webpack config
ltfschoen 3bb2208
fix: Remove duplicate dependency
ltfschoen c54c4ed
WIP
ltfschoen f6dce7c
WIP
ltfschoen 02fb145
review-fix: Configure CSP depending on NODE_ENV
ltfschoen db907c3
fix: Fix worker-src for the camera in production
ltfschoen 068ef6a
review-fix: Remove unnecessary config of source maps dependency
ltfschoen 1ee0ffa
Use preload script as buffer between main and renderer processes (#463)
amaury1093 e596cc8
merge latest from master
ltfschoen 8e64347
fix: Remove is-electron since now using preload script
ltfschoen 8064e19
fix: Remove old preload script
ltfschoen 357ac3a
fix: Do not expose electron, remote, or require to web app
ltfschoen b93a5c9
fix: Add newline
ltfschoen 7a97924
feat: Single Fether instance lock
ltfschoen 10d84ca
fix: Move preload to static folder so works with binary
ltfschoen 0bdac10
review-fix: Remove fix for webview since not used. Add comment incase…
ltfschoen e510c7b
review-fix: Add optional opt-in to using Webpack notifier plugin by r…
ltfschoen bc180b4
review-fix: Use pino.debug instead of console.log
ltfschoen 0114b85
review-fix: Add worker-src blob to CSP in development for webcam
ltfschoen 502cb69
review-fix: Update handling of untrusted urls and sessions and certif…
ltfschoen 2e5bc92
review-fix: Convert to WSS. Move CSP into array like in Parity-JS She…
ltfschoen d10b4ec
review-fix: Update CSP to avoid duplication
ltfschoen 88c9924
review-fix: Remove from new-window event listener that which applies …
ltfschoen b8d0ddd
review-fix: Combined pino logs
ltfschoen 7930793
review-fix: Change to parsedUrl.href instead of origin. Fix trusted u…
ltfschoen a2afb9d
fix: Remote https 127.0.0.1 in prod
ltfschoen aab094d
review-fix: Move WebpackBuildNotifier images so not in binary. Fix ic…
ltfschoen 1c59d89
fix: Remove console.logs
ltfschoen cc456ef
refactor: Cleanup so can merge. Extract for inclusion in separate PR
ltfschoen 4c9ac7d
review-fix: Remove debugging notes since better in wiki
ltfschoen 7d906bf
review-fix: Remove other lines due to move to wiki
ltfschoen 8b57717
fix comment
ltfschoen 657fc00
review-fix: Remove setPermissionRequestHandler since not know if need…
ltfschoen 8cc13f3
review-fix: Move CSP debugging into onHeadersReceived
ltfschoen 7df49cc
review-fix: Fix isParityRunningStatus
ltfschoen 119766f
review-fix: Replace parse-url with Node.js url parser
ltfschoen 254c03f
review-fix: Remove parse-url from dependencies
ltfschoen c8fb23c
fix: Fix logic in setCertificateVerifyProc
ltfschoen b40308c
merge latest master and fix conflicts
ltfschoen daa27f2
WIP
ltfschoen d916bf9
review-fix: Dynamically add WS port from CLI to trusted
ltfschoen f4c6937
review-fix: Update comments with security warnings
ltfschoen 01ce652
merge latest from master and fix conflicts
ltfschoen 0faceb4
chore: Remove useless console.log
ltfschoen a062aeb
fix merge conflicts
ltfschoen 77c40c2
misc: See commit details
ltfschoen ba9f98c
review-fix: Use appIsPackaged instead of NODE_ENV
ltfschoen eb6043d
fix: Add IS_PROD to constants and assign appIsPackaged to it. Expose …
ltfschoen 1a0a15e
feat: Add wiki Fether FAQ to trusted urls since required by PR #482
ltfschoen 40422f7
fix: Fix untrusted blockscout.com error in setCertificateVerifyProc
37edbe4
review-fix: fix blocked image hosting and external blockscout urls
58fab3d
review-fix: trust github token icons
4de10ab
review-fix: Rename network to fetherNetwork so custom config avoids n…
a2f494d
review-fix: Remove duplicate pino.debug for CSP
54b9eac
review-fix: Remove WsSecure until wss and certificates implemented
db12be9
review-fix: Update config to show Electron security warnings in all e…
b042a85
review-fix: Remove use of wsInterface
4579045
refactor: Refactor tests inside describe blocks
a45f317
tests: Add chrome dev tools to tests for trusted urls
6640fe7
review-fix: Use NODE_ENV and Electron app.isPackaged
01726e3
fix: Rebuild yarn.lock
783aa35
merge latest master and rebuild yarn.lock
8e754af
fix: Fix linting to arg passed to correct script
c4ecc01
review-fix: Remove ws-origins flag and trusted ws origins
f2fe570
test: Fix failing test
2ac6625
review-fix: Remove package-lock.json
6f574c9
fix: Use NODE_ENV consistently instead of process.defaultApp
10146cf
fix: Change to hash instead of transactionHash for blockscout
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| // https://webpack.electron.build/add-ons | ||
| // https://www.npmjs.com/package/webpack-build-notifier | ||
| const path = require('path'); | ||
| const WebpackBuildNotifierPlugin = require('webpack-build-notifier'); | ||
amaury1093 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| const withWebpackBuildNotifier = process.env.NOTIFIER === 'true'; | ||
|
|
||
| module.exports = withWebpackBuildNotifier | ||
| ? { | ||
| plugins: [ | ||
| new WebpackBuildNotifierPlugin({ | ||
| title: 'Fether Webpack Build', | ||
| logo: path.resolve('./build/icons/icon.ico'), | ||
| suppressSuccess: false, | ||
| compileIcon: path.resolve('./build/icons/webpack/compile.png'), | ||
| failureIcon: path.resolve('./build/icons/webpack/failure.png'), | ||
| successIcon: path.resolve('./build/icons/webpack/success.png'), | ||
| warningIcon: path.resolve('./build/icons/webpack/warning.png') | ||
| }) | ||
| ] | ||
| } | ||
| : {}; | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,9 @@ | ||
| { | ||
| "main": { | ||
| "webpackConfig": "custom.webpack.additions.js" | ||
| }, | ||
| "renderer": { | ||
| "sourceDirectory": null | ||
| } | ||
| }, | ||
| "title": "Fether" | ||
| } |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // Copyright 2015-2019 Parity Technologies (UK) Ltd. | ||
| // This file is part of Parity. | ||
| // | ||
| // SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| import { IS_PACKAGED } from '../utils/paths'; | ||
|
|
||
| const IS_PROD = process.env.NODE_ENV === 'production'; | ||
|
|
||
| /** | ||
| * Security. Additional network security is configured after `cli` is available: | ||
| * in fether-electron/src/main/app/options/config/index.js | ||
| * | ||
| * Note: 127.0.0.1 is a trusted loopback and more trustworthy than localhost. | ||
| * See https://letsencrypt.org/docs/certificates-for-localhost/ | ||
| */ | ||
| const DEFAULT_CHAIN = 'kovan'; | ||
| const DEFAULT_WS_PORT = '8546'; | ||
| const TRUSTED_LOOPBACK = '127.0.0.1'; | ||
|
|
||
| export { | ||
| DEFAULT_CHAIN, | ||
| DEFAULT_WS_PORT, | ||
| IS_PACKAGED, | ||
| IS_PROD, | ||
| TRUSTED_LOOPBACK | ||
| }; |
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change? This makes the pre-commit hook less performant
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the change it was trying to lint the .ts files and the pre-commit hook was preventing me from pushing