BETA Shoulder is in beta — Findings may sometimes be wrong. Your feedback shapes what we fix next. Share feedback

Docker apt-get Missing -y Flag

Description

Detects apt-get install commands without the -y flag for non-interactive builds.

What Shoulder detects

apt-get install without -y flag may hang waiting for input

How to fix

Add the -y flag for non-interactive installation.

```dockerfile
RUN apt-get install -y curl
```

Learn more: https://shoulder.dev/learn/docker/cwe-1395/apt-missing-y-flag

Applies to

Frameworks

docker

References

Scan for this issue

Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=docker-apt-missing-y-flag .

Related rules