Skip to main content
See: /MRS-Specification-RFC#17-security-considerations

Input Validation

Parsers MUST validate:
LimitRecommended
Maximum document size100 MB
Maximum nesting depth100 levels
Maximum events per measure10,000
Maximum spans100,000
Maximum measures100,000

Denial of Service Protection

Implementations SHOULD protect against:
  • Deeply nested structures: Limit recursion depth
  • Very large measure numbers: Validate integer bounds
  • Excessive span counts: Limit span storage
  • Malformed UTF-8: Validate string encoding
  • Circular references: Detect reference cycles

Information Disclosure

Working Set Envelopes may expose:
DataRisk
Source document hashReveals document identity
Creator/modifier identityReveals authorship
Agent namesReveals workflow
Transaction historyReveals edit patterns

Mitigation

Implementations SHOULD:
  • Allow redaction of sensitive metadata
  • Support anonymous agent identifiers
  • Provide hash salting options
  • Enable audit log access controls

Operation Safety

UUID Validation

Orchestrators MUST validate:
  • UUIDs are well-formed UUIDv7
  • Referenced UUIDs exist (or are valid tmp-ids)
  • No UUID collisions in minting

Scope Enforcement

Orchestrators MUST enforce:
  • Operations within granted scope
  • Operations within granted lanes
  • No unauthorized measure access

Transaction Integrity

Orchestrators MUST ensure:
  • Atomic application (all-or-nothing or explicit partial)
  • Rollback capability
  • Audit trail integrity

Agent Isolation

When running untrusted agents:
ProtectionDescription
Scope limitingGrant minimal scope
Lane restrictionGrant minimal lanes
Operation filteringAllow only needed op types
Output validationValidate all ops before apply

Best Practices

For Orchestrator Implementers

  1. Validate all input before processing
  2. Enforce resource limits
  3. Log security-relevant events
  4. Support authentication/authorization
  5. Enable audit trail

For Agent Implementers

  1. Respect granted permissions
  2. Don’t attempt out-of-scope access
  3. Handle rejection gracefully
  4. Don’t store sensitive data unnecessarily