---
id: T-229
name: "Fix HIGH severity enforcement bypasses — B-001 (--no-verify) and B-005 (hook
  config)"
description: >
  Implement fixes for the two HIGH severity bypass vectors from T-228 analysis: (1)
  B-001: Detect --no-verify in check-tier0.sh as a Tier 0 destructive pattern. Also
  expand keyword pre-filter. (2) B-005: Detect Write/Edit to .claude/settings.json
  in check-tier0.sh or check-active-task.sh — require Tier 0 approval. Also add B-003
  Tier 0 pattern gaps (find -delete, dd, chmod 000, mkfs, pkill).

status: work-completed
workflow_type: build
owner: agent
horizon:
tags: []
components: [agents/context/check-active-task.sh, agents/context/check-tier0.sh]
related_tasks: [T-228]
created: 2026-02-21T14:19:45Z
last_update: '2026-06-11T22:24:14Z'
date_finished: 2026-02-21T14:23:23Z
bvp_scores_proposed:
  - ts: '2026-06-11T22:24:14Z'
    estimator: bvp-estimator-v1-heuristic
    scores:
      D1: 0
      D2: 0
      D3: 0
      D4: 0
      F-RECALL: 2
      F-ORCH: 0
      F3: 0
      F1: 1
      F2: 0
    rationale: D1=0 (no-signal); D2=0 (no-signal); D3=0 (no-signal); D4=0 
      (no-signal); F-RECALL=2 (body:lightly-promoted); F-ORCH=0 (no-signal); 
      F3=0 (no-signal); F1=1 (body/components:context-fabric-incidental); F2=0 
      (no-signal)
    rubric_sha: e4a00f38e801
---

# T-229: Fix HIGH severity enforcement bypasses — B-001 (--no-verify) and B-005 (hook config)

## Context

Fixes for HIGH severity bypass vectors identified in T-228. See `docs/reports/T-228-enforcement-bypass-analysis.md`.

## Acceptance Criteria

### Agent
- [x] B-001: `--no-verify` detected as Tier 0 pattern in check-tier0.sh (both git commit and git push)
- [x] B-005: Write/Edit to `.claude/settings.json` blocked by check-active-task.sh (Tier 0 or explicit block)
- [x] B-003: Tier 0 patterns expanded with `find -delete`, `dd if=`, `chmod -R 000`, `mkfs`, `pkill -9`
- [x] Keyword pre-filter updated to match new patterns
- [x] Existing safe commands still pass through (no false positives on normal git operations)

## Verification

# B-001: --no-verify must be detected (exit 2 = blocked)
echo '{"tool_input":{"command":"git commit --no-verify -m test"}}' | /opt/999-Agentic-Engineering-Framework/agents/context/check-tier0.sh 2>/dev/null; test $? -eq 2
echo '{"tool_input":{"command":"git push --no-verify"}}' | /opt/999-Agentic-Engineering-Framework/agents/context/check-tier0.sh 2>/dev/null; test $? -eq 2
# B-003: find -delete must be detected
echo '{"tool_input":{"command":"find / -name *.log -delete"}}' | /opt/999-Agentic-Engineering-Framework/agents/context/check-tier0.sh 2>/dev/null; test $? -eq 2
# Safe commands must pass (exit 0 = allowed)
echo '{"tool_input":{"command":"git status"}}' | /opt/999-Agentic-Engineering-Framework/agents/context/check-tier0.sh 2>/dev/null; test $? -eq 0
echo '{"tool_input":{"command":"git commit -m \"T-229: test\""}}' | /opt/999-Agentic-Engineering-Framework/agents/context/check-tier0.sh 2>/dev/null; test $? -eq 0

## Decisions

<!-- Record decisions ONLY when choosing between alternatives.
     Skip for tasks with no meaningful choices.
     Format:
     ### [date] — [topic]
     - **Chose:** [what was decided]
     - **Why:** [rationale]
     - **Rejected:** [alternatives and why not]
-->

## Updates

### 2026-02-21T14:19:45Z — task-created [task-create-agent]
- **Action:** Created task via task-create agent
- **Output:** /opt/999-Agentic-Engineering-Framework/.tasks/active/T-229-fix-high-severity-enforcement-bypasses--.md
- **Context:** Initial task creation

### 2026-02-21T14:23:23Z — status-update [task-update-agent]
- **Change:** status: started-work → work-completed

## Reviewer Verdict (v1.5)

- **Scan ID:** R-d9a41208
- **Timestamp:** 2026-06-02T18:58:51Z
- **Catalogue:** v1.3-seed
- **Overall:** PASS
- **Needs Human:** no
- **Findings:** none

- **Suppressed:** 3 (by override)
  - swallowed-errors @ Verification:line 2
  - swallowed-errors @ Verification:line 3
  - AC-verify-mismatch @ AC#2 (Agent)
