Files
BetterDesk/scripts/run-security-suite.ps1
UNITRONIX 235c9c0706 security: implement Phase 0-3 remediation (deps, SQL ident, JWT, CSP, suite)
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)
2026-10-17 15:33:48 +02:00

32 lines
1.0 KiB
PowerShell

# BetterDesk unified security suite (local only).
# Run before publishing a release to GitHub.
$ErrorActionPreference = 'Stop'
$Root = Split-Path -Parent $PSScriptRoot
if (-not (Test-Path (Join-Path $Root 'web-nodejs'))) {
throw "Cannot locate repo root from $PSScriptRoot"
}
Write-Host "== BetterDesk security suite ==" -ForegroundColor Cyan
Write-Host "Root: $Root"
Push-Location (Join-Path $Root 'web-nodejs')
try {
Write-Host "`n-- Node: tests/security --" -ForegroundColor Yellow
npm run test:security
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally {
Pop-Location
}
Push-Location (Join-Path $Root 'betterdesk-server')
try {
Write-Host "`n-- Go: relay / sessiongrant / crypto connection security --" -ForegroundColor Yellow
go test ./relay/ ./sessiongrant/ ./crypto/ ./auth/ -count=1 -run 'ConnectionSecurity|AuthorizationRegistry|SignIdPk|IssueAndVerify|VerifyRejects|JWT'
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
} finally {
Pop-Location
}
Write-Host "`nSecurity suite PASSED." -ForegroundColor Green
exit 0