{
 "product": "Black Box flight recorder",
 "slug": "black-box",
 "base": "https://cainstudio.online",
 "page": "https://cainstudio.online/top25-black-box.html",
 "claims": [
  {
   "id": "C01",
   "kind": "control",
   "claim": "Record, seal, verify -> A sealed recording verifies.",
   "requests": [
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings",
     "body": {
      "agent": "lab-agent",
      "title": "attack lab"
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/events",
     "body": {
      "name": "tool.call",
      "attributes": {
       "tool": "refund"
      },
      "payload": {
       "order": 1182
      }
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/seal",
     "body": {}
    },
    {
     "method": "GET",
     "url": "/recorder-keystone/recordings/${0.id}/verify"
    }
   ],
   "path": "valid",
   "expect": [
    true
   ]
  },
  {
   "id": "C02",
   "kind": "attack",
   "claim": "Edit an event after sealing -> Changing one event changes its hash and the root.",
   "requests": [
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings",
     "body": {
      "agent": "lab-agent",
      "title": "attack lab"
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/events",
     "body": {
      "name": "tool.call",
      "attributes": {
       "tool": "refund"
      },
      "payload": {
       "order": 1182
      }
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/seal",
     "body": {}
    },
    {
     "method": "GET",
     "url": "/recorder-keystone/recordings/${0.id}"
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/verify",
     "body": {
      "recording": "${3..}"
     },
     "set": {
      "recording.events.0.name": "tool.read"
     }
    }
   ],
   "path": "valid",
   "expect": [
    false
   ]
  },
  {
   "id": "C03",
   "kind": "attack",
   "claim": "Drop an event after sealing -> Truncation is detected.",
   "requests": [
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings",
     "body": {
      "agent": "lab-agent",
      "title": "attack lab"
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/events",
     "body": {
      "name": "tool.call",
      "attributes": {
       "tool": "refund"
      },
      "payload": {
       "order": 1182
      }
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/events",
     "body": {
      "name": "tool.call",
      "attributes": {
       "tool": "refund"
      },
      "payload": {
       "order": 1182
      }
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/seal",
     "body": {}
    },
    {
     "method": "GET",
     "url": "/recorder-keystone/recordings/${0.id}"
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/verify",
     "body": {
      "recording": "${4..}"
     },
     "set": {
      "recording.events": [
       "${4.events.0}"
      ]
     }
    }
   ],
   "path": "valid",
   "expect": [
    false
   ]
  },
  {
   "id": "C04",
   "kind": "attack",
   "claim": "Add an event after sealing -> A sealed recording accepts nothing more.",
   "requests": [
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings",
     "body": {
      "agent": "lab-agent",
      "title": "attack lab"
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/events",
     "body": {
      "name": "tool.call",
      "attributes": {
       "tool": "refund"
      },
      "payload": {
       "order": 1182
      }
     }
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/seal",
     "body": {}
    },
    {
     "method": "POST",
     "url": "/recorder-keystone/recordings/${0.id}/events",
     "body": {
      "name": "late.event",
      "attributes": {}
     }
    }
   ],
   "path": "",
   "expect": [],
   "expect_status": [
    400,
    409,
    423
   ]
  },
  {
   "id": "C05",
   "kind": "attack",
   "claim": "Inclusion proof against a made-up root -> A proof must lead to the root it claims.",
   "requests": [
    {
     "method": "POST",
     "url": "/recorder-keystone/verify-inclusion",
     "body": {
      "event_hash": "0000000000000000000000000000000000000000000000000000000000000000",
      "index": 0,
      "tree_size": 1,
      "audit_path": [],
      "merkle_root": "1111111111111111111111111111111111111111111111111111111111111111"
     }
    }
   ],
   "path": "included",
   "expect": [
    false
   ]
  }
 ]
}