registry  /  candor-ts  /  0.9.0

candor-ts@0.9.0

candor for TypeScript — per-function side effects, transitively, with a policy gate (candor-spec 0.9)

AI Security Review

scanned 2d ago · by lpm-firewall-ai

No confirmed malicious attack surface. The package is a local TypeScript static-analysis CLI suite that reads target sources and writes requested report files.

Static reason
One or more suspicious static signals were detected.; previous stored version diff introduced dangerous source
Trigger
Explicit invocation of its CLI, watcher, MCP, or LSP entrypoints.
Impact
Creates analysis reports at user-selected output paths; the watcher locally invokes its bundled scanner.
Mechanism
Local source analysis, report querying, and stdio protocol handling.
Rationale
Direct inspection shows scanner signals arise from an explicit local watcher subprocess and conformance fixtures that deliberately exercise effect detection. No concrete exfiltration, remote payload, unauthorized persistence, lifecycle execution, or AI-agent control-surface mutation is present.
Evidence
package.jsonscan.mjswatch.mjsmcp.mjslsp.mjsCases.tscontract.mjs.candor/report.json.candor/report.callgraph.json

Decision evidence

public snapshot
AI called this Clean at 97.0% confidence as Benign with low false-positive risk.
Evidence for block
  • `Cases.ts` imports network and subprocess APIs, but it is documented conformance-fixture source.
  • `watch.mjs` launches local `scan.mjs` only after explicit `candor-ts-watch` invocation.
Evidence against
  • `package.json` has no preinstall, install, postinstall, or prepare lifecycle hook.
  • Entrypoints are user-invoked CLI, MCP, LSP, and watcher tools; no import-time scan or network action was found.
  • `scan.mjs` writes only requested report outputs using local filesystem APIs.
  • `mcp.mjs` is stdio-only and confines caller-supplied policy reads to the report workspace.
  • No runtime HTTP client, socket connection, credential harvesting, eval/vm execution, or persistence write was found.
Behavioral surface
Source
ChildProcessCryptoEnvironmentVarsFilesystemShell
Supply chain
HighEntropyStringsUrlStrings
ManifestNo manifest risk signals triggered.
scanned 10 file(s), 292 KB of source, external domains: github.com

Source & flagged code

5 flagged · loading source
Cases.tsView file
4import * as netm from "node:net"; L5: import * as cp from "node:child_process"; L6: import * as cryptom from "node:crypto";
High
Child Process

Package source references child process execution.

Cases.tsView on unpkg · L4
3import * as fsm from "node:fs"; L4: import * as netm from "node:net"; L5: import * as cp from "node:child_process"; L6: import * as cryptom from "node:crypto"; ... L18: export function exec_dyn_head(tool: string): void { try { cp.spawn(tool, ["curl"]); } catch {} } L19: export function env_read(): void { void process.env.X; } L20: export function clock_now(): void { void Date.now(); }
High
Same File Env Network Execution

A single source file combines environment access, network access, and code or shell execution; review context before blocking.

Cases.tsView on unpkg · L3
watch.mjsView file
16Cross-file remote execution chain: watch.mjs spawns scan.mjs; helper contains network access plus dynamic code execution. L16: */ L17: import { spawnSync } from "node:child_process"; L18: import crypto from "node:crypto"; ... L63: const r = spawnSync("node", [path.join(HERE, "scan.mjs"), target, "--out", out], { encoding: "utf8" }); L64: return { ok: r.status === 0, ms: Date.now() - t0, stderr: r.stderr }; L65: }
High
Cross File Remote Execution Context

Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.

watch.mjsView on unpkg · L16
16*/ L17: import { spawnSync } from "node:child_process"; L18: import crypto from "node:crypto"; ... L63: const r = spawnSync("node", [path.join(HERE, "scan.mjs"), target, "--out", out], { encoding: "utf8" }); L64: return { ok: r.status === 0, ms: Date.now() - t0, stderr: r.stderr }; L65: }
Low
Weak Crypto

Package source references weak cryptographic algorithms.

watch.mjsView on unpkg · L16
scan.mjsView file
matchType = previous_version_dangerous_delta matchedPackage = candor-ts@0.8.15 matchedIdentity = npm:Y2FuZG9yLXRz:0.8.15 similarity = 0.700 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.

scan.mjsView on unpkg

Findings

1 Critical4 High1 Medium5 Low
CriticalPrevious Version Dangerous Deltascan.mjs
HighChild ProcessCases.ts
HighShell
HighSame File Env Network ExecutionCases.ts
HighCross File Remote Execution Contextwatch.mjs
MediumEnvironment Vars
LowScripts Present
LowWeak Cryptowatch.mjs
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings