Skip to content

feat(presets): add SidClaw agent governance preset#1044

Open
VladUZH wants to merge 1 commit intoNVIDIA:mainfrom
VladUZH:add-sidclaw-preset
Open

feat(presets): add SidClaw agent governance preset#1044
VladUZH wants to merge 1 commit intoNVIDIA:mainfrom
VladUZH:add-sidclaw-preset

Conversation

@VladUZH
Copy link
Copy Markdown

@VladUZH VladUZH commented Mar 28, 2026

Summary

Adds a network policy preset for SidClaw, an agent governance platform that adds policy evaluation, human-in-the-loop approval, and hash-chain audit trails to tools running inside NemoClaw sandboxes.

NemoClaw secures the sandbox (network, filesystem, process). SidClaw governs what happens inside it (policy, approval, audit).

What this preset enables

The sidclaw preset allows the sandbox to reach the SidClaw API (api.sidclaw.com:443) for:

  • Policy evaluationPOST /api/v1/evaluate — every tool call checked against governance policies
  • Approval pollingGET /api/v1/approvals/** — wait for human approval on high-risk actions
  • Outcome recordingPOST /api/v1/traces/*/outcome — tamper-proof audit trail
  • Agent identityGET /api/v1/agents/** — resolve agent permissions

Usage

Add sidclaw to your blueprint's preset list, then use the SidClaw SDK:

import { governNemoClawTools } from '@sidclaw/sdk/nemoclaw';

const governed = governNemoClawTools(client, tools, {
  sandboxName: 'my-sandbox',
  dataClassification: { send_email: 'confidential' },
});
from sidclaw.middleware.nemoclaw import govern_nemoclaw_tools

governed = govern_nemoclaw_tools(client, tools, config)

Links

Summary by CodeRabbit

  • New Features
    • Added a governance policy preset for sidclaw network integration with support for secure API endpoint access, approval workflow management, trace outcome reporting, and controlled system binary execution.

Adds a network policy preset for SidClaw (https://sidclaw.com), an
agent governance platform that adds policy evaluation, human-in-the-loop
approval, and hash-chain audit trails to tools running inside NemoClaw
sandboxes.

The preset allows the sandbox to reach the SidClaw API for:
- Policy evaluation (POST /api/v1/evaluate)
- Approval status polling (GET /api/v1/approvals/**)
- Outcome recording (POST /api/v1/traces/*/outcome)
- Agent identity resolution (GET /api/v1/agents/**)

Usage: Add `sidclaw` to your blueprint's preset list, then use the
SidClaw SDK (`@sidclaw/sdk/nemoclaw` or `sidclaw.middleware.nemoclaw`)
to wrap tool execution with governance.

Docs: https://docs.sidclaw.com/docs/integrations/nemoclaw
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 28, 2026

📝 Walkthrough

Walkthrough

A new governance policy preset configuration file for sidclaw was added, defining network policies for an API endpoint (api.sidclaw.com:443), HTTP operation rules for evaluation and approval workflows, and a binaries allowlist containing Node.js and Python3 executables.

Changes

Cohort / File(s) Summary
New Governance Policy Preset
nemoclaw-blueprint/policies/presets/sidclaw.yaml
Added sidclaw preset with network policies targeting REST endpoint, HTTP operation rules for policy evaluation, approval workflows, trace reporting, and agent listing, plus binaries allowlist for node and python3.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 A sidclaw preset hops into place,
Network policies setting the pace,
APIs approved with a nod and a rule,
Node and Python stay safe as our tool!
Governance whiskers all neatly aligned,

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(presets): add SidClaw agent governance preset' clearly and concisely describes the main change: adding a new governance preset for SidClaw.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@nemoclaw-blueprint/policies/presets/sidclaw.yaml`:
- Around line 4-6: The new preset entry "sidclaw" was added (preset.name =
sidclaw), so update the preset-list test assertions in policies.test.js: add
"sidclaw" to the expected names array/list and increment the expected total
count (or update the snapshot) so the test that verifies preset names/count
passes; ensure any ordering-sensitive assertion matches the actual order used by
the preset loader.
- Around line 24-26: The binaries allowlist in the preset currently whitelists
full interpreters via the "binaries" section (entries for /usr/local/bin/node
and /usr/bin/python3), which is too broad; update the preset to remove these
generic interpreter paths and instead whitelist only the minimal, explicit
executables or wrapper scripts the preset actually needs (e.g., specific CLI
binaries, application launchers, or hashed file entries) so that merging presets
won’t unintentionally grant broad execution surface—locate the "binaries" list
in sidclaw.yaml and replace the interpreter entries with targeted binaries or
remove them entirely if not required.
- Around line 20-21: The policy currently grants write access to approval
decisions via the two entries allow: { method: POST, path:
"/api/v1/approvals/*/approve" } and allow: { method: POST, path:
"/api/v1/approvals/*/deny" } in sidclaw.yaml which is broader than intended;
remove these two POST allow rules (or replace them with a tightly scoped rule
limited to an admin/service role or additional attribute checks) so only the
intended polling GET routes remain (e.g., keep GET /api/v1/approvals/**) and
ensure any approval/deny mutation is only permitted for an explicitly authorized
role.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d6b1f957-a789-42ff-8133-242c032c56ac

📥 Commits

Reviewing files that changed from the base of the PR and between eb4ba8c and 8673747.

📒 Files selected for processing (1)
  • nemoclaw-blueprint/policies/presets/sidclaw.yaml

Comment on lines +4 to +6
preset:
name: sidclaw
description: "SidClaw agent governance — policy evaluation, human approval, audit trails"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Preset catalog tests need updating for new sidclaw entry.

Adding this preset will make preset-list assertions stale (count and expected names). Please update test/policies.test.js accordingly to keep CI green.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nemoclaw-blueprint/policies/presets/sidclaw.yaml` around lines 4 - 6, The new
preset entry "sidclaw" was added (preset.name = sidclaw), so update the
preset-list test assertions in policies.test.js: add "sidclaw" to the expected
names array/list and increment the expected total count (or update the snapshot)
so the test that verifies preset names/count passes; ensure any
ordering-sensitive assertion matches the actual order used by the preset loader.

Comment on lines +20 to +21
- allow: { method: POST, path: "/api/v1/approvals/*/approve" }
- allow: { method: POST, path: "/api/v1/approvals/*/deny" }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Over-permissive approval mutation routes may bypass governance intent.

Line 20 and Line 21 allow POST /approve and POST /deny, but the PR objective only calls out polling approvals (GET /api/v1/approvals/**). Unless explicitly required, this grants decision-writing capability from the sandbox and weakens human-in-the-loop controls.

Proposed tightening
         rules:
           - allow: { method: POST, path: "/api/v1/evaluate" }
           - allow: { method: GET, path: "/api/v1/approvals/**" }
-          - allow: { method: POST, path: "/api/v1/approvals/*/approve" }
-          - allow: { method: POST, path: "/api/v1/approvals/*/deny" }
           - allow: { method: POST, path: "/api/v1/traces/*/outcome" }
           - allow: { method: GET, path: "/api/v1/agents/**" }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- allow: { method: POST, path: "/api/v1/approvals/*/approve" }
- allow: { method: POST, path: "/api/v1/approvals/*/deny" }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nemoclaw-blueprint/policies/presets/sidclaw.yaml` around lines 20 - 21, The
policy currently grants write access to approval decisions via the two entries
allow: { method: POST, path: "/api/v1/approvals/*/approve" } and allow: {
method: POST, path: "/api/v1/approvals/*/deny" } in sidclaw.yaml which is
broader than intended; remove these two POST allow rules (or replace them with a
tightly scoped rule limited to an admin/service role or additional attribute
checks) so only the intended polling GET routes remain (e.g., keep GET
/api/v1/approvals/**) and ensure any approval/deny mutation is only permitted
for an explicitly authorized role.

Comment on lines +24 to +26
binaries:
- { path: /usr/local/bin/node }
- { path: /usr/bin/python3 }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Binaries allowlist is too broad for a governance preset.

Allowing full Node/Python interpreters (/usr/local/bin/node, /usr/bin/python3) increases execution surface. Given preset merge behavior, this can unintentionally broaden which processes may reach allowed network policies once combined with other presets.

Suggested direction
-    binaries:
-      - { path: /usr/local/bin/node }
-      - { path: /usr/bin/python3 }
+    binaries:
+      # Prefer narrowly scoped wrapper/launcher binaries used only by the SidClaw integration.
+      # Example placeholders:
+      - { path: /usr/local/bin/sidclaw-governed-node }
+      - { path: /usr/local/bin/sidclaw-governed-python }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
binaries:
- { path: /usr/local/bin/node }
- { path: /usr/bin/python3 }
binaries:
# Prefer narrowly scoped wrapper/launcher binaries used only by the SidClaw integration.
# Example placeholders:
- { path: /usr/local/bin/sidclaw-governed-node }
- { path: /usr/local/bin/sidclaw-governed-python }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@nemoclaw-blueprint/policies/presets/sidclaw.yaml` around lines 24 - 26, The
binaries allowlist in the preset currently whitelists full interpreters via the
"binaries" section (entries for /usr/local/bin/node and /usr/bin/python3), which
is too broad; update the preset to remove these generic interpreter paths and
instead whitelist only the minimal, explicit executables or wrapper scripts the
preset actually needs (e.g., specific CLI binaries, application launchers, or
hashed file entries) so that merging presets won’t unintentionally grant broad
execution surface—locate the "binaries" list in sidclaw.yaml and replace the
interpreter entries with targeted binaries or remove them entirely if not
required.

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