Principle:AISecurityLab Hackagent Campaign Resolution
| Knowledge Sources | |
|---|---|
| Domains | Security_Testing, Dependency_Injection |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
A resolution pattern that transforms a validated campaign specification into ready-to-run runtime objects by building model clients, loading goals, constructing attacks, and assembling judge panels.
Description
Campaign resolution is the bridge between declarative configuration (the YAML spec) and execution (the runner). It instantiates everything a campaign describes without sending any request:
- Goals are loaded from the dataset source.
- Models are built from their configs (target, attack roles, judges, classifier).
- Attacks are constructed from their parameters, with role models bound to traced completion callables.
- The judge panel is assembled from individual judge models.
This separation solves a key problem: if model building and attack construction happen inline during execution, a misconfigured model only surfaces on the first call, after the run has started recording. Resolution catches construction errors before any goal is attacked.
Resolution also supports inversion of control: the builder functions (build_model, load_goals, build_embedder) are injectable, so tests can substitute mock models and custom integrations can plug in their own factories.
Usage
Use this principle when a security testing pipeline has a complex construction phase (multiple models, attacks with roles, panels) that should fail fast and be testable independently of execution. Resolution should be pure construction — no network calls, no side effects.
Theoretical Basis
The pattern is dependency injection at the campaign level:
# Abstract algorithm (NOT real implementation)
def resolve_campaign(spec, *, build, load, build_embed):
goals = load(spec.dataset)
target = build(spec.target)
panel = build_panel(spec.evaluation, build)
attacks = [
resolve_attack(attack_spec, build, build_embed=build_embed)
for attack_spec in spec.attacks
]
return ResolvedCampaign(spec, goals, target, panel, attacks)
The injectable builders (build, load, build_embed) are the injection points. The resolved campaign is a dataclass — a snapshot of everything the run will use, immutable once built.
Related Pages
Implemented By
- Implementation:AISecurityLab_Hackagent_resolve_campaign
- Implementation:AISecurityLab_Hackagent_CampaignSpec
- Implementation:AISecurityLab_Hackagent_Resolve_Goals
- Implementation:AISecurityLab_Hackagent_Intents
- Implementation:AISecurityLab_Hackagent_Labelling
- Implementation:AISecurityLab_Hackagent_Dataset_Taxonomy
- Implementation:AISecurityLab_Hackagent_Endpoint_Overrides