registry  /  @h-rig/harness-plugin  /  0.0.6-alpha.240

@h-rig/harness-plugin@0.0.6-alpha.240

First-party agent-harness provider capability plugin for Rig.

AI Security Review

scanned 3h ago · by lpm-firewall-ai

LPM treats this as warn-only first-party agent extension lifecycle risk. No install-time attack surface is present. Runtime setup can materialize first-party Rig session hooks and Pi configuration within a selected project, and agent commands can launch provider binaries.

Static reason
High-risk behavior combination matched malicious policy.
Trigger
Explicit Rig plugin/session setup or agent-wrapper execution.
Impact
Can alter `.claude/settings.json`, `.pi/settings.json`, and Rig-managed project state when invoked by the Rig runtime.
Mechanism
Project-scoped AI-agent configuration materialization and provider process launch.
Rationale
The scanner's malicious label is not supported by a concrete autonomous attack chain. The package warrants a warning because it explicitly materializes AI-agent control settings and executes agent providers during its intended runtime workflow.
Evidence
package.jsondist/src/session-hook-materializer-service.jsdist/src/pi-settings-materializer.jsdist/src/skill-materializer.jsdist/src/agent-harness/agent-wrapper.jsdist/src/pi-command.js.claude/settings.json.pi/settings.json.pi/skills.rig/state/pi-managed-packages.jsonnative/linux-arm64/rig-shellnative/linux-x64/rig-shellnative/darwin-arm64/rig-shellnative/darwin-x64/rig-shellnative/win32-x64/rig-shell.exe
Network endpoints1
registry.npmjs.org/-/v1/search

Decision evidence

public snapshot
AI called this Suspicious at 90.0% confidence as Dangerous Capability with low false-positive risk.
Evidence for warning
  • `dist/src/session-hook-materializer-service.js` writes Claude Code command hooks to project `.claude/settings.json`.
  • `dist/src/pi-settings-materializer.js` writes configured Pi packages to `.pi/settings.json`.
  • `dist/src/agent-harness/agent-wrapper.js` launches configured agent-provider commands with `Bun.spawn`.
  • `native/*/rig-shell` and `native/*/rig-tools` are shipped executable artifacts.
Evidence against
  • `package.json` has no preinstall, install, postinstall, or bin lifecycle hook.
  • Agent execution is guarded by explicit entrypoint/runtime invocation, not normal import.
  • Hook materializer preserves non-plugin-owned hooks and tags its own entries for replacement.
  • Network use is limited to explicit npm search and configured Rig server steering reads; no hard-coded exfiltration endpoint found.
  • No source evidence of credential harvesting, remote payload download, eval/vm execution, or destructive host-wide persistence.
Behavioral surface
Source
ChildProcessCryptoEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsUrlStrings
Manifest
NoLicense
scanned 34 file(s), 640 KB of source, external domains: registry.npmjs.org

Source & flagged code

3 flagged · loading source
dist/src/agent-harness/rig-agent.jsView file
15const candidates = [ L16: process.env.RIG_CONTROLLED_BASH_BIN?.trim() || "", L17: resolve(layout.binDir, "controlled-bash"), ... L29: async function runControlledBash(args, options) { L30: const projectRoot = process.env.RIG_HOST_PROJECT_ROOT?.trim() || process.env.PROJECT_RIG_ROOT?.trim() || process.env.RIG_TASK_WORKSPACE?.trim() || process.cwd() || options.projectR... L31: const controlled = resolveControlledBash(projectRoot); ... L38: stdin: "inherit", L39: stdout: "inherit", L40: stderr: "inherit", ... L170: try { L171: const parsed = JSON.parse(readFileSync(path, "utf-8")); L172: return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
Critical
Persistence Backdoor

Source writes persistence or remote-access backdoor material.

dist/src/agent-harness/rig-agent.jsView on unpkg · L15
15Trigger-reachable chain: manifest.exports -> dist/src/agent-harness/rig-agent.js L15: const candidates = [ L16: process.env.RIG_CONTROLLED_BASH_BIN?.trim() || "", L17: resolve(layout.binDir, "controlled-bash"), ... L29: async function runControlledBash(args, options) { L30: const projectRoot = process.env.RIG_HOST_PROJECT_ROOT?.trim() || process.env.PROJECT_RIG_ROOT?.trim() || process.env.RIG_TASK_WORKSPACE?.trim() || process.cwd() || options.projectR... L31: const controlled = resolveControlledBash(projectRoot); ... L38: stdin: "inherit", L39: stdout: "inherit", L40: stderr: "inherit", ... L170: try { L171: const parsed = JSON.parse(readFileSync(path, "utf-8")); L172: return parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : null;
Critical
Trigger Reachable Dangerous Capability

A package entrypoint or install-time lifecycle script reaches a source file with blocking dangerous behavior.

dist/src/agent-harness/rig-agent.jsView on unpkg · L15
native/linux-arm64/rig-shellView file
path = native/linux-arm64/rig-shell kind = native_binary sizeBytes = 3038760 magicHex = [redacted]
Medium
Ships Native Binary

Package ships native binary artifacts.

native/linux-arm64/rig-shellView on unpkg

Findings

2 Critical4 Medium4 Low
CriticalPersistence Backdoordist/src/agent-harness/rig-agent.js
CriticalTrigger Reachable Dangerous Capabilitydist/src/agent-harness/rig-agent.js
MediumNetwork
MediumEnvironment Vars
MediumShips Native Binarynative/linux-arm64/rig-shell
MediumStructural Risk Force Deep Review
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings
LowNo License