pip install Without --no-cache-dir
lowDetects pip install without --no-cache-dir flag, which leaves pip cache in the image adding 50-200 MB depending on dependencies.
Detects pip install without --no-cache-dir flag, which leaves pip cache in the image adding 50-200 MB depending on dependencies.
Experiment with the vulnerable code and security rule below. Edit the code to see how the rule detects different vulnerability patterns.
pathfinder scan --rule cpf/pip-without-no-cacheExplore related security rules for Docker
Detects RUN instructions using Alpine Linux's apk add command without the --no-cache flag, which unnecessarily increases Docker image size by 2-5 MB.
Detects VOLUME instructions that mount the Docker socket, giving a container full control over the host's Docker daemon, equivalent to unrestricted root access.
Detects usage of the deprecated MAINTAINER instruction, which has been deprecated since Docker 1.13 in favor of LABEL instructions with standardized OCI metadata keys.
Common questions about pip install Without --no-cache-dir
Use Code Pathfinder to scan your Docker codebase and automatically detect instances of this vulnerability pattern. Install Code Pathfinder and run the following command in your project directory:
pathfinder scan --rule cpf/pip-without-no-cacheThis rule is aligned with industry-standard security frameworks and classifications: