Will It Vibe logoWill It Vibe?
DOCKER-026Medium severity-8 points

sudo used inside the image build

Part of Security, which counts for 30% of the overall score. When this check fires it deducts 8 points from that category, once per scan, no matter how many places it turns up.

What it detects

sudo inside a container build is unnecessary (the build already runs as root) and, if it stays installed, gives a compromised non-root process an easy path back to root.

Why it matters

sudo inside a container build is unnecessary because the build already runs as root, and if sudo stays installed in the final image it hands a compromised non-root process an easy escalation path back to root.

How to fix it

Remove sudo from build commands; run the command directly since the build is already root. If a step must run as a specific user, use USER to switch rather than sudo. Do not install the sudo package unless a real runtime need exists.

The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing

Does your repo trip this check?

Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.

Scan your repo

Related Security checks