Loading npm security reports…
Loading npm security reports…
greprag@5.60.5: 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, 09:01 UTC · by lpm-firewall-ai The postinstall hook automatically installs the package's own AI-agent skill into detected user skill directories. This matches the warning-only agent extension lifecycle risk; the reviewed install path showed no credential collection or network contact.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
npm install, when a Claude Code or Codex home directory is detected.
Impact
The installed skill becomes available to the agent and can influence its behavior when invoked.
Mechanism
scripts/postinstall.js copies the bundled GrepRAG skill into the agent's skills directory.
Evidence
package.json scripts/postinstall.js skill/greprag/SKILL.md ~/.claude/skills/greprag ~/.codex/skills/greprag
public snapshot
Evidence for warning
The manifest runs scripts/postinstall.js automatically after installation. The postinstall hook copies the package's core skill into detected Claude Code or Codex skill directories. The copied skill provides GrepRAG setup and memory guidance for an AI agent. Evidence against
The automatic write is limited to the package's own GrepRAG skill; other skills are copied only when already present. Installing the Codex startup watcher is exposed through an explicit init command option. No install-time network contact or collection of credentials was identified. 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 161 files · 1.74 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 · 16 high · 5 medium · 5 low Source & flagged code19 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 Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/commands/codex-startup.js View on unpkg · L45 Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
dist/commands/codex-startup.js View on unpkg · L45 Shared code excerpt · 2 findings · 12 lines Trigger-reachable persistence chain: manifest.main -> dist/index.js -> dist/commands/codex.js -> dist/commands/codex-startup.js
45 function home () {
46 return process.env.HOME || process.env.USERPROFILE || os.homedir ();
47 }
⋯
53 }
54 function powershellQuote (s) {
55 return `'${s.replace(/'/g, "''")}'` ;
⋯
68 cli: stableExecutable (path.join (__dirname, '..' , 'index.js' )),
69 args: process.platform === 'win32'
70 ? ['codex' , 'watch' , '--all' , '--delivery' , 'app-server-resume' , '--transport' , 'stdio' ]
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
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/codex-doctor.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.4
matchedPath = dist/commands/codex-doctor.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/mechanic.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.60.6
matchedPath = dist/commands/mechanic.js
matchedIdentity = npm:Z3JlcHJhZw:5.60.6
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.65.0
matchedPath = dist/codex-steering.js
matchedIdentity = npm:Z3JlcHJhZw:5.65.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source
↓
Package metadata 8 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
Low Non install lifecycle scripts
87 const file = path.join (home (), 'Library' , 'LaunchAgents' , 'com.greprag.codex-watch.plist' );
88 return { kind: 'macOS LaunchAgent' , path: file, installed: fs.existsSync (file), hint: 'Load with launchctl or log out/in.' };
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