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

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

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

AI Security Review

scanned 2d ago · by lpm-firewall-ai

No confirmed malicious attack surface was established. The package is a first-party Rig harness plugin with user-invoked agent runtime, shell, file, and native-tool capabilities that are scoped by Rig runtime paths.

Static reason
High-risk behavior combination matched malicious policy.
Trigger
User invokes Rig harness agent/runtime commands or configures the runtime tool router.
Impact
Provides controlled shell/file/git/runtime support for Rig tasks; no unconsented install/import execution or exfiltration found.
Mechanism
package-aligned agent harness and runtime tooling
Rationale
Static inspection found powerful agent-runtime primitives, native binaries, environment handling, and network calls, but they are exposed as explicit Rig harness functionality and bounded by runtime/workspace configuration. No lifecycle hook, import-time payload, credential exfiltration, persistence backdoor, or unconsented AI-agent control-surface mutation was confirmed.
Evidence
package.jsondist/src/plugin.jsdist/src/agent-harness/rig-agent.jsdist/src/tooling/claude-router.jsdist/src/tooling/gateway.jsdist/bin/rig-agent-dispatch.jsnative/linux-arm64/rig-shellruntimeHome/.ssh/known_hostsRIG task workspace files via runtime file toolsRig harness state files under resolveHarnessPaths(projectRoot).stateDir
Network endpoints1
registry.npmjs.org/-/v1/search

Decision evidence

public snapshot
AI called this Clean at 82.0% confidence as Benign with medium false-positive risk.
Evidence for block
  • Ships native runtime binaries under native/*/rig-shell and native/*/rig-tools.
  • dist/src/tooling/claude-router.js exposes shell/file MCP tools for agent runtimes.
  • dist/src/agent-harness/rig-agent.js hydrates runtime env and reads configured .env secrets for the task runtime.
Evidence against
  • package.json has no lifecycle scripts, so no install-time execution was found.
  • Default export is dist/src/plugin.js; risky shell/file behavior is invoked by rig-agent/runtime router commands, not import side effects.
  • Shell workdir is constrained inside RIG_TASK_WORKSPACE in dist/src/tooling/claude-router.js.
  • Known-hosts writes are limited to runtimeHome/.ssh/known_hosts with GitHub host keys for git operations.
  • Network use seen is package-aligned: npm registry search and configured Rig server steering URL.
Behavioral surface
Source
ChildProcessEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsUrlStrings
Manifest
NoLicense
scanned 34 file(s), 634 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", ... L169: try { L170: const parsed = JSON.parse(readFileSync(path, "utf-8")); L171: 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", ... L169: try { L170: const parsed = JSON.parse(readFileSync(path, "utf-8")); L171: 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 = 3029392 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