forked from nightscout/cgm-remote-monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring organisation, bundling and security improvements (nightsc…
…out#6765) * * Simplified bundling to just one bundle * Removed cache invalidation token from bundling * Generate strong persistent random string on deploy to use for JWT signing * WIP: moving api-secret and JWT signing to a separate centralized security component * Moved some server components away from project root * Fix issues reported by linter * Ignore detect-object-injection everywhere but the client * Make admin message button red * Remove alarms for some security alerts on code * api_secret is now fully contained in the enclave
- Loading branch information
1 parent
4fe8098
commit 1e9e142
Showing
64 changed files
with
362 additions
and
249 deletions.
There are no files selected for viewing
This file contains 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,26 +1,35 @@ | ||
module.exports = { | ||
"plugins": [ | ||
"security" | ||
'plugins': [ | ||
'security' | ||
], | ||
"extends": [ | ||
"eslint:recommended", | ||
"plugin:security/recommended" | ||
'extends': [ | ||
'eslint:recommended', | ||
'plugin:security/recommended' | ||
], | ||
"parser": "babel-eslint", | ||
"env": { | ||
"browser": true, | ||
"commonjs": true, | ||
"es6": true, | ||
"node": true, | ||
"mocha": true, | ||
"jquery": true | ||
'parser': 'babel-eslint', | ||
'env': { | ||
'browser': true, | ||
'commonjs': true, | ||
'es6': true, | ||
'node': true, | ||
'mocha': true, | ||
'jquery': true | ||
}, | ||
"rules": { | ||
"no-unused-vars": [ | ||
"error", | ||
'rules': { | ||
'security/detect-object-injection' : 0, | ||
'no-unused-vars': [ | ||
'error', | ||
{ | ||
"varsIgnorePattern": "should|expect" | ||
'varsIgnorePattern': 'should|expect' | ||
} | ||
] | ||
} | ||
}, | ||
'overrides': [ | ||
{ | ||
'files': ['lib/client/*.js'], | ||
'rules': { | ||
'security/detect-object-injection': 1 | ||
} | ||
} | ||
], | ||
}; |
This file contains 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 |
---|---|---|
|
@@ -9,6 +9,7 @@ bundle/bundle.out.js | |
*.iml | ||
my.env | ||
my.*.env | ||
*.pem | ||
|
||
static/bower_components/ | ||
.*.sw? | ||
|
This file contains 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,5 @@ | ||
|
||
require('crypto').randomBytes(1024, function(err, buffer) { | ||
var token = buffer.toString('hex'); | ||
console.log(token); | ||
}); |
This file contains 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 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 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 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 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 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 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 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.