Skip to content

vendor: bump github.com/anchore/syft from 0.98.0 to 0.105.0#94

Merged
crazy-max merged 2 commits intodocker:masterfrom
crazy-max:bump-syft
Feb 15, 2024
Merged

vendor: bump github.com/anchore/syft from 0.98.0 to 0.105.0#94
crazy-max merged 2 commits intodocker:masterfrom
crazy-max:bump-syft

Conversation

@crazy-max
Copy link
Copy Markdown
Member

Dependabot can't bump to 0.101.0 because of a breaking change with the cataloger related to anchore/syft#1383:

updater | 2024/02/13 02:29:49 INFO <job_786326499> Handled error whilst updating github.com/anchore/syft: dependency_file_not_resolvable {:message=>"github.com/anchore/syft/syft/pkg/cataloger: no required module provides package github.com/anchore/syft/syft/pkg/cataloger; to add it:"}

@crazy-max
Copy link
Copy Markdown
Member Author

crazy-max commented Feb 13, 2024

Current (0.98.0) and latest syft version still fails with amazonlinux image: https://github.com/docker/buildkit-syft-scanner/actions/runs/7883917948/job/21511817145?pr=94#step:7:75

> [linux/amd64] generating sbom using localhost:5000/buildkit-syft-scanner:latest:
0.074 time="2024-02-13T08:52:15Z" level=info msg="starting syft scanner for buildkit abb0e9e"
0.474 panic: unable to get file resolver: unable to create directory resolver: unable to index filesystem path="/run/src/extras/sbom-base/dev/fd/2": unable to index branch="/run/src/extras/sbom-base/dev/fd/2": lstat /proc/1/fd/pipe:[33575]: no such file or directory
0.474 
0.474 goroutine 1 [running]:
0.474 main.main()
0.474 	github.com/docker/buildkit-syft-scanner/cmd/syft-scanner/main.go:51 +0x145

# See the License for the specific language governing permissions and
# limitations under the License.

FROM amazonlinux:2 AS base
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Syft v0.105.0 should account for the scanning issues you're having here 👍

Comment thread internal/target.go Outdated
result.Artifacts.LinuxDistribution = theDistro
result.Relationships = relationships

result, err := syft.CreateSBOM(context.Background(), src, syft.DefaultCreateSBOMConfig())
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It looks like earlier the image catalogers were being used regardless of the input source type. To replicate the same behavior you can add that ask to the CreateSBOMConfig:

cfg := syft.DefaultCreateSBOMConfig().
		WithCatalogerSelection(
			pkgcataloging.NewSelectionRequest().
				WithDefaults(pkgcataloging.ImageTag),
		)

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max changed the title vendor: bump github.com/anchore/syft from 0.98.0 to 0.104.0 vendor: bump github.com/anchore/syft from 0.98.0 to 0.105.0 Feb 14, 2024
@crazy-max crazy-max requested a review from cdupuis February 15, 2024 07:00
@crazy-max crazy-max marked this pull request as ready for review February 15, 2024 07:00
@crazy-max crazy-max requested a review from jedevc as a code owner February 15, 2024 07:00
@crazy-max crazy-max merged commit 7867d73 into docker:master Feb 15, 2024
@crazy-max crazy-max deleted the bump-syft branch February 15, 2024 09:35
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