dcg

MinIO

storage.minio

Protects against destructive MinIO Client (mc) operations like bucket removal, object deletion, and admin operations.

  • 6blocking rules
  • 14safe patterns
  • 2Critical
  • 3High
  • 1Medium
~/.config/dcg/config.toml
[packs]
enabled = ["storage.minio"]

Evaluated when a command contains mc.

Blocking rules

Each rule ID is storage.minio:<name>. Use it in allowlists and [policy.rules].

  1. mc-admin-bucket-delete

    Critical

    mc admin bucket delete removes a bucket via admin API.

    Explanation
    The admin bucket delete command bypasses normal bucket deletion restrictions. This can remove buckets that are protected or non-empty. The operation is immediate and cannot be undone. Safer alternatives: - mc admin info: Review cluster configuration - mc ls: Verify bucket contents first - Use standard mc rb for safer deletion
  2. mc-rb

    Critical

    mc rb removes a MinIO bucket.

    Explanation
    Removing a MinIO bucket deletes the bucket and all objects within it. With --force, objects are deleted without confirmation. Applications referencing this bucket will fail immediately. Safer alternatives: - mc ls: List bucket contents first - mc cp --recursive: Backup to another location - Enable versioning or object locking before testing
  3. mc-admin-user-remove

    High

    mc admin user remove/disable affects user access.

    Explanation
    Removing or disabling a MinIO user revokes their access to all buckets and policies. Applications using this user's credentials will fail to authenticate. Service accounts created by this user may also be affected. Safer alternatives: - mc admin user info: Review user permissions first - mc admin user disable: Disable instead of remove - Rotate credentials before removing user
  4. mc-mirror-remove

    High

    mc mirror --remove deletes destination objects not in source.

    Explanation
    The --remove flag deletes objects from the destination that don't exist in the source. If source and destination are swapped, or source is empty, this can result in complete data loss at the destination. Safer alternatives: - mc diff: Preview differences before mirroring - mc mirror without --remove: Only adds/updates - Backup destination before mirroring
  5. mc-rm

    High

    mc rm deletes objects from MinIO.

    Explanation
    Deleting MinIO objects permanently removes data unless versioning is enabled. With --recursive, entire directory trees are deleted. With --force, no confirmation is requested. Safer alternatives: - mc ls: Preview files to be deleted - mc cp: Backup objects before deletion - Enable bucket versioning for recovery
  6. mc-admin-policy-remove

    Medium

    mc admin policy remove/unset modifies access policies.

    Explanation
    Removing or unsetting a policy affects all users and groups assigned to it. Users may unexpectedly lose access to buckets they need. Policy changes take effect immediately. Safer alternatives: - mc admin policy info: Review policy details - mc admin user list: Check who uses this policy - Create replacement policy before removing old one

Safe patterns

Checked first. A command that matches one is never blocked by this pack.

  • mc-ls
  • mc-cat
  • mc-head
  • mc-stat
  • mc-cp
  • mc-diff
  • mc-find
  • mc-du
  • mc-version
  • mc-help
  • mc-admin-info
  • mc-admin-user-list
  • mc-admin-policy-list
  • mc-alias-list