Loading npm security reports…
Loading npm security reports…
greprag@5.65.1: 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, 13:31 UTC · by lpm-firewall-ai The package is suspicious because its default postinstall writes its own agent skill into user-level Claude Code or Codex directories. The behavior is limited to the package’s extension, so this is an agent extension lifecycle risk rather than evidence of a malicious attack.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
npm install runs the postinstall hook when a Claude Code or Codex home is detected.
Impact
Future sessions may load the installed skill without a separate user setup command. This is an agent extension lifecycle risk.
Mechanism
The hook copies the package’s bundled skill into the agent’s skills directory and refreshes non-core skills only when their destination already exists.
Evidence
package.json scripts/postinstall.js skill/greprag/SKILL.md ~/.claude/skills/<skill> ~/.codex/skills/<skill> ~/.claude/docs/chip-spawn.md
public snapshot
Evidence for warning
package.json runs scripts/postinstall.js automatically after installation. The postinstall hook writes the bundled GrepRAG skill into detected Claude Code or Codex skill directories. The hook skips non-core skills unless their destination already exists, limiting automatic setup to GrepRAG’s own skill and previously installed skills. The Codex startup watcher is installed through an explicit flag or an interactive affirmative. Evidence against
The install hook’s visible behavior is limited to copying bundled skills and refreshing an existing Claude documentation file; it contains no network request. The startup watcher is not installed by default during non-interactive init. 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 170 files · 1.90 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 · 28 lines Runtime or CLI code links a write operation to an explicit external AI-agent control path:
ctivation(entries, readnativeskillnames(params));
}
var debug_log_path = path4.join(os.homedir(), ".greprag", "opencode-plugin-debug.log");
var _debuglogready = false;
function dloginit() {
if (_debuglogready)
return;
_debuglogready = true;
try {
fs4.writefilesync(debug_log_path, "");
} catch {
}
}
function dlog(msg) {
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
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/doctor.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.65.0
matchedPath = dist/commands/doctor.js
matchedIdentity = npm:Z3JlcHJhZw:5.65.0
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/fix.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.78.3
matchedPath = dist/commands/fix.js
matchedIdentity = npm:Z3JlcHJhZw:5.78.3
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.78.3
matchedPath = dist/commands/mechanic.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/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
↓
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 });
dloginit();
const line = `[${( new date()).toisostring()}] [greprag-memory] ${msg}
fs4.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.65.0
matchedPath = dist/commands/init.js
matchedIdentity = npm:Z3JlcHJhZw:5.65.0
similarity = 1.000
summary = normalized source hash matched finalized malicious source