When to use
- The user suspects leaked B2 credentials, unauthorized bucket access, public exposure, ransomware, accidental deletion, or unexpected egress.
- The user asks to contain a B2 incident before doing cleanup or restore work.
- The user needs an evidence-preserving incident checklist using the MCP tool surface.
Byte path
- Object data MUST move directly between the client or workload runner and B2 using presigned URLs, multipart upload URLs, or an external B2/S3 client.
- MUST NOT route object data through the model or MCP server. Incident work uses metadata, key inventory, bucket policy state, version listings, retention state, and aggregate report data.
- Do not print sensitive object contents, key secrets, presigned URLs, access tokens, or customer data into chat. Preserve evidence with metadata summaries and external logs.
Safety gates
- Pause and ask for explicit confirmation before deleting or disabling access with
b2_delete_key; confirm the impacted workload and fallback credential. - Pause and ask for explicit confirmation before using
b2_update_bucket; confirm whether the action changes public access, Object Lock, lifecycle, replication, or notification behavior. - Pause and ask for explicit confirmation before using
b2_update_file_retentionorb2_update_file_legal_hold; containment should not accidentally weaken immutability. - Pause and ask for explicit confirmation before using
s3_delete_object,s3_delete_objects, or write-capables3_get_presigned_url. Preserve evidence before cleanup.
Tools used
b2_list_bucketsb2_list_keysb2_delete_keyb2_update_bucketb2_update_file_retentionb2_update_file_legal_holdb2_get_bucket_notification_rulesb2_rank_egress_leadersb2_report_usage_growths3_list_objects_v2s3_list_object_versionss3_head_objects3_get_presigned_urls3_delete_objects3_delete_objects
Playbook
- Start with containment scope: suspected credential, bucket, prefix, time window, affected application, and whether production access must remain available.
- Inventory buckets and keys with bounded complete-enough evidence. Call
b2_list_bucketswithlimit: 1000, filter by bucket name/type when the account may exceed that cap, and treat anytruncatedresponse or unreviewedtotal_bucket_countremainder as incomplete evidence. Pageb2_list_keyswithmaxKeyCount: 100, persistnextApplicationKeyIdcursors in the incident record, continue until no cursor remains or the approved investigation bound is reached, and treat any remaining cursor as incomplete evidence. Identify public buckets, broad keys, non-expiring keys, and keys with write/delete capability only from the reviewed inventory. - Inspect evidence without reading object bodies: use
b2_rank_egress_leaders,b2_report_usage_growth,s3_list_objects_v2,s3_list_object_versions,s3_head_object, and notification rules fromb2_get_bucket_notification_rules. Use listing pages of at most 1,000 keys or versions, persist continuation tokens in the incident record, and show at most 50 sampled rows in chat. - Prioritize non-destructive containment: remove leaked credentials from workloads, rotate outside the model into a trusted secret sink, tighten application config, and preserve logs.
- For emergency key deletion, require confirmation of key ID, owner, blast radius, replacement credential, and rollback. Then use
b2_delete_key. - For bucket changes, require confirmation of exact target, current state, intended new state, and evidence impact before
b2_update_bucket. For per-file Object Lock changes, first obtain current retention and legal-hold state through an external trusted B2 metadata lookup becauses3_head_objectdoes not expose those fields; do not callb2_update_file_retentionorb2_update_file_legal_holduntil that evidence is recorded and the user confirms the exact target, current state, intended new state, and evidence impact. - Defer cleanup deletes until after evidence capture and restore planning. Use
s3_delete_objectors3_delete_objectsonly after a separate destructive confirmation, withs3_delete_objectsbatches of 1,000 objects or fewer and a checkpointed target manifest. - Close with an incident record: timeline, suspected entry point, affected buckets and prefixes, containment completed, destructive actions taken or skipped, restore path, and follow-up hardening.