Skip to content

External images can have only one architecture - #160

Open
divolgin wants to merge 1 commit into
mainfrom
divolgin/404-is-not-error
Open

External images can have only one architecture#160
divolgin wants to merge 1 commit into
mainfrom
divolgin/404-is-not-error

Conversation

@divolgin

Copy link
Copy Markdown
Member

If an architecture is not found for an external image, simply ignore it and don't record it as an error.

@divolgin
divolgin marked this pull request as ready for review August 11, 2026 17:34
@divolgin
divolgin requested a review from a team as a code owner August 11, 2026 17:34
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown

Greptile Summary

The PR allows external images to complete SBOM collection when only one requested architecture is available. It adds Syft stderr classification for unsupported platforms and aggregates per-architecture outcomes before setting digest-level status.

  • Recognizes several unsupported-platform error messages as skippable.
  • Marks a digest successful when at least one architecture produces a usable SBOM.
  • Adds unit coverage for unsupported-platform and authentication-error classification.

Confidence Score: 4/5

The mixed-error classification should be fixed before merging because it can silently replace or discard genuine registry authentication failures.

Syft can report errors from multiple source providers together, but the new classifier skips the entire result whenever any unsupported-platform phrase appears, even when the same stderr contains a real 401 authentication failure.

Files Needing Attention: pkg/listener/update-external-image-sbom-status.go, pkg/listener/update-external-image-sbom-status_test.go

Important Files Changed

Filename Overview
pkg/listener/update-external-image-sbom-status.go Adds per-digest result aggregation and unsupported-platform classification, but the substring classifier can hide genuine errors included in Syft's combined stderr.
pkg/listener/update-external-image-sbom-status_test.go Adds focused classifier tests, including a mixed platform-mismatch and authentication-error fixture whose expected result demonstrates the misclassification.

Reviews (1): Last reviewed commit: "External images can have only one archit..." | Re-trigger Greptile

Comment on lines +579 to +584
"no child with platform",
}
for _, pattern := range patterns {
if strings.Contains(message, pattern) {
return nil, true
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Mixed Syft errors are skipped

When Syft reports a platform mismatch for one source and a genuine registry error such as 401 Unauthorized for another source in the same stderr output, this substring match classifies the entire result as an unsupported architecture. This replaces the authentication failure with a misleading no-supported-architecture failure, or discards it entirely when another architecture succeeds.

Knowledge Base Used: Build Queue and Vulnerability Scanning

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.

1 participant