FROM instructions in Dockerfiles must not include the --platform flag. Overriding the target platform in the Dockerfile can cause builds to pull different, potentially unvetted or incompatible image variants, undermining image provenance, scanning, and supply-chain controls.
This rule checks FROM instructions and flags any use of the --platform flag. FROM lines should reference the intended image and tag without the --platform option. If a specific architecture is required, configure the build environment or manifest resolution outside the Dockerfile instead of embedding --platform in the instruction.