Repository navigation
v0.14.0: Context Lifecycle Scanner (Stage 0-1)
Context Lifecycle Scanner
HMA now models how agent context evolves through execution stages, detecting injections that survive system prompt assembly.
New: Stage 1 Assembly Simulation
The assembly scanner discovers components (SOUL.md, tool descriptions, memory, user preferences, conversation history), simulates how they're assembled into the final system prompt, and detects attacks invisible to static file scanning:
- LIFECYCLE-001: Assembly-emergent injections (benign alone, malicious when assembled)
- LIFECYCLE-002: Cross-component split injections (half in memory, half in tools)
- LIFECYCLE-003: Context window displacement attacks
- LIFECYCLE-004: Low safety instruction ratio
- LIFECYCLE-005: Priority zone instruction injection (recency bias exploit)
- LIFECYCLE-006: Role delimiter injection in non-system components
- LIFECYCLE-007: Hidden instructions in HTML comments
- LIFECYCLE-008: Assembly without safety instructions
- LIFECYCLE-009: Conflicting assembly instructions
- LIFECYCLE-010: Token budget exhaustion
New Attack Payloads
10 context-lifecycle attack payloads for red-team testing. 155 total payloads across 15 categories.
New Types
LifecycleScanResultwrapsScanResultwith stage metadata (backward compatible)AssemblyComponenttracks individual components and their position in the assembled promptAssemblyInteractiondescribes cross-component attack interactionsscanAssembly()andtoLifecycleResult()exported for programmatic use
Stats
- 1353 tests passing
- 155 attack payloads (15 categories)
- 10 LIFECYCLE-* checks
- 3 DVAA scenarios
- 25 NanoMind training samples