Loading npm security reports…
Loading npm security reports…
greprag@5.60.7: 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:40 UTC · by lpm-firewall-ai The package has an automatic postinstall hook that installs its own skill into external AI-agent directories, creating an unrequested agent instruction surface. The inspected hook does not collect credentials or contact a network host, so this is an agent extension lifecycle risk rather than a confirmed attack.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
Package installation when a Claude Code or Codex home directory is detected.
Impact
The installed skill can influence subsequent agent interactions without a separate setup command.
Mechanism
The postinstall script copies the bundled `greprag` skill into that agent's skills directory and refreshes bundled skills already present there.
Evidence
package.json scripts/postinstall.js ~/.claude/skills/greprag/** ~/.codex/skills/greprag/** ~/.claude/docs/chip-spawn.md (only if it already exists)
public snapshot
Evidence for warning
The postinstall hook runs automatically and copies bundled skills into detected Claude Code and Codex home directories. On install, the package's `greprag` skill is installed even if it was not already present. Evidence against
The install hook only copies bundled skill files and refreshes an existing Claude-specific document; no network request or credential collection is present in that hook. Other agent setup, including OpenCode configuration, is reached through an explicit `greprag init` command. 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 162 files · 1.75 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