Conformance
11.1 Document Conformance
Section titled “11.1 Document Conformance”A conforming OATF document MUST satisfy all structural requirements in this section. The SDK specification (§3.2) assigns stable rule identifiers (V-001 through V-050) to conformance requirements across this specification and provides a complete mapping from rule identifiers to their normative section references. Conformance test suites reference these identifiers. The numbered rules below define the structural requirements; additional V-rules cover field-level validation constraints defined in their respective sections (§4 through §7).
Core structure
- MUST be valid YAML (version 1.2). MUST NOT use YAML anchors (
&), aliases (*), merge keys (<<), or custom YAML tags (e.g.,!include,!!python/object). These constructs introduce parsing ambiguity, deserialization vulnerabilities, or conflict with OATF’s own state inheritance model. Tools MUST parse OATF documents using a safe YAML loader that rejects language-specific type coercion. - MUST declare
oatf: "0.1". Documents SHOULD place it as the first key (see §4.1). - MUST contain exactly one
attackobject. - MUST include
attack.execution. - MUST use only valid values for closed enumerations defined in this specification:
severity.level,attack.status,impact,classification.category,correlation.logic,indicator.tier,extractor.source,extractor.type, andmapping.relationship. Mode values (execution.mode,actor.mode,phase.mode) are open: they MUST match the pattern[a-z][a-z0-9_]*_(server|client)but are not restricted to modes defined in this version. Protocol values (indicator.protocol) MUST match the pattern[a-z][a-z0-9_]*. Surface and event values for recognized protocol bindings SHOULD produce warnings for unrecognized values; for unrecognized bindings, tools MUST skip surface and event validation.
Execution forms, phases, and actors
- MUST specify exactly one of
execution.state(single-phase form),execution.phases(multi-phase form), orexecution.actors(multi-actor form); they are mutually exclusive. Whenexecution.stateis present,execution.modeMUST also be present. - In multi-phase form: MUST have at least one entry in
execution.phases. MUST have at most one terminal phase, and it MUST be the last phase. MUST includestateon the first phase. Explicitly specifiedphase.namevalues MUST be unique. Whenphase.extractorsis present, it MUST contain at least one entry. - In multi-actor form: MUST have at least one entry in
execution.actors. Each actor MUST declareactor.name(matching[a-z][a-z0-9_]*) andactor.mode. Actor names MUST be unique. Each actor MUST have at least one phase. Explicitly specified phase names MUST be unique within each actor. Terminal phase rules and first-phasestaterules apply per-actor. Whenphase.modeis specified, it MUST match the actor’sactor.mode; cross-protocol attacks use separate actors.
Indicators and event validation
- MUST have at least one entry in
indicatorswhenindicatorsis present. - MUST use unique
indicator.idvalues within the document when IDs are specified explicitly. - Each indicator MUST contain exactly one detection key (
pattern,expression, orsemantic). - When
execution.modeis absent andexecution.actorsis absent (the mode-less multi-phase form), every phase MUST specifyphase.mode, and all phase modes MUST be identical. Attacks requiring different modes (including role changes within the same protocol, e.g.,mcp_server→mcp_client) require the multi-actor form. Whenexecution.modeis absent, regardless of whetherexecution.actorsis present, every indicator (when present) MUST specifyindicator.protocol. In multi-actor form,actor.modeprovides phase-level mode inheritance (sophase.modeis typically omitted), but indicators are document-level and not scoped to any actor, soindicator.protocolremains required. - For modes defined by bindings included in this specification, trigger event types SHOULD produce a warning when not valid for the actor’s mode. Event types not listed in the binding’s event tables on a recognized mode SHOULD produce a warning but MUST NOT be rejected.
Response entries and validation
- In any
responses,sampling_responses,elicitation_responses,task_responses, ortool_responseslist, at most one entry MAY omitwhen. When present, it SHOULD be the last entry in the list. An entry withoutwhenafter another entry withoutwhenis a validation error. - All
expression.variableskeys MUST be valid CEL identifiers, matching[_a-zA-Z][_a-zA-Z0-9]*. Names containing hyphens, dots, or other non-identifier characters are rejected because CEL would parse them as operators rather than variable references.
Actions
- Binding-specific action objects (those containing no known action key) MUST contain exactly one non-
x-key.
Field-level validation
attack.version, when present, MUST be a positive integer (≥ 1).trigger.after, when present, MUST be a valid duration (shorthand or ISO 8601).- Extractor names MUST match the pattern
[a-z][a-z0-9_]*. triggerMUST specify at least one ofeventorafter. An empty trigger object is invalid.- When
extractor.typeisregex, theextractor.selectorMUST contain at least one capture group. phase.on_enter, when present, MUST contain at least one entry.- In multi-actor form,
phase.modewhen specified MUST matchactor.mode. Cross-protocol attacks use separate actors. attack.impact, when present, MUST NOT contain duplicate values.attack.grace_period, when present, MUST be a valid duration (shorthand or ISO 8601).correlation, when present, MUST only appear whenindicatorsis also present.
Indicator cross-references
- When
indicator.actoris present, it MUST reference anactor.namethat exists in the document’s (normalized)execution.actorslist. - When
indicator.methodis present, it MUST match the detection key present on the indicator (pattern,expression, orsemantic).
11.2 Tool Conformance: General
Section titled “11.2 Tool Conformance: General”All conforming tools (adversarial and evaluation):
Defaults and shorthand expansion
- MUST apply default values for omitted optional fields:
| Field | Default | Condition |
|---|---|---|
attack.name | "Untitled" | Always |
attack.version | 1 | Always |
attack.status | "draft" | Always |
severity.confidence | 50 | When severity is present |
phase.name | "phase-{N}" | 1-based index within actor |
phase.mode | execution.mode | When execution.mode is present |
phase.mode | actor.mode | In multi-actor form, when still absent after above |
trigger.count | 1 | When trigger.event is present |
indicator.protocol | Protocol from execution.mode | When both indicators and execution.mode are present |
correlation.logic | "any" | When indicators is present |
mapping.relationship | "primary" | Always |
- MUST expand severity scalar form (
severity: "high") to the object form ({level: "high", confidence: 50}) before processing, whenseverityis present. - MUST auto-generate
indicator.idvalues for indicators that omitid. Whenattack.idis present, the format is{attack.id}-{NN}. Whenattack.idis absent, the format isindicator-{NN}.NNis the 1-based, zero-padded position of the indicator in theindicatorsarray. - MUST resolve
pattern.targetandsemantic.targetfrom the indicator-leveltargetwhen omitted on the pattern or semantic block. The indicator-leveltargetis always required (§6.1). - MUST expand pattern shorthand form (condition operator as direct key) to the standard form before evaluation.
Normalization
- MUST normalize single-phase form to multi-actor form internally (N-006): when
execution.stateis present (andexecution.phasesandexecution.actorsare absent), wrap it inactors: [{name: "default", mode: <execution.mode>, phases: [{name: "phase-1", state: <execution.state>}]}]. All subsequent processing operates on the normalizedactorsarray. - MUST normalize multi-phase form to multi-actor form internally (N-007): when
execution.phasesis present (andexecution.actorsis absent), wrap it inactors: [{name: "default", mode: <execution.mode>, phases: <execution.phases>}]. Whenexecution.modeis absent (the mode-less multi-phase form, where every phase declares its own mode),actor.modeis set fromphases[0].mode. All subsequent processing operates on the normalizedactorsarray.
Validation and output
- MUST skip event type validation for unrecognized modes. For recognized modes, tools SHOULD emit warnings when trigger event types are not listed in the binding’s Events section, and these warnings MUST NOT make the document non-conforming.
- Tools that emit OATF documents MUST emit
oatfas the first key and SHOULD emit the fully-expanded explicit form with all defaults materialized for maximum portability.
11.3 Tool Conformance: Adversarial
Section titled “11.3 Tool Conformance: Adversarial”A conforming adversarial tool:
Core requirements
- MUST parse valid OATF documents without error.
- MUST support at least one protocol binding.
- MUST execute phases in the declared order within each actor.
- MUST evaluate triggers and progress between phases accordingly.
- MUST support template interpolation for extractor values, including cross-actor references (
{{actor_name.extractor_name}}). - MUST ensure all server-role actors (modes ending in
_server) are accepting connections before any client-role actor (modes ending in_client) begins executing its first phase (readiness guarantee). - MUST evaluate binding-defined response-dispatch lists in order (first match wins):
responses,sampling_responses,elicitation_responses,task_responses, andtool_responses.
Recommended capabilities
- SHOULD support all four trigger types: event (
trigger.event), count (trigger.count), match (trigger.match), and time (trigger.after). - SHOULD support the full set of response-dispatch lists and binding-specific entry actions for the bindings the tool claims to implement.
- SHOULD execute each OATF document in an isolated protocol session to prevent state from one attack affecting subsequent attacks in a regression suite.
Optional capabilities
- MAY support
synthesizeblocks (reserved for a future version; see §F.5). Tools that supportsynthesizeMUST validate generated output against the protocol binding’s message structure before injection. Tools that do not supportsynthesizeSHOULD emit a warning when encounteringsynthesizeblocks. - MAY ignore indicators (the detection side of the document).
- MUST document which protocol bindings and features it supports.
11.4 Tool Conformance: Evaluation
Section titled “11.4 Tool Conformance: Evaluation”A conforming evaluation tool:
Core requirements
- MUST parse valid OATF documents without error.
- MUST reject documents without indicators with a clear error rather than silently producing a pass verdict.
- MUST support at least one protocol binding.
- MUST evaluate indicators against observed protocol traffic.
- MUST produce verdicts using the vocabulary defined in §9.
Detection methods
- MUST support the
patterndetection method. - SHOULD support the
expressiondetection method. - MAY support the
semanticdetection method. Tools that implementsemanticMUST document which inference engine is used (model name, version, and type) and MUST validate that providedexamples.positivestrings are classified as matches andexamples.negativestrings as non-matches under the configured threshold.
Optional capabilities
- MAY ignore the execution profile (the attack side of the document).
- MUST document which protocol bindings and detection methods it supports.
11.5 Partial Conformance
Section titled “11.5 Partial Conformance”A tool MAY implement a subset of OATF capabilities. A tool that supports only MCP indicators with pattern matching is a valid partial implementation. The tool MUST clearly document its supported scope.
When a tool encounters an OATF document containing features it does not support, the expected behavior depends on whether the feature is structural or semantic:
- Structural features (unrecognized protocol bindings, unrecognized modes): MUST be skipped without error. The tool SHOULD emit a warning identifying the unsupported feature. Documents using unrecognized modes are structurally valid, as the core document model is protocol-agnostic.
- Semantic features (known features that alter output, such as
synthesize): SHOULD emit a warning. Thesynthesizeblock is reserved for a future version; tools that do not support it SHOULD warn and fall back to static content when available.
This distinction ensures that tools fail loudly when they cannot produce correct results, but degrade gracefully when encountering extensions they were not designed to handle.