Skip to content

feat(adapters): OpenShell content filter + NemoClaw supply-chain pre-flight - #105

Merged
eeee2345 merged 2 commits into
mainfrom
feat/openshell-nemoclaw-adapters
Jul 12, 2026
Merged

eeee2345 merged 2 commits into
mainfrom
feat/openshell-nemoclaw-adapters

Conversation

@eeee2345

@eeee2345 eeee2345 commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Two agent-runtime adapters that reuse the canonical ATREngine (no new dependency).

openshell-filter (src/adapters/openshell-filter.ts)

  • Reference content filter for NVIDIA/OpenShell's proposed L7 content-inspection contract (their issue 1272).
  • Reads the L7 body on stdin; exit 0 = allow, exit 1 = deny (verdict JSON on stdout), exit 2 = error.
  • Emits canonical atr.* detection findings; matched values redacted by default (ATR_FORENSIC_MODE to retain).
  • One-shot mode plus a persistent NDJSON serve mode (loads rules once).

nemoclaw-preflight (src/adapters/nemoclaw-preflight.ts)

  • Supply-chain pre-flight gate: scans SKILL.md skills and MCP config files (.mcp.json, .cursor/mcp.json, ...) before an agent is provisioned.
  • Scans MCP config files as content, the path the existing scan does not cover (it treats .json as MCP events).
  • Fail-closed: an oversized file, a symlink, an unreadable file, or hitting the file cap yields an incomplete verdict (exit 2), never a silent pass.

Tests for both (26 cases), an examples/openshell config plus wrapper, and package exports ./openshell-filter and ./nemoclaw-preflight. Reuses the same engine, redaction, and severity-threshold conventions as the existing Mastra adapter.

…flight

Two agent-runtime adapters reusing the canonical ATREngine (no new dependency).

openshell-filter: reference content filter for the NVIDIA/OpenShell L7 content-inspection contract proposed in their issue 1272. Reads the L7 body on stdin; exit 0 allow / 1 deny (verdict JSON on stdout) / 2 error; emits canonical atr.* detection findings, matched values redacted by default; one-shot and persistent NDJSON serve modes.

nemoclaw-preflight: supply-chain pre-flight gate that scans SKILL.md skills and MCP config files before an agent is provisioned. Scans MCP config files as content (path atr scan does not cover). Fail-closed: oversized / symlink / unreadable / file-cap yields an incomplete verdict, never a silent pass.

Adds tests for both, an examples/openshell config + wrapper, and package exports ./openshell-filter and ./nemoclaw-preflight.
- openshell-filter (runServe): enforce the ATR_MAX_BODY_BYTES cap in
  --serve mode too. Previously only one-shot/stdin was capped, so a single
  oversized NDJSON line passed an uncapped body straight to the engine.
- nemoclaw-preflight (collectTargets): lstat the root instead of stat, so a
  symlinked root argument is no longer silently followed — honoring the
  module's 'never follow symlinks' contract (the per-entry guard only covered
  symlinks discovered during directory traversal).
@eeee2345
eeee2345 merged commit 4d47479 into main Jul 12, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant