
Security News
Federal Audit Finds NIST Wasted Funds With No Plan to Clear NVD Backlog
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.
@agenshield/interceptor
Advanced tools
Node.js runtime interception via ESM loader and CJS preload. It instruments selected Node APIs to apply AgenShield policy checks and (in some cases) route traffic through the broker.
npm install @agenshield/interceptor
node --import @agenshield/interceptor/register app.js
node -r @agenshield/interceptor/require app.js
import { installInterceptors, uninstallInterceptors } from '@agenshield/interceptor';
installInterceptors({
socketPath: '/var/run/agenshield.sock',
failOpen: false,
});
// ... your app ...
uninstallInterceptors();
fetch (global)http / https (request, get)WebSocket (global, if present)fs, fs/promises (read/write/list)child_process (exec, spawn, execSync, etc.)createConfig() reads environment variables (or you can pass overrides to installInterceptors()):
AGENSHIELD_SOCKET - Unix socket path.AGENSHIELD_HOST - HTTP fallback host.AGENSHIELD_PORT - HTTP fallback port.AGENSHIELD_FAIL_OPEN - true to allow operations if broker is unreachable.AGENSHIELD_LOG_LEVEL - debug|info|warn|error.AGENSHIELD_INTERCEPT_FETCH - enable/disable fetch interception.AGENSHIELD_INTERCEPT_HTTP - enable/disable http/https interception.AGENSHIELD_INTERCEPT_WS - enable/disable WebSocket interception.AGENSHIELD_INTERCEPT_FS - enable/disable fs interception.AGENSHIELD_INTERCEPT_EXEC - enable/disable child_process interception.AGENSHIELD_TIMEOUT - broker request timeout (ms).AGENSHIELD_POLICY_CACHE_TTL - policy cache TTL (ms).fetch requests are proxied through the broker (http_request) and return a synthetic Response.http/https requests are NOT proxied; a policy check runs asynchronously and may destroy the request if denied.fs async APIs perform a policy check, then call the original local method (no broker proxy).fs sync APIs perform a synchronous policy check via SyncClient, then call the original local method.child_process.exec performs an async policy check and returns a dummy process immediately; the actual command is executed only after policy approval.child_process.spawn and execFile perform async policy checks but still start the process immediately.WebSocket interception closes connections post-hoc if denied.fetch is truly proxied through the broker; other interceptors are policy checks around local calls.fs, execSync, spawnSync) use a hardcoded broker socket/host/port (/var/run/agenshield.sock, localhost:5200) and ignore config overrides.localhost:5200; non-default ports can lead to interception recursion.globalThis.WebSocket to exist (not always true in Node without a polyfill).# Build
npx nx build shield-interceptor
src/interceptors/ and register in src/installer.ts.@agenshield/ipc if new operation types are introduced.src/installer.ts is the authoritative install/uninstall sequence.src/interceptors/base.ts handles policy checks and fail-open behavior.src/client/http-client.ts is async (socket then HTTP), while src/client/sync-client.ts uses a subprocess for sync calls.PolicyEvaluator caching semantics in src/policy/.FAQs
Node.js runtime interception via ESM loader and CJS preload
We found that @agenshield/interceptor 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
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.

Research
/Security News
The North Korean malware loader hides in a Packagist-listed package and its GitHub branch to fetch and execute remote code in a likely Contagious Interview-style lure.