Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:AISecurityLab Hackagent Buckets

From Leeroopedia
Knowledge Sources
Domains Storage, Evaluation
Last Updated 2026-10-29 00:00 GMT

Overview

Concrete classification function mapping evaluation outcomes into reporting buckets (jailbreak, mitigated, error, pending), shared by the local backend, TUI, and web UI, provided by the HackAgent storage package.

Description

'result_bucket(status, notes) classifies a result into one of four buckets: JAILBREAK (SUCCESSFUL_JAILBREAK), MITIGATED (FAILED_JAILBREAK or PASSED_CRITERIA), ERROR (FAILED_CRITERIA, ERROR, or "failed with exception" in notes), or PENDING (unknown). The classification lives next to storage because every consumer needs the same logic.

Usage

  • LocalBackend: count_result_buckets uses result_bucket().
  • TUI/Web UI: Run summaries display bucket counts.

Code Reference

Source Location

Signature

JAILBREAK = "jailbreak"
MITIGATED = "mitigated"
ERROR = "error"
PENDING = "pending"

def result_bucket(status: Optional[str], notes: Optional[str] = None) -> str: ...

Import

from hackagent.storage.buckets import result_bucket, JAILBREAK, MITIGATED, ERROR, PENDING

Usage Examples

Classify a Result

from hackagent.storage.buckets import result_bucket

bucket = result_bucket("SUCCESSFUL_JAILBREAK")
print(bucket)  # "jailbreak"

bucket = result_bucket("FAILED_JAILBREAK")
print(bucket)  # "mitigated"

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment