5930try {
L5931: return (await fetch(`http://127.0.0.1:${port}/v1/models`, { signal: AbortSignal.timeout(3e3) })).ok;
L5932: } catch {
...
L5941: const [cmd, ...args] = plan.argv;
L5942: const child = spawn(cmd, args, {
L5943: env: {
L5944: ...process.env,
L5945: ...plan.env
CriticalSame File Env Network Execution
A single source file combines environment access, network access, and code or shell execution with blocking evidence.
dist/cli/index.mjsView on unpkg · L5930 •Trigger-reachable chain: manifest.bin -> dist/cli/index.mjs
Reachable file contains a blocking source-risk pattern.
CriticalTrigger Reachable Dangerous Capability
A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.
dist/cli/index.mjsView on unpkg 4163summary: "Wait for a background job to finish",
L4164: description: "Waits at most --max seconds (default 110, limit 590; over ~110 s needs the Bash tool timeout raised, which the PAI hook does automatically) for a process id. Exit 0: ...
L4165: args: [{
•Manifest-reachable source captures an API credential, sends it to a fixed unofficial gateway, and persists that redirection in agent or shell configuration.
dist/cli/index.mjs:
import { appendFileSync, chmodSync, closeSync, copyFileSync, cpSync, createReadStream, existsSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, readSync, readdirSync, r...
import { createInterface, emitKeypressEvents } from "node:readline";
writeFileSync(tmp, JSON.stringify(data, null, 2) + "\n");
* Session names live in Claude's clc registry (~/.claude/session.json):
const clcRegistryPath = (home = homedir()) => join(home, ".claude", "session.json");
writeFileSync(tmp, JSON.stringify(data, null, 2) + "\n");
const sessionsDir = join(homedir(), ".claude", "projects", encodedDir, "sessions");
/** Notes dir
HighCredential Redirect Persistence
Manifest-reachable source sends a prompted API credential to a fixed unofficial gateway and persists the redirection.
dist/cli/index.mjsView on unpkg •Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
dir(), "pai-sk[redacted]");
if (!existssync(templatepath)) {
console.log(c.warn("skill template not found: " + templatepath));
console.log(c.dim(" skipping pai skill installation."));
return false;
}
const skilldir = join(homedir(), ".claude", "skills", "pai");
const skillfile = join(skilldir, "skill.md");
if (existssync(skillfile)) {
const content = readfilesync(skillfile, "utf-8");
const isgenerated = content.includes("generated by pai setup");
if (isgenerated) console.log(c.dim(" found existing pai-generated skill.md."));
else {
console.log(c.yellow(" found existing skill.md (not pai-generated)."));
console.log(c.dim(" a backup will be created bef
HighTrigger Reachable External Ai Agent Control Surface Mutation
Manifest-trigger-reachable source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/cli/index.mjsView on unpkg 33Cross-file remote execution chain: dist/cli/index.mjs spawns dist/daemon-mcp/index.mjs; helper contains network access plus dynamic code execution.
L33: import chalk, { Chalk } from "chalk";
L34: import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
L35: import { parse, parseDocument } from "yaml";
L36: import { createHash, randomUUID } from "node:crypto";
L37: import http from "node:http";
L38: import { fileURLToPath } from "node:url";
...
L49: *
L50: * Node's stdout/stderr are ASYNCHRONOUS when they point at a pipe (and
L51: * synchronous when they point at a TTY or a regular file). `process.exit()`
...
L159: */
L160: function colorEnabled(env = process.env, isTTY = !!process.stdout.isTTY) {
L161: if (env.NO_COLOR !== void 0 && env.NO_COLOR !== "") retu
HighCross File Remote Execution Context
Source spawns a local helper that also contains network and dynamic execution context; review data flow before blocking.
dist/cli/index.mjsView on unpkg · L33 33Trigger-reachable persistence chain: manifest.bin -> dist/cli/index.mjs
L33: import chalk, { Chalk } from "chalk";
L34: import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
L35: import { parse, parseDocument } from "yaml";
L36: import { createHash, randomUUID } from "node:crypto";
L37: import http from "node:http";
L38: import { fileURLToPath } from "node:url";
...
L49: *
L50: * Node's stdout/stderr are ASYNCHRONOUS when they point at a pipe (and
L51: * synchronous when they point at a TTY or a regular file). `process.exit()`
...
L159: */
L160: function colorEnabled(env = process.env, isTTY = !!process.stdout.isTTY) {
L161: if (env.NO_COLOR !== void 0 && env.NO_COLOR !== "") return false;
HighTrigger Reachable Persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/cli/index.mjsView on unpkg · L33 33import chalk, { Chalk } from "chalk";
L34: import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
L35: import { parse, parseDocument } from "yaml";
L36: import { createHash, randomUUID } from "node:crypto";
L37: import http from "node:http";
L38: import { fileURLToPath } from "node:url";
...
L49: *
L50: * Node's stdout/stderr are ASYNCHRONOUS when they point at a pipe (and
L51: * synchronous when they point at a TTY or a regular file). `process.exit()`
...
L159: */
L160: function colorEnabled(env = process.env, isTTY = !!process.stdout.isTTY) {
L161: if (env.NO_COLOR !== void 0 && env.NO_COLOR !== "") return false;
MediumInstall Persistence
Source writes installer persistence such as shell profile or service configuration.
dist/cli/index.mjsView on unpkg · L33 33import chalk, { Chalk } from "chalk";
L34: import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
L35: import { parse, parseDocument } from "yaml";
L36: import { createHash, randomUUID } from "node:crypto";
L37: import http from "node:http";
L38: import { fileURLToPath } from "node:url";
...
L49: *
L50: * Node's stdout/stderr are ASYNCHRONOUS when they point at a pipe (and
L51: * synchronous when they point at a TTY or a regular file). `process.exit()`
...
L159: */
L160: function colorEnabled(env = process.env, isTTY = !!process.stdout.isTTY) {
L161: if (env.NO_COLOR !== void 0 && env.NO_COLOR !== "") return false;
LowWeak Crypto
Package source references weak cryptographic algorithms.
dist/cli/index.mjsView on unpkg · L33