UAT: Shell danger detection missing kill -9/killall (medium) and fdisk/parted (high) patterns #10419

Open
opened 2026-04-18 09:36:52 +00:00 by HAL9000 · 0 comments
Owner

Summary

The spec requires kill -9/killall to be detected at MEDIUM danger level and fdisk/parted at HIGH danger level. Neither pattern is present in the default pattern registry.

Expected Behavior (from spec)

  • kill -9/killall → MEDIUM danger level
  • fdisk/parted → HIGH danger level

Actual Behavior

src/cleveragents/tui/shell_safety/pattern_registry.py does not contain patterns for:

  • kill -9 or killall
  • fdisk or parted

The default patterns only cover: rm -rf /, rm -rf /*, fork bomb (CRITICAL), dd if=, mkfs, shred (HIGH), chmod 777, sudo rm, wget/curl | sh/bash (MEDIUM), git push --force, chmod -R (LOW).

Reproduction Steps

  1. Inspect src/cleveragents/tui/shell_safety/pattern_registry.py
  2. Search for kill, killall, fdisk, parted — none found
  3. Run DangerousPatternDetector().check("kill -9 1234") — returns no warnings
  4. Run DangerousPatternDetector().check("fdisk /dev/sda") — returns no warnings

Subtasks

  • Add kill -9/killall pattern at MEDIUM level to DEFAULT_PATTERNS
  • Add fdisk/parted pattern at HIGH level to DEFAULT_PATTERNS
  • Add tests for both new patterns
  • Verify existing tests still pass

Definition of Done

  • kill -9 <pid> detected at MEDIUM
  • killall <process> detected at MEDIUM
  • fdisk /dev/sda detected at HIGH
  • parted /dev/sda detected at HIGH
  • Tests pass

Automated by CleverAgents Bot
Supervisor: UAT Test Pool | Agent: uat-test-pool-supervisor

## Summary The spec requires `kill -9`/`killall` to be detected at MEDIUM danger level and `fdisk`/`parted` at HIGH danger level. Neither pattern is present in the default pattern registry. ## Expected Behavior (from spec) - `kill -9`/`killall` → MEDIUM danger level - `fdisk`/`parted` → HIGH danger level ## Actual Behavior `src/cleveragents/tui/shell_safety/pattern_registry.py` does not contain patterns for: - `kill -9` or `killall` - `fdisk` or `parted` The default patterns only cover: `rm -rf /`, `rm -rf /*`, fork bomb (CRITICAL), `dd if=`, `mkfs`, `shred` (HIGH), `chmod 777`, `sudo rm`, `wget/curl | sh/bash` (MEDIUM), `git push --force`, `chmod -R` (LOW). ## Reproduction Steps 1. Inspect `src/cleveragents/tui/shell_safety/pattern_registry.py` 2. Search for `kill`, `killall`, `fdisk`, `parted` — none found 3. Run `DangerousPatternDetector().check("kill -9 1234")` — returns no warnings 4. Run `DangerousPatternDetector().check("fdisk /dev/sda")` — returns no warnings ## Subtasks - [ ] Add `kill -9`/`killall` pattern at MEDIUM level to `DEFAULT_PATTERNS` - [ ] Add `fdisk`/`parted` pattern at HIGH level to `DEFAULT_PATTERNS` - [ ] Add tests for both new patterns - [ ] Verify existing tests still pass ## Definition of Done - [ ] `kill -9 <pid>` detected at MEDIUM - [ ] `killall <process>` detected at MEDIUM - [ ] `fdisk /dev/sda` detected at HIGH - [ ] `parted /dev/sda` detected at HIGH - [ ] Tests pass --- **Automated by CleverAgents Bot** Supervisor: UAT Test Pool | Agent: uat-test-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#10419
No description provided.