anchore / anchore/syft

SBOM generation failure when .tar.gz is part of the file name of a JSON

Open
#4,582 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
9.6k
Forks
962
Avg merge
23h 27m
Merged PRs (30d)
48

Description

What happened:
If a JSON file contains .tar.gz in its file name, we are seeing an error of unable to unarchive while generating the SBOM. But this used to not happen in versions 1.36.0 and below. Was this a bug before and fixed in the newer versions or is it a bug introduced in newer versions?

Steps to reproduce the issue:
Create a sample json file and name it something like sample.tar.gz_hashed.json and try generating the SBOM. 1.36.0 will successfully generate the SBOM and 1.38.0 and above will fail with an error

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with a file named sample.tar.gz_hashed.json and compare SBOM generation on versions 1.36.0 and 1.38.0 or later. The issue names no source files or tests, so trace the reported "unable to unarchive" path and identify why the filename is treated differently. Done means the newer version generates the SBOM successfully without breaking archive handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.