You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds LC-112, a LangChain v1 create_agent rule for privileged execution tools (ShellTool, PythonREPLTool, PythonAstREPLTool) that lack the structural prerequisites for a resumable human-approval boundary.
The rule reuses existing agent predicates—no schema or evaluator changes—and checks for non-empty middleware plus a checkpointer when privileged execution is exposed. Companion changes in trustabl mirror the fixture and add regression coverage; the rulebook PR documents the threat model, calibration, and limitations.
Thanks for this, @dezsow. The rule is schema-clean: every required field is set, langchain_agent is a valid applies_to for agent scope, and all four predicates already exist on main, so no schema_version bump is needed. agent_kwarg_list_empty treats an absent kwarg as empty, so the any branch reads as "middleware not configured or checkpointer not configured", which is what the title claims. The explanation and fix are framed for LangChain rather than borrowed from another SDK, and I appreciate that the fix says out loud that this only verifies structural prerequisites. The fixture mirror in trustabl/trustabl#181 matches this file exactly.
One question before merging. LC-101 in this same pack already fires at high / 0.85 on exactly those three tool classes for langchain_agent, so every LC-112 hit is a second high on the same call site, and LC-101's fix already prescribes the human-in-the-loop gate. Would medium be fairer here? Worth capturing as a limitation too: on LangGraph Platform the checkpointer comes from the deployment and passing one is discouraged, so a correctly gated agent there still trips that branch.
This needs to land with trustabl/trustabl#181, which is missing its policies_test.go coverage entries, so I cannot take it alone yet. LC-112 also needs a rationale doc in trustabl-rulebook; that part is ours and we are glad to pair on it.
Happy to merge once the severity question is settled and the engine side is green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds LC-112, a LangChain v1 create_agent rule for privileged execution tools (ShellTool, PythonREPLTool, PythonAstREPLTool) that lack the structural prerequisites for a resumable human-approval boundary.
The rule reuses existing agent predicates—no schema or evaluator changes—and checks for non-empty middleware plus a checkpointer when privileged execution is exposed. Companion changes in trustabl mirror the fixture and add regression coverage; the rulebook PR documents the threat model, calibration, and limitations.