Cortex CloudApplication Security
Docker From alias is not unique for multistage builds misconfiguration detected in code
Rule Details
Cortex AppSec Rule ID
APPSEC_DOCKER_11
Category - Subcategory
Compute - Startup Script Leaks
Provider
OTHER
Severity
LOW
Framework
DOCKER
Impact
This rule detects whether each FROM instruction in a Dockerfile uses a unique alias when building multistage images. Aliases help to identify stages, making Dockerfiles more readable and maintainable. Enforcing unique aliases ensures clarity, prevents conflicts and avoids any unintentional overwriting of stages.
How to Fix
To mitigate this issue, ensure that each FROM instruction in your multistage Dockerfile uses a unique alias.
Example: [source,go]
FROM node:14 as builder ...
FROM node:14 as builder # Duplicate alias
FROM node:14 as builder_2 # Unique alias ...
PreviousDocker WORKDIR values are not absolute paths misconfiguration detected in code
NextGCP Kubernetes Engine Clusters not using Container-Optimized OS for Node image misconfiguration dete
Last updated
Was this helpful?
