mirror of
https://github.com/UNITRONIX/BetterDesk.git
synced 2026-10-25 14:00:53 +00:00
235c9c0706
Bump axios/multer and npm overrides; add safeSqlIdent and multer cleanup; harden JWT aud/iss/nbf; CSP without unsafe-eval via static protobuf build and data-bd-call delegation; ship Security Test Suite v1.2.0 and docs. Ignore generated RdClient protobuf artifacts (~40k lines) — rebuild locally with npm run protocols:rdclient. Thanks: INSOLVE (Honorary); Marco Jakobs (@jacotec); MyNameisStitch (@MyNameisStitch); Redspin (@playerumpknow); muopc (@muopc)
35 lines
1020 B
JavaScript
35 lines
1020 B
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Cross-platform entry for `npm run test:security:full` from web-nodejs/.
|
|
* Spawns the PowerShell or bash runner at repo root.
|
|
*/
|
|
'use strict';
|
|
|
|
const { spawnSync } = require('child_process');
|
|
const path = require('path');
|
|
|
|
const root = path.resolve(__dirname, '..');
|
|
const isWin = process.platform === 'win32';
|
|
const script = isWin
|
|
? path.join(root, 'scripts', 'run-security-suite.ps1')
|
|
: path.join(root, 'scripts', 'run-security-suite.sh');
|
|
|
|
let result;
|
|
if (isWin) {
|
|
result = spawnSync('pwsh', ['-NoProfile', '-File', script], { cwd: root, stdio: 'inherit' });
|
|
if (result.error || result.status === null) {
|
|
result = spawnSync('powershell', ['-NoProfile', '-File', script], {
|
|
cwd: root,
|
|
stdio: 'inherit',
|
|
});
|
|
}
|
|
} else {
|
|
result = spawnSync('bash', [script], { cwd: root, stdio: 'inherit' });
|
|
}
|
|
|
|
if (result.error) {
|
|
console.error(result.error);
|
|
process.exit(1);
|
|
}
|
|
process.exit(result.status === null ? 1 : result.status);
|