InformationDo not store any secrets in Dockerfiles.
Dockerfiles could be backtracked easily by using native Docker commands such as docker history and various tools and utilities. Also, as ageneral practice, image publishers provide Dockerfiles to build the credibility for their images. Hence, the secrets within these Dockerfiles could be easily exposed and potentially be exploited.
NOTE: Nessus has provided the target output to assist in reviewing the benchmark to ensure target compliance.
SolutionDo not store any kind of secrets within Dockerfiles.
You would need to identify a way to handle secrets for your Docker images.
By default, there are no restrictions on storing config secrets in the Dockerfiles.