internal/skills/catalog/docker/SKILL.md
```skill # docker — Sandboxed Tool Testing and Isolation ## Category Sandboxing & Isolation ## License Apache 2.0 (Docker Engine / Moby) ## Source https://github.com/moby/moby (Moby / Docker Engine) ## Purpose Run transient, privilege-restricted containers that mirror the host OS environment. Used exclusively for pre-deployment sandbox verification of CLI tools before they are installed on the real host. Never used to run production workloads or agent operations themselves. ## Use Cases - V
npx skillsauth add ggp1/mitiga internal/skills/catalog/dockerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
# docker — Sandboxed Tool Testing and Isolation
## Category
Sandboxing & Isolation
## License
Apache 2.0 (Docker Engine / Moby)
## Source
https://github.com/moby/moby (Moby / Docker Engine)
## Purpose
Run transient, privilege-restricted containers that mirror the host OS environment.
Used exclusively for pre-deployment sandbox verification of CLI tools before they
are installed on the real host. Never used to run production workloads or agent
operations themselves.
## Use Cases
- Validate behaviour of a newly acquired or upgraded tool before host deployment
- Observe unexpected network calls, file writes, or process spawns in isolation
- Test tool invocations and confirm output format before integrating into agent code
- Reproduce potential supply-chain compromise behaviour safely
## Determining the Host OS Image
Before launching a sandbox, identify the exact OS and version to mirror:
```bash
# Read the host OS details
cat /etc/os-release
# Example output (Ubuntu 24.04):
# ID=ubuntu
# VERSION_ID="24.04"
# The matching Docker image tag is: ubuntu:24.04
All sandbox containers must be launched with the following minimum set of security restrictions. Deviate only with documented, system-manager-approved justification.
# Derive host UID/GID to avoid running as root inside the container
HOST_UID=$(id -u)
HOST_GID=$(id -g)
# Determine the matching host OS image tag (e.g. ubuntu:24.04)
HOST_IMAGE=$(. /etc/os-release && echo "${ID}:${VERSION_ID}")
docker run --rm \
--user "${HOST_UID}:${HOST_GID}" \
--security-opt no-new-privileges \
--cap-drop ALL \
--network none \
--read-only \
--tmpfs /tmp:rw,noexec,nosuid,size=64m \
--memory 512m \
--cpus 1 \
"${HOST_IMAGE}" \
<tool> <args>
| Flag | Rationale |
|---|---|
| --rm | Automatically remove the container on exit — no persistent state |
| --user HOST_UID:HOST_GID | Match host user to avoid UID 0 inside container |
| --security-opt no-new-privileges | Prevent privilege escalation via setuid/setgid binaries |
| --cap-drop ALL | Remove all Linux capabilities; add back only what is documented and required |
| --network none | Isolate from all networks by default; see note on network access below |
| --read-only | Mount root filesystem read-only to prevent unexpected writes |
| --tmpfs /tmp | Provide a small, non-executable writable scratch area if the tool requires it |
| --memory 512m | Prevent runaway memory consumption |
| --cpus 1 | Prevent CPU monopolisation |
Some tools (e.g. nmap, trivy DB fetch) need network access. If network access
is genuinely required for the sandbox test:
--network flags.--network none with the most restrictive option that still allows
the test (e.g. a dedicated bridge network with explicit DNS and egress rules).--network host in the sandbox — it defeats the isolation purpose.If a specific capability is needed (e.g. NET_RAW for raw socket tools):
--cap-add NET_RAW.--privileged — it removes all security boundaries.To test a locally compiled or downloaded binary without baking it into an image:
docker run --rm \
--user "${HOST_UID}:${HOST_GID}" \
--security-opt no-new-privileges \
--cap-drop ALL \
--network none \
--read-only \
--tmpfs /tmp:rw,noexec,nosuid,size=64m \
--mount type=bind,source=/path/to/tool,target=/usr/local/bin/tool,readonly \
--mount type=bind,source=/path/to/test/target,target=/scan-target,readonly \
"${HOST_IMAGE}" \
/usr/local/bin/tool <args> /scan-target
After running the sandbox test, confirm all of the following before deploying the tool to the host:
--network none not
producing unexpected errors, or by container network logs if network was enabled)./tmp (enforced by --read-only).--privileged. This flag bypasses all container security controls
and is equivalent to running code directly on the host.--network host. It exposes the host's network stack to the container.ubuntu:24.04,
debian:12) pulled from the Docker Official Images namespace. Verify the image
digest matches the upstream manifest before first use.--rm).
Do not commit containers to new images or share sandbox images.development
# who / w — Logged-in Users ## Category User & Group Management ## License GPLv3+ (GNU coreutils) / GPLv2 (procps-ng) ## Source Included in all Linux distributions. ## Purpose Show who is currently logged in and what they are doing. ## Use Cases - Detect unauthorized active sessions - Monitor interactive logins in real-time - Identify login sources (IP, terminal) - Review idle times for active sessions ## Examples ```bash # All login information who -a # Currently logged-in users with act
development
# useradd / usermod / userdel — User Account Management ## Category User & Group Management ## License BSD-3-Clause (shadow-utils) ## Source https://github.com/shadow-maint/shadow (included in all Linux distributions) ## Purpose Create, modify, and delete user accounts. ## Use Cases - Create service accounts for Mitiga components - Modify user group memberships - Disable or remove compromised accounts - Audit account configurations ## Examples ```bash # Create a system service account (no
development
# ufw — Uncomplicated Firewall ## Category System Hardening ## License GPLv3 ## Source https://code.launchpad.net/ufw (included in Ubuntu/Debian) ## Purpose Simplified interface for managing iptables/nftables rules. ## Use Cases - Quick firewall status checks - Rule modifications on systems using ufw - Block malicious sources during incident response ## Examples ```bash # Show firewall status and rules ufw status verbose # Block a malicious IP ufw deny from <malicious_ip> # Allow a speci
development
# trivy — Comprehensive Vulnerability Scanner ## Category Vulnerability Scanning ## License Apache 2.0 ## Source https://github.com/aquasecurity/trivy (CNCF project) ## Purpose Scan filesystems, container images, Git repositories, and IaC configurations for known vulnerabilities (CVEs), misconfigurations, and exposed secrets. ## Use Cases - Audit project dependencies for known CVEs - Scan configuration files for misconfigurations - Detect embedded secrets in repositories - Scan container im