Skip to content

Add Docker archive support to Linux scanner#1711

Merged
jasonpaulos merged 2 commits intomainfrom
users/jasonpaulos/linux-docker-archive-support
Mar 11, 2026
Merged

Add Docker archive support to Linux scanner#1711
jasonpaulos merged 2 commits intomainfrom
users/jasonpaulos/linux-docker-archive-support

Conversation

@jasonpaulos
Copy link
Member

Adds support for scanning Docker archive images (tarballs created by docker save) in the Linux container detector. Builds on #1708

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for scanning Docker archive images (tarballs produced by docker save) in the Linux container detector by recognizing a new docker-archive: image reference prefix and routing it through the existing “local image” scanning flow.

Changes:

  • Add ImageReferenceKind.DockerArchive and parse docker-archive: inputs in ImageReference.Parse.
  • Treat Docker archives as local image inputs in LinuxContainerDetector and invoke Syft with a docker-archive: source.
  • Add detector documentation and a unit test covering Docker archive scanning.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
test/Microsoft.ComponentDetection.Detectors.Tests/LinuxContainerDetectorTests.cs Adds a unit test verifying Docker archive inputs are scanned and mapped into recorded components.
src/Microsoft.ComponentDetection.Detectors/linux/LinuxContainerDetector.cs Routes DockerArchive through local-image validation and constructs the Syft source string for docker-archive scanning.
src/Microsoft.ComponentDetection.Detectors/linux/ImageReference.cs Introduces DockerArchive kind and parses the docker-archive: prefix.
docs/detectors/linux.md Documents docker-archive: usage under supported input formats.

@github-actions
Copy link

github-actions bot commented Mar 11, 2026

👋 Hi! It looks like you modified some files in the Detectors folder.
You may need to bump the detector versions if any of the following scenarios apply:

  • The detector detects more or fewer components than before
  • The detector generates different parent/child graph relationships than before
  • The detector generates different devDependencies values than before

If none of the above scenarios apply, feel free to ignore this comment 🙂

@jasonpaulos jasonpaulos merged commit d6c5db9 into main Mar 11, 2026
24 of 26 checks passed
@jasonpaulos jasonpaulos deleted the users/jasonpaulos/linux-docker-archive-support branch March 11, 2026 21:53
@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.0%. Comparing base (e0ed239) to head (d652cc0).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #1711   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants