
Company News
Meet the Socket Team at RSAC and BSidesSF 2026
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.
Sealights Node.js Agent
#Preload Script
The preload.js script serves as an automatic loader for the Sealights Node agent, eliminating the need to explicitly wrap your commands with slnodejs run. This script intercepts the normal Node.js execution flow and injects the necessary Sealights installation logic.
First, install the Sealights Node.js package:
npm install slnodejs
The preload script will be available at:
./node_modules/slnodejs/lib/preload.js
-r flagnode -r ./node_modules/slnodejs/lib/preload.js your-script.js
NODE_OPTIONSexport NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js"
node your-script.js
Or inline:
NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js" node your-script.js
Using
NODE_OPTIONSallows you to persist the preloader configuration across multiple Node.js executions without explicitly specifying the-rflag each time.
| Variable | Description | Default |
|---|---|---|
SL_TOKEN | Direct Sealights agent authentication token | |
SL_TOKEN_FILE | Path to file containing the Sealights token | ./sltoken.txt |
SL_BUILD_SESSION_ID | Direct build session ID | |
SL_BUILD_SESSION_ID_FILE | Path to file containing build session ID | ./buildSessionId |
SL_PROJECT_ROOT | Root directory of your project | Current working directory |
SL_COLLECTOR_URL | URL to Sealights collector | |
SL_LAB_ID | Lab ID for test execution |
The script includes robust error handling mechanisms:
-r Flagnode -r ./node_modules/slnodejs/lib/preload.js server.js
NODE_OPTIONS# Set for current session
export NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js"
node server.js
# Or inline
NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js" node server.js
NODE_OPTIONSexport NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js"
SL_TOKEN="your-token-here" node server.js
NODE_OPTIONSexport NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js"
SL_TOKEN_FILE="/custom/path/token.txt" SL_projectRoot="/path/to/project" node server.js
NODE_OPTIONSexport NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js"
SL_TOKEN="your-token-here" SL_COLLECTOR_URL="https://your-collector-url.com" SL_LAB_ID="your-lab-id" node server.js
NODE_OPTIONSexport NODE_OPTIONS="-r ./node_modules/slnodejs/lib/preload.js"
NODE_DEBUG=sl node server.js
If you encounter issues:
NODE_DEBUG=sl)-r flag: Must be explicitly included in each Node.js commandNODE_OPTIONS: Affects all Node.js processes in the current environment-r and NODE_OPTIONS-r flag when:NODE_OPTIONS when:FAQs
Sealights Node.js Agent
The npm package slnodejs receives a total of 14,208 weekly downloads. As such, slnodejs popularity was classified as popular.
We found that slnodejs demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Join Socket for live demos, rooftop happy hours, and one-on-one meetings during BSidesSF and RSA 2026 in San Francisco.

Research
/Security News
Malicious Packagist packages disguised as Laravel utilities install an encrypted PHP RAT via Composer dependencies, enabling remote access and C2 callbacks.

Research
/Security News
OpenVSX releases of Aqua Trivy 1.8.12 and 1.8.13 contained injected natural-language prompts that abuse local AI coding agents for system inspection and potential data exfiltration.