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

Use npm ci for Reproducible Builds

Description

Detects Dockerfiles using `npm install` instead of `npm ci` for production builds.

What Shoulder detects

Dockerfile uses 'npm install' - consider 'npm ci' for reproducible builds.

How to fix

Use `npm ci` instead of `npm install` for reproducible builds.

```dockerfile
RUN npm ci
```

Learn more: https://shoulder.dev/learn/docker/cwe-1104/npm-ci

Applies to

Frameworks

docker nodejs

References

Scan for this issue

Detect with Shoulder CLI
npx @shoulderdev/cli trust --rule=docker-nodejs-npm-ci .

Related rules