cloudscript-engine
Advanced tools
| # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
| name: Node.js CI | ||
| name: Run Tests | ||
@@ -6,0 +6,0 @@ on: |
| # This workflow will run tests using node and then publish a package to GitHub Packages when a release is created | ||
| # For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages | ||
| name: Node.js Package | ||
| name: NPM Publish | ||
@@ -6,0 +6,0 @@ on: |
+1
-1
| { | ||
| "name": "cloudscript-engine", | ||
| "version": "0.0.2", | ||
| "version": "0.0.3", | ||
| "description": "NodeJS based PlayFab CloudScript engine", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -5,3 +5,6 @@ 'use strict'; | ||
| const log_array = []; | ||
| const log_function = Level => Message => log_array.push({Message, Level}); | ||
| const log_function = Level => (...messages) => { | ||
| log_array.push({Message: messages.join(' '), Level}); | ||
| console.info(...messages); | ||
| }; | ||
@@ -8,0 +11,0 @@ return { |
@@ -13,7 +13,8 @@ 'use strict'; | ||
| app.post('/Client/ExecuteCloudScript', (req, res) => { | ||
| const session_ticket = req.headers['x-authorization']; | ||
| const session_ticket = req.headers['x-authentication']; | ||
| injector(session_ticket) | ||
| .execute_cloudscript(req.body) | ||
| .then(result => res.send(result)) | ||
| .catch(() => { | ||
| .catch(err => { | ||
| console.error(err); | ||
| res.status(500).send('Internal server error. More information in cloudscript engine log.'); | ||
@@ -25,3 +26,3 @@ }); | ||
| res.redirect(307, forward_url + req.url); | ||
| console.info('redirecting to ', forward_url + req.url); | ||
| console.info('redirecting to', forward_url + req.url); | ||
| }); | ||
@@ -28,0 +29,0 @@ |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
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 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
26393
0.35%708
0.57%