@ladjs/shared-config
Advanced tools
+9
-1
@@ -25,7 +25,15 @@ const fs = require('fs'); | ||
| const port = process.env[`${prefix}_PORT`] || null; | ||
| const port = process.env[`${prefix}_PORT`] || 0; | ||
| const serverHost = process.env[`${prefix}_SERVER_HOST`] || '0.0.0.0'; | ||
| const protocol = process.env[`${prefix}_PROTOCOL`] || 'http'; | ||
| const config = { | ||
| // this is used as defaults for `app.listen(port, serverHost)` | ||
| port, | ||
| // by listening on '0.0.0.0' by default we avoid IPv6 issues | ||
| // <https://stackoverflow.com/questions/29411551/express-js-req-ip-is-returning-ffff127-0-0-1> | ||
| // <https://nodejs.org/api/net.html#net_server_listen_port_host_backlog_callback | ||
| // <https://github.com/koajs/koa/issues/599> | ||
| // <https://stackoverflow.com/a/33957043> | ||
| serverHost, | ||
| cabin: { capture: false }, | ||
@@ -32,0 +40,0 @@ protocol, |
+2
-2
| { | ||
| "name": "@ladjs/shared-config", | ||
| "description": "Shared configuration for Lad's API and Web servers", | ||
| "version": "4.0.0", | ||
| "version": "5.0.0", | ||
| "author": "Nick Baugh <niftylettuce@gmail.com> (http://niftylettuce.com/)", | ||
@@ -32,3 +32,3 @@ "ava": { | ||
| "cross-env": "^7.0.3", | ||
| "eslint": "^7.19.0", | ||
| "eslint": "^7.20.0", | ||
| "eslint-config-xo-lass": "^1.0.5", | ||
@@ -35,0 +35,0 @@ "fixpack": "^4.0.0", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
10372
5.02%133
6.4%34
6.25%