feat(guards): implement denylist guard enforcement for tool invocation blocking #8536

Open
opened 2026-04-13 20:37:04 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit message type: feat
  • Scope: guards
  • Branch name prefix: feat/v3.5.0-denylist-guard-enforcement

Background and Context

As part of Epic #8424 (Guard & Safety System), the denylist guard prevents plans from invoking tools or actions that have been explicitly blocked. This is a critical safety mechanism for autonomous execution — without it, an agent could invoke dangerous or disallowed tools.

This issue blocks Epic #8424.

Expected Behavior

  • A denylist of tool names/patterns can be configured at the global, plan, or action level
  • Any plan action attempting to invoke a denylisted tool raises GuardViolationError
  • The error message identifies the tool name and the denylist rule that was violated
  • Denylist patterns support wildcards (e.g., shell_exec.*)

Acceptance Criteria

  • DenylistGuard class is implemented with configurable tool name/pattern list
  • Guard raises GuardViolationError when a denylisted tool is invoked
  • Error message includes: tool name, matched denylist pattern, plan ID
  • Denylist patterns support exact match and wildcard patterns
  • Guard is integrated into the plan execution pipeline
  • BDD tests cover denylist enforcement scenarios
  • Unit tests achieve >= 97% coverage

Subtasks

  • Define GuardViolationError exception class
  • Implement DenylistGuard class with pattern matching
  • Add wildcard pattern support (fnmatch or regex)
  • Integrate DenylistGuard into plan execution pipeline
  • Emit structured log event on guard violation
  • Write BDD tests for denylist enforcement
  • Write unit tests for pattern matching logic

Definition of Done

  1. DenylistGuard is implemented and integrated into plan execution
  2. BDD tests cover all denylist enforcement scenarios
  3. Unit tests pass with >= 97% coverage
  4. Code reviewed and merged to main branch

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor

## Metadata - **Commit message type**: `feat` - **Scope**: `guards` - **Branch name prefix**: `feat/v3.5.0-denylist-guard-enforcement` ## Background and Context As part of Epic #8424 (Guard & Safety System), the denylist guard prevents plans from invoking tools or actions that have been explicitly blocked. This is a critical safety mechanism for autonomous execution — without it, an agent could invoke dangerous or disallowed tools. This issue blocks Epic #8424. ## Expected Behavior - A denylist of tool names/patterns can be configured at the global, plan, or action level - Any plan action attempting to invoke a denylisted tool raises `GuardViolationError` - The error message identifies the tool name and the denylist rule that was violated - Denylist patterns support wildcards (e.g., `shell_exec.*`) ## Acceptance Criteria - [ ] `DenylistGuard` class is implemented with configurable tool name/pattern list - [ ] Guard raises `GuardViolationError` when a denylisted tool is invoked - [ ] Error message includes: tool name, matched denylist pattern, plan ID - [ ] Denylist patterns support exact match and wildcard patterns - [ ] Guard is integrated into the plan execution pipeline - [ ] BDD tests cover denylist enforcement scenarios - [ ] Unit tests achieve >= 97% coverage ## Subtasks - [ ] Define `GuardViolationError` exception class - [ ] Implement `DenylistGuard` class with pattern matching - [ ] Add wildcard pattern support (fnmatch or regex) - [ ] Integrate `DenylistGuard` into plan execution pipeline - [ ] Emit structured log event on guard violation - [ ] Write BDD tests for denylist enforcement - [ ] Write unit tests for pattern matching logic ## Definition of Done 1. `DenylistGuard` is implemented and integrated into plan execution 2. BDD tests cover all denylist enforcement scenarios 3. Unit tests pass with >= 97% coverage 4. Code reviewed and merged to main branch --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.5.0 milestone 2026-04-13 20:53:18 +00:00
Author
Owner

[AUTO-OWNR-4] Triage Decision (Cycle 2)

Status: Verified

MoSCoW: Must Have
Priority: High
Milestone: v3.5.0

Rationale: This is a required implementation task for the v3.5.0 milestone (Autonomy Hardening). Denylist guard enforcement is explicitly listed in the v3.5.0 acceptance criteria under "Guard enforcement works (denylist, budget caps, tool call limits)" and is a critical safety mechanism for autonomous execution.

Next Steps: Implementation worker should pick this up as part of the v3.5.0 epic work.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

## [AUTO-OWNR-4] Triage Decision (Cycle 2) **Status**: ✅ Verified **MoSCoW**: Must Have **Priority**: High **Milestone**: v3.5.0 **Rationale**: This is a required implementation task for the v3.5.0 milestone (Autonomy Hardening). Denylist guard enforcement is explicitly listed in the v3.5.0 acceptance criteria under "Guard enforcement works (denylist, budget caps, tool call limits)" and is a critical safety mechanism for autonomous execution. **Next Steps**: Implementation worker should pick this up as part of the v3.5.0 epic work. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#8536
No description provided.