Skip to content

v1.4.2

Choose a tag to compare

@github-actions github-actions released this 24 Apr 14:56
· 1244 commits to main since this release
892cdc0

Fixed

  • PreToolUse Hook Auto-Approve Bug (Issue #224, PR #225)
    • Problem: PreToolUse hook was auto-approving all Edit and Write operations when no secrets were detected, bypassing Claude Code's normal permission prompts and removing user control over file modifications
    • Root Cause: format_response() function returned permissionDecision: allow for clean files, which instructed Claude Code to auto-approve the operation
    • Fix: PreToolUse now only returns permissionDecision when denying operations (secrets/threats detected). For clean operations, returns empty response to allow Claude Code's normal permission system to prompt the user
    • Impact: Users now properly see permission prompts for Edit/Write operations, maintaining informed consent for file modifications
    • Affected Versions: v1.3.0, v1.4.0, v1.4.1 (bug introduced with GitHub Copilot integration in v1.3.0)
    • Tests: Updated 3 existing tests in tests/test_ai_guardian.py to verify correct behavior (no auto-approve)
    • Files Modified:
      • src/ai_guardian/__init__.py: Updated format_response() for both GITHUB_COPILOT and CLAUDE_CODE paths
      • tests/test_ai_guardian.py: Updated 3 tests to expect correct behavior (no auto-approve)