Is @code-yeongyu/senpi safe?
- Node.js shell/command execution
- Node.js dynamic code execution
- Node.js filesystem read
What to do: Nothing here argues against installing it. Grant the capabilities it lists only if you expect the tool to need them.
@code-yeongyu/senpi is an npm package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators. It can: delegated authentication, dynamic code execution, filesystem read, filesystem write, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 0/100 (low).
@code-yeongyu/senpi 2026.10.10-6
Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of @code-yeongyu/senpi's authors. Report a false positive.
Behavioral traits
How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.
Findings (7)
The code turns strings into live code at runtime (eval / new Function / exec).
const importModule = new Function("specifier", "options", "return import(specifier, options)");Why it matters: If those strings aren't fixed and trusted, they become a way to run arbitrary code.
Fix: Avoid evaluating dynamically constructed code; if unavoidable, ensure the input is a trusted constant and never derived from external data.
The component can run operating-system commands or spawn processes.
import { spawn } from "node:child_process";const child = spawn(process.execPath, workerCommandArgs(request.force), {import { spawnSync } from "node:child_process";const result = spawnSync(bunPath, ["--version"], { encoding: "utf8", timeout: 5_000, windowsHide: true });import{__commonJS,__require}from"./chunk-IKOFCODM.js";var require_windows=__commonJS({"node_modules/isexe/windows.js"(exports,module){module.exports=isexe;isexe.sync=sync;var fs=__require("fs");function checkPathExt(path,options){var pathex …import { spawn, spawnSync } from "node:child_process";const result = spawnSync(decision.bunPath, [scriptRealPath, ...process.argv.slice(2)], {const child = spawn(process.execPath, [...process.execArgv, fullCliPath, ...args], {import { spawn } from "node:child_process";? spawn("/bin/sh", ["-c", POSIX_GATE, launch.command, ...launch.args], {: spawn(launch.command, [...launch.args], {import { spawn } from "node:child_process";const proc = spawn(command, args, {import { spawn } from "node:child_process";const spawnProbe = options.spawnProbe ?? ((command, args) => spawn(command, [...args], { stdio: "ignore", windowsHide: true }));import { execFileSync } from "node:child_process";import { execFile as nodeExecFile } from "node:child_process";import { spawn } from "node:child_process";const child = spawn(executable, ["models"], {import { execFile as nodeExecFile } from "node:child_process";import { spawn } from "node:child_process";const child = spawn(executable, buildCursorCliArgs(input), {import { spawn } from "node:child_process";const child = spawn(command, {import { execFile } from "node:child_process";Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.
Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.
The component reads files from disk.
const content = fs.readFileSync(filePath, "utf-8");
cachedImageBase64 = fs.readFileSync(getBundledInteractiveAssetPath(IMAGE_FILENAME)).toString("base64");dark: JSON.parse(fs.readFileSync(darkPath, "utf-8")),
light: JSON.parse(fs.readFileSync(lightPath, "utf-8")),
"grok-night": JSON.parse(fs.readFileSync(grokNightPath, "utf-8")),
"grok-day": JSON.parse(fs.readFileSync(grokDayPath, "utf-8")),
const content = fs.readFileSync(registeredTheme.sourcePath, "utf-8");
const content = fs.readFileSync(themePath, "utf-8");
const content = fs.readFileSync(themePath, "utf-8");
* The challenge: photon-node's CJS entry uses fs.readFileSync(__dirname + '/photon_rs_bg.wasm')
* The challenge: photon-node's CJS entry uses fs.readFileSync(__dirname + '/photon_rs_bg.wasm')
Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.
Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.
The component writes or deletes files on disk.
fs.appendFileSync(filePath, lines, { flag: "a" });fs.unlinkSync(filePath);
fs.writeFileSync(filePath, lines ? `${lines}\n` : "", { flag: "w" });fs.appendFileSync(debugLogPath, `${prefix}${redactedText}${suffix}`, { mode: 0o600 });fs.rmSync(configPath, { force: true });fs.unlinkSync(tmpFile);
fs.writeFileSync(debugLogPath, debugData);
fs.appendFileSync(logPath, `[${new Date().toISOString()}] debug log cut at ${size} bytes (cap ${maxBytes}); the last ${keep} bytes follow\n`);fs.appendFileSync(logPath, tail.subarray(0, read));
fs.appendFileSync(debugLogPath, `${prefix}${redactedText}${suffix}`, { mode: 0o600 });Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.
Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.
The component makes outbound network requests.
`))}function handleCallback(req,res,port,expectedState,settle){try{let url=new URL(req.url??"",`http://localhost:${port}`);if(url.pathname!==CALLBACK_PATH){respondHtml(res,404,oauthErrorHtml("Callback route not found."));return}let code=url …</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …var RETRYABLE_STATUS_CODES=new Set([408,425,429,500,502,503,504]);async function fetchWithRetry(input,init=void 0,options={}){let maxRetries=options.maxRetries===void 0||!Number.isFinite(options.maxRetries)?2:Math.max(0,Math.floor(options.m …function base64urlEncode(bytes){let binary="";for(let byte of bytes)binary+=String.fromCharCode(byte);return btoa(binary).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}async function generatePKCE(){let verifierBytes=new Uint8Array( …</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …`,{mode:384})}catch{}return minted}var cachedDeviceId;function deviceId(){return cachedDeviceId??=readOrMintDeviceId(),cachedDeviceId}function kimiCodeIdentityHeaders(){return{"User-Agent":`KimiCLI/${KIMI_CLIENT_VERSION}`,"X-Msh-Platform":K …var CANCEL_MESSAGE="Login cancelled",TIMEOUT_MESSAGE="Device flow timed out",SLOW_DOWN_TIMEOUT_MESSAGE="Device flow timed out after one or more slow_down responses. This is often caused by clock drift in WSL or VM environments. Please sync …
</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …var CANCEL_MESSAGE="Login cancelled",TIMEOUT_MESSAGE="Device flow timed out",SLOW_DOWN_TIMEOUT_MESSAGE="Device flow timed out after one or more slow_down responses. This is often caused by clock drift in WSL or VM environments. Please sync …
const response = await fetch(url, { headers: { Accept: "application/vnd.github+json" } });const response = await fetch(`https://api.github.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues/${encodeURIComponent(issue)}/comments?per_page=100&page=${page}`, { headers: { Accept: "application/vnd.github+json", …const response = await fetch(`https://api.github.com/gists/${gistId}`, {import { createServer } from "node:http";export function oauthFetch(base = (input, init) => fetch(input, init)) {const handshake = await fetch(built.url, requestInit(built, abort.signal));
response = await fetch(prepared.url, requestInit(prepared, abort.signal));
const response = await fetch(`${this.serverUrl}${path}`, { ...init, headers, signal });const response = await fetch(`${this.serverUrl}/models/sse`, { headers, signal });const response = await fetch(`${this.baseUrl}${path}`, {// one-shot commands alive. On Windows, Node can assert after fetch() if process.exit(0)
import { createServer } from "node:http";import type { IncomingMessage } from "node:http";import type { IncomingMessage, Server } from "node:http";Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.
Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.
An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential. (13 occurrence(s) shown as evidence).
`))}function handleCallback(req,res,port,expectedState,settle){try{let url=new URL(req.url??"",`http://localhost:${port}`);if(url.pathname!==CALLBACK_PATH){respondHtml(res,404,oauthErrorHtml("Callback route not found."));return}let code=url …</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …`,{mode:384})}catch{}return minted}var cachedDeviceId;function deviceId(){return cachedDeviceId??=readOrMintDeviceId(),cachedDeviceId}function kimiCodeIdentityHeaders(){return{"User-Agent":`KimiCLI/${KIMI_CLIENT_VERSION}`,"X-Msh-Platform":K …</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …</html>`}function oauthSuccessHtml(message){return renderPage({title:"Authentication successful",heading:"Authentication successful",message})}function oauthErrorHtml(message,details){return renderPage({title:"Authentication failed",heading …var CANCEL_MESSAGE="Login cancelled",TIMEOUT_MESSAGE="Device flow timed out",SLOW_DOWN_TIMEOUT_MESSAGE="Device flow timed out after one or more slow_down responses. This is often caused by clock drift in WSL or VM environments. Please sync …
Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.
An MCP tool surface (manifest or tool definitions) was found.
pi.registerTool(createAskUserTool("codex", pi, state));pi.registerTool(createAskUserTool("claude", pi, state));pi.registerTool({pi.registerTool({pi.registerTool({pi.registerTool(variants[mode]);
pi.registerTool(variants.freeform);
pi.registerTool(showHtmlPageTool);
pi.registerTool(generateImageTool);
pi.registerTool({pi.registerTool({pi.registerTool(tool);
pi.registerTool(tool);
pi.registerTool(tool);
pi.registerTool(full);
target.pi.registerTool(buildMcpTombstoneDefinition(removed, entry.name));
pi.registerTool({pi.registerTool(createPtyBashTool(toolCtx));
pi.registerTool(createBashOutputTool(toolCtx));
pi.registerTool(createBashInputTool(toolCtx));
pi.registerTool(createBashResizeTool(toolCtx));
pi.registerTool(createKillBashTool(toolCtx));
pi.registerTool(createMonitorTool(toolCtx));
pi.registerTool(tool);
pi.registerTool(createToolSearchTool(service));
Why it matters: Just context — review which tools it offers and their permissions.
Fix: Review the declared MCP tools and their permissions.
How attackers abuse these capabilities
Interactive labs on the attack class behind the rules above. They show the technique, not anything found in @code-yeongyu/senpi.
Check your own component
Run the same evidence-backed scan on any MCP server, agent skill, or package.
Scan your own componentHow we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →