Cortex CloudApplication Security
Docker APT is used misconfiguration detected in code
Docker APT is used misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC_DOCKER_9
Category - Subcategory
Public Exposure - Encryption And Protocols
Provider
OTHER
Severity
LOW
Framework
DOCKER
Impact
This rule detects whether the apt`` (Advanced Package Tool) command is used within Dockerfile RUN instructions. We recommend that you do not run the apt`` command within Dockerfiles, due to potential instability and security vulnerabilities.
How to Fix
Replace apt`` with apt-get`` for package management within Dockerfile RUN commands.
In the example below, apt is replaced with apt-get to ensures a more reliable and secure package installation process.
Bad example
[source,go]
RUN apt update && apt install -y nginx
Good example
RUN apt-get update && apt-get install -y nginx
PreviousLast USER is root misconfiguration detected in code
NextDocker WORKDIR values are not absolute paths misconfiguration detected in code
Last updated
Was this helpful?
