devcontainers / devcontainers/cli

Dependency confusion attack from looking for manifest in docker.io first

Đang mở
#811 2 bình luận 0 reaction 1 người được giao Được @chrmarti nhận Xem trên GitHub
info-needed
Ngôn ngữ chính
TypeScript
Star
3k
Fork
457
Merge trung bình
13 giờ 17 phút
Pull request đã merge (30 ngày)
6

Mô tả

[This block of code](https://github.com/devcontainers/cli/blob/c1c8b08263c6dca7cd79c97a2d0bc581fcef4f6c/src/spec-node/utils.ts#L309-L313) assumes that any image name with only one slash in it cannot possibly be a fully qualified image name, and therefore prepends `docker.io/` to the name.

Thus, if I specify a Dockerfile with
```
FROM artefact.example.com/my_image:1.2.3
```
then this CLI first looks for a manifest at `docker.io/artefact.example.com/my_image:1.2.3`.

This concerns me. It feels like an invitation to a dependency confusion attack. Someone could create an "artefact.example.com" organization on docker.io, publish a malicious image named "my_image:1.2.3", and this CLI would pull that instead of what I specified.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.