TMAegis
docker 관련 규칙 더 보기

TMA-DOCKER-4.9

Ensure secrets are not stored in Dockerfiles

높음레벨 1수동 검토docker

설명

Do not store any secrets in Dockerfiles. Docker images are not opaque and contain information about the commands used to build them. As such secrets should not be included in Dockerfiles used to build images as they will be visible to any users of the image. Reported as a manual review item: the audit needs a site-specific judgement.

점검 방법

감사 방식: 수동 검토

이 권장 사항은 자동으로 점검할 수 없습니다. --include-manual 옵션을 전달하면 스캔 결과에 이 지침과 함께 표시됩니다.

Run the below command to get the list of images: docker images Run the below command for each image in the list above, and look for any secrets: docker history <IMAGE ID> Alternatively, if you have access to Dockerfile for the image, verify that there are no secrets as described above.

조치 방법

조치 방식: 가이드 또는 인프라 패치

Do not store any kind of secrets within Dockerfiles. Where secrets are required during the build process, make use of a secrets management tool, such as the buildkit builder included with Docker.

속성

운영 체제
모두
태그
dockermanual
참고 자료
CIS Docker Benchmark v1.9.0 - 4.9 Ensure secrets are not stored in Dockerfiles