Skip to content

fix: fall back after image transport init failure - #319

Open
Eljees wants to merge 1 commit into
goodwithtech:masterfrom
Eljees:agent/fix-digest-transport-fallback
Open

fix: fall back after image transport init failure#319
Eljees wants to merge 1 commit into
goodwithtech:masterfrom
Eljees:agent/fix-digest-transport-fallback

Conversation

@Eljees

@Eljees Eljees commented Jul 27, 2026

Copy link
Copy Markdown

Summary

  • continue through configured image transports when a source opens but cannot be initialized
  • close the failed source before attempting the next transport
  • add a regression test with a failing first registry and a valid fallback registry

Root cause

Dockle tries docker-daemon: before docker://. For a locally pulled image referenced by its registry manifest digest, the daemon source opens but image.FromSource rejects the locally reconstructed manifest. newSource returned that error immediately instead of trying the registry transport already present in the fallback list.

Testing

  • CGO_ENABLED=0 go test ./pkg/deckoder/extractor/... -count=1
  • CGO_ENABLED=0 go vet ./pkg/deckoder/extractor/...
  • reproduced with local alpine@sha256:5b10f432ef3da1b8d4c7eb6c487f2f5a8f096bc91145e68878dd4a5019afde11: current master fails with Manifest does not match provided manifest digest; this branch completes the scan

Fixes #262

Signed-off-by: Eljees <3.14hell@gmail.com>
@Eljees
Eljees force-pushed the agent/fix-digest-transport-fallback branch from feb95b7 to af97950 Compare July 29, 2026 18:57
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.

Dockle Error while scanning Images with its Manifest Digest

1 participant