
Security News
npm Introduces minimumReleaseAge and Bulk OIDC Configuration
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.
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 19,615 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.

Security News
npm rolls out a package release cooldown and scalable trusted publishing updates as ecosystem adoption of install safeguards grows.

Security News
AI agents are writing more code than ever, and that's creating new supply chain risks. Feross joins the Risky Business Podcast to break down what that means for open source security.

Research
/Security News
Socket uncovered four malicious NuGet packages targeting ASP.NET apps, using a typosquatted dropper and localhost proxy to steal Identity data and backdoor apps.