Home

Containers

This page lists the safe and destructive patterns in the Docker and Kubernetes shell guard packs. See Shell Tool for how these patterns are evaluated.

Docker

Pack ID: containers.docker

Guards against destructive Docker operations

Destructive patterns

Rule IDReasonSuggestionConfidence
containers.docker.system_pruneRemoves all unused containers, networks, images, and optionally volumesUse docker container prune or docker image prune for targeted cleanupHigh
containers.docker.volume_prunePermanently deletes all unused volumes and their dataList volumes with docker volume ls and remove specific onesHigh
containers.docker.force_removeForce-removes running containers or in-use imagesStop containers first with docker stop, then removeMedium

Kubernetes

Pack ID: containers.kubectl

Guards against destructive Kubernetes operations

Destructive patterns

Rule IDReasonSuggestionConfidence
containers.kubectl.delete_namespaceDeletes all resources in the namespaceDelete specific resources within the namespace insteadHigh
containers.kubectl.delete_allMass-deletes resources across scopesDelete specific resources by nameHigh
containers.kubectl.drain_nodeEvicts all pods from a nodeUse kubectl drain --dry-run=client first to previewMedium

This documentation was generated from rust/agents/src/tool_guard/shell/packs/containers.rs.

© 2026 Stencila