Loading npm security reports…
Loading npm security reports…
greprag@5.84.0: Agent extension lifecycle risk – flagged | LPM Firewall
npm / greprag / 5.84.0 Private GrepRAG client for existing Claude Code, Codex, OpenCode, and Grok Build tenants.
Flagged as agent extension risk
Allowed by default with warning: install-time first-party agent extension setup was detected.
AI security reviewscanned on Oct 13, 2026, 20:22 UTC · by lpm-firewall-ai The automatic postinstall skill installation is a guarded first-party agent extension lifecycle risk, so a warning is appropriate. The inspected source does not support blocking the package as malicious.
Static reason
High-risk behavior combination matched malicious policy.; source matched previously finalized malicious package; routed for review
Trigger
Installing the package runs its postinstall hook when a Claude Code or Codex home is present.
Impact
The skill becomes available to the agent and may influence behavior when used; the source inspected does not show credential disclosure or broader agent configuration changes.
Mechanism
The hook copies the bundled GrepRAG skill into the agent's global skills directory and refreshes that skill on later package installs.
Evidence
package.json scripts/postinstall.js skill/greprag/SKILL.md ~/.claude/skills/greprag ~/.codex/skills/greprag
public snapshot
Evidence for warning
package.json runs scripts/postinstall.js automatically after installation. The postinstall hook targets global skill directories for detected Claude Code and Codex homes. The hook copies the package's core GrepRAG skill and refreshes an existing bundled skill during installation. The copied skill is a GrepRAG assistant skill for setup and project memory. Evidence against
The inspected source did not establish credential theft, unrelated network transfer, or broader agent configuration changes. Behavioral surface
Source Child process · Crypto · Dynamic require · Environment variables · Filesystem · Network · Shell
Supply chain High entropy strings · Minified · URL strings
Manifest No manifest risk signals triggered.
Scanned 221 files · 2.60 MB of source
7 external domains referenced
127.0.0.1 api.example.com api.greprag.com code.claude.com docs.claude.com docs.stripe.com registry.npmjs.org Findings1 critical · 17 high · 6 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
Medium Dynamic require
Package source references dynamic require/import behavior.
dist/deploy-gate.js View on unpkg · L63 Code excerpt · 3 lines 63 exports.evaluateDeployGate = evaluateDeployGate;
64 const fs = __importStar (require ("fs" ));
65 const path = __importStar (require ("path" ));
Low Weak crypto
Package source references weak cryptographic algorithms.
dist/commands/state-trigger.js View on unpkg · L84 Code excerpt · 9 lines 84 const TRIGRAM_MAX = 20 ;
85 const ERROR_RE = /\b (error|failed|exception|traceback|exit code [1 -9 ]|not found|no such)\b/i;
86 // ---------- Transcript → turns ----------------------------------------------
⋯
184 try {
185 rec = JSON.parse (trimmed);
186 }
⋯
451 // family (above) and names the flavor (below) — an invocation *mentioning*
452 // fnm/node_modules/package.json is not evidence that fnm/the workspace broke
High Trigger reachable persistence
A manifest entrypoint or package-local install chain reaches persistence behavior.
dist/commands/grok-spawn.js View on unpkg · L5 Medium Install persistence
Source writes installer persistence such as shell profile or service configuration.
dist/commands/grok-spawn.js View on unpkg · L5 Shared code excerpt · 2 findings · 12 lines Trigger-reachable persistence chain: manifest.main -> dist/index.js -> dist/commands/grok-spawn.js
5 * children when the tool call returns. The surviving launch is a scheduled
6 * task (`schtasks /Create /IT` then `/Run` ) that `start` s a new `cmd /k`
7 * window running grok.exe — a visible command-prompt bootloader outside the
⋯
50 const path = __importStar (require ( ));
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 · L10 Code excerpt · 12 lines 10 //
11 // The installed Claude chip-spawn doc (~/.claude/docs/chip-spawn.md) is retired:
12 // `greprag load chip-spawn` serves that doctrine from the package and cannot
⋯
27 name: 'Claude Code' ,
28 agentDir: path.join (home, '.claude' ),
29 skillsTarget: path.join (home, '.claude' , 'skills' ),
30 },
⋯
32 name: '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:
}
}
return { refreshed, blocked };
}
var debug_log_path = path13.join(os5.homedir(), ".greprag", "opencode-plugin-debug.log");
var _debuglogready = false;
function dloginit() {
if (_debuglogready)
return;
_debuglogready = true;
try {
fs12.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 · 20 lines Manifest-trigger-reachable source links an external AI-agent control path to a behavior-bearing write operation.
)
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('#'))
continue;
dist/archive/page-renderer.js#virtual:normalized:round1 View file High Semantic analysis limited
A bounded semantic-analysis stage reached its safety limit; remaining detectors completed, but this package requires AI review.
dist/archive/page-renderer.js#virtual:normalized:round1 View on unpkg Scanner record · 1 line stage = ast_semantic_analysis; reason = ast_parse_error; limitedFiles = 28
High Known malware source similarity
Source file is highly similar to a previously finalized malicious package; route for source-aware review.
dist/commands/app.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.78.3
matchedPath = dist/commands/app.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-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.78.3
matchedPath = dist/commands/watcher-registry.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/ccr-store.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.78.3
matchedPath = dist/ccr-store.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/doctor.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.78.3
matchedPath = dist/commands/doctor.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/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.78.3
matchedPath = dist/commands/inbox-watch-supervisor.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/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.78.3
matchedPath = dist/commands/opencode-relay.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/status.js View on unpkg Scanner record · 6 lines matchType = normalized_sha256
matchedPackage = greprag@5.78.3
matchedPath = dist/commands/status.js
matchedIdentity = npm:Z3JlcHJhZw:5.78.3
similarity = 1.000
summary = normalized source hash matched finalized malicious source
↓
Package metadata 7 findings
Medium Network
Medium Environment variables
Medium Structural risk force deep review
453 // (`fnm exec … | grep -i error` classified as fnm-node-bootstrap off its own
"path"
51 const child_process_1 = require ("child_process" );
52 function winQuote (value) {
55 function resolveGrokExe () {
56 const home = os.homedir ();
57 const named = process.platform === 'win32' ? 'grok.exe' : 'grok' ;
58 const pinned = path.join (home, '.grok' , 'bin' , named);
136 console.error (` ${cmd.map(a => /\s/.test(a) ? JSON.stringify(a) : a).join(' ')}` );
agentDir: path.join (home, '.codex' ),
34 skillsTarget: path.join (home, '.codex' , 'skills' ),
38 function copyDir (src, dest) {
const line = `[${( new date()).toisostring()}] [greprag-memory] ${msg}
fs12.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(filepath2) {
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
const idx = trimmed.indexof('=');
let value = trimmed.slice(idx + 1).trim();
if ((value.startswith('"') && value.endswith('"')
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.78.6
matchedPath = dist/commands/init.js
matchedIdentity = npm:Z3JlcHJhZw:5.78.6
similarity = 1.000
summary = normalized source hash matched finalized malicious source