Docker scout is misreading base image version number
@mikeparker đang làm issue này rồi.
Từ ngày 10/1/2024.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
I just started looking into docker scout and ran it over one of my Golang based images and found an issue that could be blocking if run in a CI/CD pipeline.
it can be reproduced with this dockerfile
FROM golang:1.21-alpine
WORKDIR /app
RUN echo foo > bar.txt
ENTRYPOINT [ "sh", "cat", "/app/bar.txt" ]
As of today (2024-01-09) 1.21-alpine is the latest tag, this is important.
Then use the following command to build an image:
docker build --pull --force-rm -t test_scout:latest .
And finally run docker scout to check for any vulnerability with its various options:
First, out of precaution, clear docker scout's cache with docker scout cache prune --sboms
$ docker scout cache prune --sboms
? Are you sure you want to delete all temporary data and all cached SBOMs? Yes
✓ Temporary data deleted
✓ Cached SBOMs deleted
Then docker scout quickview test_scout:latest gives:
$ docker scout quickview test_scout:latest
✓ Image stored for indexing
✓ Indexed 41 packages
Target │ test_scout:latest │ 0C 0H 0M 0L
digest │ ae018a575642 │
Base image │ golang:1-alpine │ 0C 0H 0M 0L
Updated base image │ golang:1.20-alpine │ 0C 0H 0M 0L
│ │
What's Next?
View base image update recommendations → docker scout recommendations test_scout:latest
Include policy results in your quickview by supplying an organization → docker scout quickview test_scout:latest --org <organization>
And docker scout recommendations test_scout:latest gives:
$ docker scout recommendations test_scout:latest
✓ SBOM of image already cached, 41 packages indexed
Target │ test_scout:latest
digest │ ae018a575642
## Recommended fixes
Base image is golang:1-alpine
Name │ 1-alpine
Digest │ sha256:c56d095992c4857b6cf532808dc847d50d24fe0fc7be1cdc0beacc7ad3da9f1b
Vulnerabilities │ 0C 0H 0M 0L
Pushed │ 2 weeks ago
Size │ 68 MB
Packages │ 41
Flavor │ alpine
OS │ 3.19
│ The base image is also available under the supported tag(s) 1-alpine3.19 , 1.21-alpine , 1.21-alpine3.19 , 1.21.5-alpine , 1.21.5-alpine3.19 , alpine , alpine3.19
.
│ If you want to display recommendations specifically for a different tag, please re-run the command using the --tag flag.
Refresh base image
Rebuild the image using a newer base image version. Updating this may result in breaking changes.
✓ This image version is up to date.
Change base image
The list displays new recommended tags in descending order, where the top results are rated as most suitable.
Tag │ Details │ Pushed │ Vulnerabilities
───────────────────────────────┼──────────────────────────────────────────────────────────────────────┼─────────────┼──────────────────────────────
1.20-alpine │ Benefits: │ 1 month ago │ 0C 0H 0M 0L
Minor runtime version update │ • Same OS detected │ │
Also known as: │ • Minor runtime version update │ │
• 1.20.12-alpine │ • Image has same number of vulnerabilities │ │
• 1.20.12-alpine3.19 │ • Image contains similar number of packages │ │
• 1.20-alpine3.19 │ • 1.20-alpine is the third most popular tag with 11K pulls per month │ │
│ │ │
│ Image details: │ │
│ • Size: 100 MB │ │
│ • Flavor: alpine │ │
│ • OS: 3.19 │ │
│ • Runtime: 1.20.12 │ │
│ │ │
│ │ │
│ │ │
From what I read here (or maybe I misinterpreting the result), docker scout seems to suggest I should 'change' my base image to 1.20-alpine which is older than the 1.21-alpine I use. To me this could create false positives in CI/CD contexts and exceptions to document when we are dealing with customers requesting image audits.
- Ngôn ngữ chính
- Shell
- Star
- 454
- Fork
- 134
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của docker/scout-cli
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
-
GO-2026-5932: golang.org/x/crypto reported vulnerable at module level, ignoring import scoping Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
allstar
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
-
panic: nil deref in createVCS() scanning multi-arch image by tag when no attestation sidecar exists Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 64/100
Tất cả issue của docker/scout-cli
Issue tương tự
-
align on terminology Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CycloneDX/transparency-exchange-api#393 · 1 bình luận ·
-
module/agent platform/macos type/bug/regression
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
CachyOS/cachyos-aur-derived#754 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
CrowdStrike/falcon-scripts#528 ·
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100