Run STIG Viewer 3 on any platform (macOS, Linux, Windows) for development and CKLB acceptance testing.
DISA publishes SV3 as a linux-x64 Electron app only. This project extracts the app source from the packaged binary, rebuilds the native sqlite3 module for your platform, and launches SV3 using a local Electron runtime. The result is a working SV3 on macOS ARM, macOS x64, Linux, or Windows — from a single setup command.
-
Node.js 24.x — the project's supported toolchain, matching Electron 40's bundled Node. Use a version manager:
Manager Install Node 24 Run with Node 24 mise mise install(reads.mise.toml)mise exec -- npm run setupfnm fnm install 24fnm exec --using=24 -- npm run setupnvm nvm install 24nvm use 24 && npm run setupvolta volta pin node@24npm run setupThe setup script detects your Node version and tells you exactly what to do if it's wrong.
-
SV3 zip file — Setup auto-downloads the latest SV3 linux-x64 zip from the DISA CDN (the same files linked from cyber.mil/stigs/srg-stig-tools). You can also download manually and place in
downloads/. -
Build tools —
node-gypcompiles the sqlite3 native module. On macOS this requires Xcode Command Line Tools (xcode-select --install). On Linux:build-essential. On Windows: Visual Studio Build Tools.
# Clone and run — two commands
git clone https://github.com/mitre/sv3-runner.git
cd sv3-runner
# Setup — downloads SV3, extracts, builds sqlite3 for your platform
mise exec -- npm run setup # with mise (recommended)
fnm exec --using=24 -- npm run setup # with fnm
npm run setup # if Node 24 is already active
# Launch STIG Viewer 3
npm startSetup is idempotent — run it again and it skips what's already done. If no SV3 zip is found in downloads/, it auto-downloads the latest from the DISA CDN.
| Command | Description |
|---|---|
npm run setup |
Full setup — extract SV3, install deps, build sqlite3. Idempotent: skips steps already done. Auto-downloads from cyber.mil if no zip found. |
npm run setup -- --force |
Force full rebuild — re-extract, re-install, re-build. Use after updating the SV3 zip. |
npm run setup -- --download |
Download the latest SV3 linux-x64 zip from cyber.mil CDN, then setup. |
npm run setup -- --status |
Show current setup state without changing anything. |
npm run setup -- --clean |
Remove sv3-app/ and node_modules/. Start fresh. |
npm run setup -- --help |
Show usage and options. |
npm run download |
Shortcut: download latest SV3 from cyber.mil. |
npm run status |
Shortcut: show setup state. |
npm run clean |
Shortcut: remove everything. |
npm start |
Launch STIG Viewer 3. |
npm test |
Run unit + functional tests (node:test). |
npm run test:unit |
Run unit tests only. |
npm run test:functional |
Run functional (CLI) tests only. |
npm run test:e2e |
Playwright _electron acceptance test — opens a .cklb in real SV3 (requires a completed npm run setup). |
npm run lint |
ESLint + Prettier check (must be clean). |
npm run format |
Auto-format with Prettier. |
-
Extract — Unpacks
app.asarfrom the linux SV3 zip using@electron/asar. The asar contains the full Electron app source (JavaScript, HTML, node_modules) which is platform-independent. -
Rebuild — The bundled
sqlite3-offline-nextpackage ships prebuilt native binaries for linux-x64, darwin-x64, win32-x64, and win32-ia32 — but not darwin-arm64 (Apple Silicon).@electron/rebuildcompiles thesqlite3npm package from source for your platform and Electron's Node ABI. -
Patch — Places the rebuilt
node_sqlite3.nodebinary wheresqlite3-offline-nextexpects it (binaries/sqlite3-{platform}/napi-v3-{platform}-{arch}/). -
Launch — Runs the extracted app source with a locally installed Electron 40.1.0 via
npx electron ./sv3-app.
When DISA releases a new SV3 version:
# Auto-download latest + rebuild
npm run setup -- --download --forceOr manually: download the new zip, place in downloads/, run npm run setup -- --force.
If the new SV3 uses a different Electron version, update ELECTRON_VERSION in scripts/setup.mjs and electron in package.json (check the version file inside the zip).
You're running the wrong Node version. This project's supported toolchain is Node 24.x (matching Electron 40's bundled Node).
node --version # Should show v24.x.xUse a version manager (see Prerequisites). The .mise.toml file pins Node 24 for mise users automatically.
The sqlite3 native module was built for a different Node ABI. Force a rebuild:
npm run setup -- --forceHarmless on first launch — the STIG library database is empty. SV3 works fine; import STIGs via File menu to populate the library.
Ensure Xcode Command Line Tools are installed:
xcode-select --installInstall build essentials:
# Debian/Ubuntu
sudo apt install build-essential python3
# RHEL/Fedora
sudo dnf groupinstall "Development Tools"sv3-runner/
.mise.toml # Pins Node 24 for mise users
.gitignore # Ignores generated/downloaded files
package.json # Dependencies + npm scripts
scripts/
setup.mjs # Extract + rebuild + patch (idempotent, cross-platform)
run.mjs # Launch SV3 via local Electron
verify-setup.mjs # Verify a completed setup (used by CI)
lib/
exec.mjs # Centralized command runner (run / runCapture)
pipeline.mjs # Dependency-injected setup steps (extract/install/build/patch)
sv3.mjs # Pure helpers (version + filename parsing)
test/
unit/ # node:test unit tests (pure helpers + injected-spy command assertions)
functional/ # node:test CLI tests (drive setup/run as child processes)
e2e/ # Playwright _electron CKLB acceptance test
fixtures/ # Test fixtures (sample .cklb, CDN listing HTML)
helpers/ # Shared test helpers (sandbox setup)
downloads/ # Place SV3 zip here
.gitkeep # Keeps directory in git
*.zip # (user-provided) SV3 zip from cyber.mil — gitignored
sv3-app/ # (generated) Extracted SV3 source — gitignored
node_modules/ # (generated) Dependencies — gitignored
This project supports the Heimdall2 CKLB converter (ADR-003). The acceptance test workflow:
- Heimdall generates a
.cklbfile (forward mapper output or round-trip export) - Playwright launches SV3 via this runner
- SV3 opens the generated
.cklbfile - Playwright verifies SV3 displays rules with correct statuses and comments
- Screenshot captured as evidence
This validates that Heimdall's CKLB output is accepted by the real STIG Viewer 3 — not just schema-valid, but tool-accepted.
This project (the sv3-runner tooling) is licensed under the Apache License, Version 2.0 — see the LICENSE file for the full text, and NOTICE for the MITRE copyright and attribution.
STIG Viewer 3 itself is a U.S. Government (DISA) product. This repository does not contain, vendor, or modify SV3 — the setup script downloads it directly from the DISA CDN at run time. The Apache-2.0 license applies only to the sv3-runner scripts and configuration, not to STIG Viewer 3. See NOTICE for details.