Loading npm security reports…
Loading npm security reports…
greprag@5.57.0: Agent extension lifecycle risk – flagged | LPM Firewall
Flagged as agent extension risk
Allowed by default with warning: install-time first-party agent extension setup was detected.
AI security reviewscanned on Nov 8, 2026, 06:55 UTC · by lpm-firewall-ai The install hook automatically installs the package's own agent skill into detected Claude Code or Codex homes, so this merits a warning for install-time extension setup. The reviewed behavior does not establish a broader agent control hijack or credential theft.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
Package installation when the user's home contains a Claude Code or Codex directory.
Impact
Agent behavior is extended at install time without a separate setup command, creating an agent extension lifecycle risk.
Mechanism
The hook creates the destination directory and copies the bundled GrepRAG skill; it refreshes other bundled skills only when already installed.
Evidence
package.json scripts/postinstall.js skill/greprag/SKILL.md $HOME/.claude/skills/greprag $HOME/.codex/skills/greprag $HOME/.claude/docs/chip-spawn.md
public snapshot
Evidence for warning
The package runs scripts/postinstall.js automatically during installation. When Claude Code or Codex is detected, the hook copies the bundled greprag skill into that agent's skills directory. The hook also refreshes previously installed bundled skills and an existing Claude Code document. Evidence against
The automatic skill installation is limited to GrepRAG's own bundled skill; other skills are only refreshed if already present. The copied skill identifies itself as GrepRAG's agent setup and memory feature. Behavioral surface
Source Child process · Crypto · Environment variables · Filesystem · Network · Shell
Supply chain High entropy strings · Minified · URL strings
Manifest No manifest risk signals triggered.
Scanned 129 files · 1.51 MB of source
7 external domains referenced
127.0.0.1 api.greprag.com code.claude.com docs.claude.com docs.stripe.com registry.npmjs.org www.apple.com Findings1 critical · 19 high · 5 medium · 5 low Source & flagged code22 flagged High Install time lifecycle scripts
Package defines install-time lifecycle scripts.
package.json View on unpkg Medium Ambiguous install lifecycle script
Install-time lifecycle script is not statically allowlisted and needs review.
package.json View on unpkg Shared scanner record · 2 findings · 1 line scripts.postinstall = node scripts/postinstall.js
High Child process
Package source references child process execution.
dist/procedure-run.js View on unpkg · L51 Code excerpt · 3 lines 51 const crypto = __importStar (require ("crypto" ));
52 const child_process_1 = require ("child_process" );
53 function stateDir () {
Code excerpt · 3 lines 10 * On Windows, any `spawn` / `exec*` / `*Sync` launched WITHOUT
11 * `windowsHide: true` flashes a `cmd.exe` /console window. v5.40.0 shipped
12 * that flash four separate times (guard-refresh, guard-flush, desk-line,
High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/commands/codex.js View on unpkg · L54 Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
dist/commands/codex.js View on unpkg · L54 Shared code excerpt · 2 findings · 12 lines Trigger-reachable persistence chain: manifest.main -> dist/index.js -> dist/commands/codex.js
54 const codex_wake_test_1 = require ("./codex-wake-test" );
55 const API_URL_DEFAULT = 'https://api.greprag.com' ;
56 const HEARTBEAT_IDLE_MS = 70_000;
57 function home () {
58 return process.env.HOME || process.env.USERPROFILE || os.homedir ();
59
High Same file environment network execution
A single source file combines environment access, network access, and code or shell execution; review context before blocking.
dist/commands/docptr.js View on unpkg · L53 Code excerpt · 6 lines 53 const fs = __importStar (require ("node:fs" ));
54 const node_child_process_1 = require ("node:child_process" );
55 const project_anchor_1 = require ("../project-anchor" );
⋯
58 return {
59 apiUrl: process.env.GREPRAG_API_URL || 'https://api.greprag.com' ,
60 apiKey: process.env.GREPRAG_API_KEY || '' ,
Critical AI agent control hijack
Source creates an unconsented AI-agent control surface through install-time mutation or a default unauthenticated remote skill channel.
scripts/postinstall.js View on unpkg · L24 Code excerpt · 12 lines 24 name: 'Claude Code' ,
25 agentDir: path.join (home, '.claude' ),
26 skillsTarget: path.join (home, '.claude' , 'skills' ),
27 docsTarget: path.join (home, '.claude' , 'docs' ),
28 refreshClaudeDocs: true ,
⋯
31 name: 'Codex' ,
32 agentDir: path.join (home, '.codex' ),
33
High External AI agent control surface mutation
Runtime or CLI source writes behavior-bearing configuration into a user or project AI-agent control surface.
dist/opencode-plugin.bundle.js View on unpkg Scanner record · 30 lines Runtime or CLI code links a write operation to an explicit external AI-agent control path:
.push(proc.announce.summary);
}
return lines;
}
var debug_log_path = path3.join(os.homedir(), ".greprag", "opencode-plugin-debug.log");
var _debuglogready = false;
function dloginit() {
if (_debuglogready)
return;
_debuglogready = true;
try {
fs3.writefilesync(debug_log_path, "");
} catch {
}
}
High Trigger 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/commands/init.js View on unpkg Scanner record · 21 lines Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
';
if (!fs.existssync(dir))
fs.mkdirsync(dir, { recursive: true });
const body = object.entries(existing)
.map(([k, v]) => `${k}=${v}`)
.join('\n') + '\n';
fs.writefilesync(file, body);
}
function readenvfile(file) {
const out = {};
try {
const raw = fs.readfilesync(file, 'utf-8');
for (const line of raw.split(/\r?\n/)) {
const trimmed = line.trim();
if (!trimmed || trimmed.startswith('#'))
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/opencode-watch.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.78.3
matchedPath = dist/commands/opencode-watch.js
matchedIdentity = npm:Z3JlcHJhZw:5.78.3
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/watcher-registry.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.74.21
matchedPath = dist/commands/watcher-registry.js
matchedIdentity = npm:Z3JlcHJhZw:5.74.21
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/ccr-store.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.4
matchedPath = dist/ccr-store.js
matchedIdentity = npm:Z3JlcHJhZw:5.60.4
similarity = 1.000
summary = normalized source hash matched finalized malicious source
dist/commands/inbox-watch-supervisor.js View file High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/inbox-watch-supervisor.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.74.21
matchedPath = dist/commands/inbox-watch-supervisor.js
matchedIdentity = npm:Z3JlcHJhZw:5.74.21
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/inbox-watch.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.74.21
matchedPath = dist/commands/inbox-watch.js
matchedIdentity = npm:Z3JlcHJhZw:5.74.21
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/opencode-relay.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.4
matchedPath = dist/commands/opencode-relay.js
matchedIdentity = npm:Z3JlcHJhZw:5.60.4
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/opencode-plugin.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.4
matchedPath = dist/opencode-plugin.js
matchedIdentity = npm:Z3JlcHJhZw:5.60.4
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/codex-steering.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.4
matchedPath = dist/codex-steering.js
matchedIdentity = npm:Z3JlcHJhZw:5.60.4
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/checkpoint-helpers.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.73.12
matchedPath = dist/commands/checkpoint-helpers.js
matchedIdentity = npm:Z3JlcHJhZw:5.73.12
similarity = 1.000
summary = normalized source hash matched finalized malicious source
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/collision-check.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.4
matchedPath = dist/commands/collision-check.js
matchedIdentity = npm:Z3JlcHJhZw:5.60.4
similarity = 1.000
summary = normalized source hash matched finalized malicious source
Code↓
Package metadata 8 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
}
107 .map (line => JSON.parse (line))
108 .filter (row => typeof row.id === 'string' );
181 return saw ? { event, id, data: data.join ('\n' ) } : null ;
skillsTarget: path.join (home, '.codex' , 'skills' ),
34 docsTarget: path.join (home, '.codex' , 'docs' ),
35 refreshClaudeDocs: false ,
39 function copyDir (src, dest) {
40 fs.mkdirSync (dest, { recursive: true });
const line = `[${( new date()).toisostring()}] [greprag-memory] ${msg}
fs3.appendfilesync(debug_log_path, line);
dlog(`module top reached: pid=${process.pid} argv0=${process.argv[0]} distpath=${__filename}`);
var api_url = "https://api.greprag.com";
function loadenvfile(filepath
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/opencode-plugin.bundle.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.78.3
matchedPath = dist/opencode-plugin.bundle.js
matchedIdentity = npm:Z3JlcHJhZw:5.78.3
similarity = 1.000
summary = normalized source hash matched finalized malicious source
continue;
const idx = trimmed.indexof('=');
let value = trimmed.slice(idx + 1).trim();
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/init.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.4
matchedPath = dist/commands/init.js
matchedIdentity = npm:Z3JlcHJhZw:5.60.4
similarity = 1.000
summary = normalized source hash matched finalized malicious source