3701 Commits
Author SHA1 Message Date
anchore-oss-update-botandanchore-oss-update-bot 1a72047fd4 chore(deps): update anchore dependencies (#5535)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
v1.57.2
2026-11-16 19:32:58 +00:00
Tore Martin HagenandClaude Opus 5.5 d20e261f91 fix(python): find license files under .dist-info/licenses (PEP 639) (#5496)
* fix(python): find license files under .dist-info/licenses (PEP 639)

PEP 639 (Metadata-Version 2.4) places license files in a licenses/
subdirectory of .dist-info. When a package declares no License or
License-Expression, the RECORD fallback only considered files directly
in .dist-info, so these packages were reported with no license.

Accept RECORD entries anywhere under .dist-info/licenses/ as license
file candidates as well.

See #4292

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tore Martin Hagen <tore@kosli.com>

* fix(python): resolve every declared License-File, including under licenses/

License-File may appear several times, but it was parsed as a single
value, so only the last entry was kept. Its path was also joined to the
metadata directory only, while PEP 639 (Metadata-Version 2.4) makes it
relative to .dist-info/licenses/. Packages without a RECORD entry for the
file therefore got no license.

Keep every License-File entry, and look each one up in the metadata
directory and then under licenses/. Entries whose names don't look like
license files (e.g. AUTHORS) are skipped, as the RECORD fallback already
does, so they don't show up as unidentified licenses.

Also cover isDistInfoLicenseCandidate with a table test, and use real
hashes in the PEP 639 fixture's RECORD.

See #4292

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Tore Martin Hagen <tore@kosli.com>

---------

Signed-off-by: Tore Martin Hagen <tore@kosli.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-16 13:44:55 -05:00
26andClaude 29ac385f49 fix(binary): detect julia on linux/arm64, ppc64le and 1.9.0 betas (#5494)
* fix(binary): name ppc64 snippets in the snippet tool

getPlatformElf had no case for EM_PPC64, so write-snippet put ppc64le
snippets in a linux-unknown-... directory. Map EM_PPC64 to ppc64le, or to
ppc64 for big-endian files, so the julia ppc64le snippets in the next
commit get the right platform name.

Refs #5061

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: 26wv <202799601+26wv@users.noreply.github.com>

* fix(binary): detect julia on linux/arm64, ppc64le and 1.9.0 betas

The julia classifier found no package in the official julia images for
linux/arm64 and linux/ppc64le, or for 1.9.0-beta2/beta3.

In libjulia-internal.so the version string sits between other read-only
strings. On arm64 and ppc64le those strings are separated by runs of NULs
rather than a single NUL (e.g. `1.11.6\0\0branch\0\0` on ppc64le), and in
1.9.0-beta2/beta3 the version comes right before `__init__`. The julia
patterns expected single NULs and fixed neighbours, so none matched.

Replace the first two patterns with one that anchors only on the token
after the version (`branch`, `verify_methods` or `__init__`) and accepts
one or more NULs before it. Its major version is a single digit because on
ppc64le 1.9.0-beta3 a run of ASCII '0's precedes the version, which a
`[0-9]+` major would swallow.

Let the 1.9.0-alpha1 and 1.8.5 patterns accept NUL runs after the version.
On arm64 the 1.9.0-alpha1 version is not next to a NUL-delimited
`verify_methods` and another string sits before `BigInt`, so that pattern
now anchors on the NUL before the version and allows one string before
`BigInt`.

In the older julia classifier, which finds libjulia.so through the julia
executable, let the `julia version` pattern accept NUL runs too and add the
same BigInt pattern, so 1.0-1.5 are detected on arm64 and ppc64le. That
classifier only runs against full binaries, so these cases were checked by
scanning the official images rather than with new test cases.

Add config.yaml entries (per-platform digests) and tool-generated snippets
for 1.12.4 arm64, 1.11.6 ppc64le, 1.10.4 arm64, 1.9.0-beta2/beta3 amd64,
1.9.0-beta3 ppc64le, 1.8.5 arm64 and 1.9.0-alpha1 arm64, plus test cases
for them and for the existing 1.13.0-beta3 amd64 snippet, which only the
removed `branch` pattern matched.

Fixes #5061

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: 26wv <202799601+26wv@users.noreply.github.com>
2026-11-16 10:24:39 -05:00
anchore-oss-update-botandanchore-oss-update-bot 63ab0acead chore(deps): update tool versions (#5585)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
2026-11-16 10:22:24 +00:00
sarankumar e543a0007a Fix Bun binary version picked from embedded historical text (#5558)
The bun-binary classifier's first pattern accepted an optional "v", so in
compiled executables that embed text such as "bun 1.0.0 to 1.3.9" before
the runtime banner it reported the old version. Match the "Bun v1.2.3"
banner first, then "bun-1.2.3", and keep "bun 1.2.3" as the last fallback.

Fixes #5553

Signed-off-by: sarankumar1325 <120080287+sarankumar1325@users.noreply.github.com>
2026-11-14 05:48:25 -05:00
dependabot[bot] 8cb6f6aeb6 chore(deps): bump go.opentelemetry.io/otel/sdk from 1.46.0 to 1.47.0 (#5575)
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.46.0 to 1.47.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.46.0...v1.47.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-version: 1.47.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-14 04:05:30 +00:00
Dennys Kaluzny Pereiraandprotonnegativo 8db56e6800 fix(python): keep single-character names in requirements.txt (#5469)
namePattern required at least two characters, so a pinned line like
"q==2.7" (the format pip freeze writes) didn't match and the package was
dropped from the SBOM. PEP 508 allows one-character names (q, a, j and
others exist on PyPI).

Signed-off-by: protonnegativo <protonnegativo@users.noreply.github.com>
Co-authored-by: protonnegativo <protonnegativo@users.noreply.github.com>
2026-11-13 21:50:16 +00:00
Caleb AllenandWill Murphy 1c76975600 fix: skip Linux release identification if there is nothing to parse (#5482)
* fix: skip Linux release identification if there is nothing to parse

Signed-off-by: Caleb Allen <caleb.allen@upwind.io>

* test: skip parsing os release on catalogers with no glob matches

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

---------

Signed-off-by: Caleb Allen <caleb.allen@upwind.io>
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
Co-authored-by: Will Murphy <willmurphyscode@users.noreply.github.com>
2026-11-13 21:32:06 +00:00
Rudra ed7c7059c5 fix(binary): do not report libavcodec API versions as ffmpeg versions (#5552)
The ffmpeg-library classifier fell back to the Lavc/Lavf idents when a library had no "FFmpeg version" string. Those idents carry the libavcodec/libavformat API version, not the FFmpeg release, which produced versions such as ffmpeg@62.28.102 with a matching ffmpeg CPE. Only use the FFmpeg release string, as the libswresample classifier already does.

Fixes #5548

Signed-off-by: Rudra184 <bhattrudra235@gmail.com>
2026-11-13 16:12:05 -05:00
Caleb Allen 259a540211 fix: use pointer receiver for FileResolver to enable reuse (#5483)
Signed-off-by: Caleb Allen <caleb.allen@upwind.io>
2026-11-13 20:52:02 +00:00
WleeafandWleeaf a90bb39f87 fix(python): sort uv.lock extras by name so the SBOM output is stable (#5468)
Signed-off-by: Wleeaf <179125857+wleeaf@users.noreply.github.com>
Co-authored-by: Wleeaf <179125857+wleeaf@users.noreply.github.com>
2026-11-13 20:41:01 +00:00
Juan Manuel Méndez Rey 26cd875616 fix: build the out-of-range FileMode test cases at run time (#5512)
Test_safeFileModeConvert declared two cases as int(math.MaxInt32) + 1 and
int(math.MinInt32) - 1. Those are constants that do not fit in an int where int
is 32 bits wide, so the package did not compile on 386.

On such a platform no int value lies outside the int32 range, so the two cases
cannot be built there. They now come from int64 variables, appended only where
int is wider than int32, which keeps both cases on 64-bit.

Signed-off-by: Juan Manuel Méndez Rey <juan.mendezr@proton.me>
2026-11-13 15:28:51 -05:00
dependabot[bot] 9a479b9500 chore(deps): bump modernc.org/sqlite from 1.61.0 to 1.61.1 (#5572)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.61.0 to 1.61.1.
- [Release notes](https://gitlab.com/cznic/sqlite/tags)
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.61.0...v1.61.1)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.61.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-13 13:28:50 +00:00
dependabot[bot] 2f3e745e4b chore(deps): bump zizmorcore/zizmor-action from 0.8.0 to 0.8.1 (#5571)
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.8.0 to 0.8.1.
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/53290badfa369cb0bf7ad16342cb62c2fa47ac7b...45d7276c9ca790aabd705e31ca99c6185c3e76dd)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.8.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-13 13:28:46 +00:00
dependabot[bot] 2a1185a333 chore(deps): bump sigstore/cosign-installer from 4.1.2 to 4.1.3 (#5569)
Bumps [sigstore/cosign-installer](https://github.com/sigstore/cosign-installer) from 4.1.2 to 4.1.3.
- [Release notes](https://github.com/sigstore/cosign-installer/releases)
- [Commits](https://github.com/sigstore/cosign-installer/compare/6f9f17788090df1f26f669e9d70d6ae9567deba6...756fe2d284c7292c4e9b62c8a28f1e5629c59532)

---
updated-dependencies:
- dependency-name: sigstore/cosign-installer
  dependency-version: 4.1.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-13 13:27:40 +00:00
dependabot[bot] 512a7f2d4b chore(deps): bump docker/login-action from 4.7.0 to 4.8.0 (#5570)
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.7.0 to 4.8.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/81c6f93d4bc991e510b342a00b419b3bb4efc5c6...8aa5831fb8d48d8f76594c7ddde61ae58019f550)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-13 13:27:26 +00:00
anchore-oss-update-botandanchore-oss-update-bot a74c4962e2 chore(deps): update tool versions (#5568)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
2026-11-13 10:20:29 +00:00
Christopher Angelo PhillipsandAlex Goodman af5b1fa52f fix: report dpkg packages listed in both status and status.d once (#5565)
---------
Signed-off-by: Christopher Phillips <32073428+spiffcs@users.noreply.github.com>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2026-11-12 17:24:16 -05:00
Yuriy Tumanov 2d8cc94c02 fix(java): preserve Eclipse Classpath license expressions (#5080)
* fix(java): preserve Eclipse Classpath license expressions

Signed-off-by: Eljees <yurytumanov.r@yandex.ru>

* chore: use tagged switch for quote handling in splitUnquoted

Signed-off-by: Eljees <3.14hell@gmail.com>

* Fix unquoted Apache license names in Java manifests

Recognize the FreeMarker Bundle-License name as Apache-2.0 while
preserving neighboring license clauses and parameters.

Assisted-by: OpenAI Codex
Signed-off-by: Eljees <3.14hell@gmail.com>

---------

Signed-off-by: Eljees <yurytumanov.r@yandex.ru>
Signed-off-by: Eljees <3.14hell@gmail.com>
2026-11-12 13:11:54 -05:00
Will Murphy a0c0d3890a deps: bump brotli (#5543)
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
v1.57.1
2026-11-09 08:32:38 -05:00
dependabot[bot] 0b734b6902 chore(deps): bump github.com/gpustack/gguf-parser-go (#5541)
Bumps [github.com/gpustack/gguf-parser-go](https://github.com/gpustack/gguf-parser-go) from 0.27.0 to 0.28.1.
- [Release notes](https://github.com/gpustack/gguf-parser-go/releases)
- [Commits](https://github.com/gpustack/gguf-parser-go/compare/v0.27.0...v0.28.1)

---
updated-dependencies:
- dependency-name: github.com/gpustack/gguf-parser-go
  dependency-version: 0.28.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-06 13:35:56 +00:00
dependabot[bot] f7faae9385 chore(deps): bump github.com/moby/sys/mountinfo from 0.7.2 to 0.7.3 (#5540)
Bumps [github.com/moby/sys/mountinfo](https://github.com/moby/sys) from 0.7.2 to 0.7.3.
- [Release notes](https://github.com/moby/sys/releases)
- [Commits](https://github.com/moby/sys/compare/mountinfo/v0.7.2...mountinfo/v0.7.3)

---
updated-dependencies:
- dependency-name: github.com/moby/sys/mountinfo
  dependency-version: 0.7.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-06 13:32:26 +00:00
dependabot[bot] 5cd2ae3a9b chore(deps): bump github.com/bmatcuk/doublestar/v4 from 4.10.3 to 4.10.4 (#5537)
Bumps [github.com/bmatcuk/doublestar/v4](https://github.com/bmatcuk/doublestar) from 4.10.3 to 4.10.4.
- [Release notes](https://github.com/bmatcuk/doublestar/releases)
- [Commits](https://github.com/bmatcuk/doublestar/compare/v4.10.3...v4.10.4)

---
updated-dependencies:
- dependency-name: github.com/bmatcuk/doublestar/v4
  dependency-version: 4.10.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-06 13:31:36 +00:00
dependabot[bot] 307e7e0ddd chore(deps): bump github.com/gkampitakis/go-snaps from 0.5.24 to 0.5.25 (#5539)
Bumps [github.com/gkampitakis/go-snaps](https://github.com/gkampitakis/go-snaps) from 0.5.24 to 0.5.25.
- [Release notes](https://github.com/gkampitakis/go-snaps/releases)
- [Commits](https://github.com/gkampitakis/go-snaps/compare/v0.5.24...v0.5.25)

---
updated-dependencies:
- dependency-name: github.com/gkampitakis/go-snaps
  dependency-version: 0.5.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-06 13:29:55 +00:00
dependabot[bot] 4bf55d4324 chore(deps): bump golang.org/x/net from 0.61.0 to 0.62.0 (#5538)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.61.0 to 0.62.0.
- [Commits](https://github.com/golang/net/compare/v0.61.0...v0.62.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-version: 0.62.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-06 13:28:53 +00:00
dependabot[bot] 7a02fa3880 chore(deps): bump go.yaml.in/yaml/v3 from 3.0.5 to 3.0.6 (#5536)
Bumps [go.yaml.in/yaml/v3](https://github.com/yaml/go-yaml) from 3.0.5 to 3.0.6.
- [Release notes](https://github.com/yaml/go-yaml/releases)
- [Commits](https://github.com/yaml/go-yaml/compare/v3.0.5...v3.0.6)

---
updated-dependencies:
- dependency-name: go.yaml.in/yaml/v3
  dependency-version: 3.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-11-06 13:27:45 +00:00
anchore-oss-update-botandanchore-oss-update-bot 30f4bce762 chore(deps): update anchore dependencies (#5513)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
v1.57.0
2026-11-05 20:27:50 +00:00
Pujitha PaladuguandPujitha Paladugu c581c84ff1 fix(installer): repair OpenSSL fallback in hash_sha256 (#5521)
Motivation: when gsha256sum, sha256sum and shasum are all absent but openssl
is available, install.sh fails checksum verification. The fallback ran
`openssl -dst openssl dgst -sha256`, which is an invalid command, and would
also have failed on `cut -d ' ' -f a`, an invalid field argument. The
installer exits 1 and installs nothing; checksum verification is not bypassed.

Approach: call `openssl dgst -sha256 "$TARGET"` and take the digest as the
last space-separated token of its "SHA256(file)= <digest>" output
(also "SHA2-256(...)" on OpenSSL 3.x), using POSIX parameter expansion.

Validation: added test_hash_sha256_openssl in test/install/0_checksums_test.sh,
which overrides is_command so only openssl is found and checks the digest of
the fixture archive (file and stdin). Running `sh 0_checksums_test.sh` in
test/install fails on the test before the change ("Invalid command '-dst'")
and passes after. Run on macOS with the system openssl only; the full
installer run from the issue and the container-based make targets were not run.

Report: https://github.com/anchore/syft/issues/5520

Assisted-by: claude-sonnet-5-5 (via Claude Code)

Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
2026-11-05 20:17:31 +00:00
fa02ff2d26 feat(executable): capture GNU ELF build IDs (#5426)
* feat(executable): capture GNU ELF build IDs

Capture GNU ELF build IDs in Syft JSON so consumers can correlate
otherwise unidentified binaries with known artifacts or build records.

Read GNU build-ID notes from .note.gnu.build-id, with a 64 KiB read limit.
Validate the note owner and type before recording the identifier.

Add focused extraction and JSON round-trip tests and update the schema.

Signed-off-by: Mario Corchero <mcorcherojim@bloomberg.net>

* chore: bump JSON schema to 16.1.13 for executable identifiers

16.1.12 landed on main for coordinate fullPath, so the identifiers
addition moves to the next version.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* feat(executable): capture go build IDs from .note.go.buildid

The go linker only writes a GNU build ID with -B or when linking
externally, so most pure-Go binaries had no identifier. Every go ELF
carries .note.go.buildid, captured as kind `go-build-id` in the form
`go tool buildid` prints.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* docs(executable): describe identifiers generically

Identifier field docs (and the published schema) now give GNU hex and
Go build IDs as examples instead of stating every value is a GNU build
ID in lowercase hex, so the contract holds as more kinds are added.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* fix(executable): keep identifier notes inside elfutil bounds

Register `.note.gnu.build-id` and `.note.go.buildid` in elfutil's
sectionsReadByName as that list asks, and never open a compressed
identifier note. Real ones are SHF_ALLOC and cannot be compressed, so
this drops the only decompression path into these reads.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* test(executable): check identifiers from real linker output

Cross-compiles a tiny go program with `-B` so the test sees a GNU
build ID and a go build ID written by an actual linker and read through
the cataloger entrypoint.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Mario Corchero <mcorcherojim@bloomberg.net>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Co-authored-by: Mario Corchero <mcorcherojim@bloomberg.net>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2026-11-04 22:42:03 +00:00
Alex GoodmanandWill Murphy fd712ee71a perf: build lower layer squashes only when a scan reads them (#5492)
* perf: keep only the image squash when scanning with the squashed scope

- stereoscope builds a squashed tree for every layer, each a full copy of the one below, so memory
  grows with layers x files. The squashed scope only ever reads the top one.
- new `GetSourceConfig.WithImageSquashOnly(bool)` (and `sourceproviders.Config` field) reads images
  with stereoscope's `image.WithImageSquashOnly`, scoped to that one read
- the CLI turns it on when `--scope squashed` (the default)
- an image source read this way returns an error from `FileResolver` for `all-layers` and
  `deep-squashed` instead of panicking on the missing layer squashes

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* chore(deps): temporarily pin stereoscope to anchore/stereoscope#731

Replaces stereoscope with the PR head on the contributor fork so this builds. Drop the replace and
bump to a released version once that PR merges.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* chore(deps): bump stereoscope to main for WithImageSquashOnly

Drops the temporary replace to the contributor fork now that anchore/stereoscope#731 has merged.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* revert: drop the squash-only image read and bump stereoscope

stereoscope is replacing `image.WithImageSquashOnly` with lazy layer squashes, where every layer keeps a usable squash. That removes the need for `GetSourceConfig.WithImageSquashOnly` and the scope guard in `FileResolver`, so both go.

- bumps stereoscope to `feat/lazy-layer-squashes` (anchore/stereoscope `43c8f7e`), pending that PR merging

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* perf: build lower layer squashes only when a scan reads them

The image source provider now reads images with `image.WithLazyLayerSquashes`: the image squash is built during the read, and each lower layer's squash only when something reads it. A squashed scan never does, so it skips a full file tree copy per layer.

- squashed scans: faster, much less memory on images with many layers
- `scan`/`attest` with all-layers or deep-squashed stay eager (an internal ctx flag), since eager squashing overlaps with fetching and indexing and is faster when every layer gets read
- library callers going through `syft.GetSource` get lazy for every scope, since the scope isn't known when the image is read. All-layers is still correct, just slower
- no public API change

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* pull in stereoscope@main

Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Will Murphy <willmurphyscode@users.noreply.github.com>
Co-authored-by: Will Murphy <willmurphyscode@users.noreply.github.com>
2026-11-04 15:12:25 -05:00
Tim Olshansky 551442b1bc fix(terraform): generate NVD-style terraform_provider CPEs for terraform lock packages (#5261)
* fix: generate terraform-provider-specific CPEs for terraform lock packages

The terraform-lock-cataloger sets Language to Go, which causes the Go CPE
heuristic to generate application-level CPEs for terraform providers. For
example, registry.terraform.io/grafana/grafana produces the same CPE as
the Grafana application itself, leading grype to flag providers with
unrelated CVEs.

This adds terraform-specific vendor/product candidate functions that
generate CPEs matching the NVD convention for terraform providers
(e.g. terraform-provider-grafana instead of grafana), with terraform
as the target software qualifier.

Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>

* fix: align terraform provider CPEs with NVD terraform_provider convention

NVD records terraform providers with a fixed "terraform_provider" product
and the provider type in target_sw, e.g.
cpe:2.3:a:hashicorp:terraform_provider:*:*:*:*:*:vault:*:*

Generate <namespace>:terraform_provider:<version>:...:<type> instead of
<namespace>:terraform-provider-<type>:<version>:...:terraform, which never
appears in NVD.

Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>

---------

Signed-off-by: Tim Olshansky <456103+timols@users.noreply.github.com>
2026-11-03 22:01:20 -05:00
Guillaume MartyandGuillaume Marty 639de5db64 fix: keep dot-separated pre-release identifiers in Go ldflags versions (#5422)
The ldflags version regexes stopped at the first dot after the patch
number, so v1.28.0-rc.1 was reported as v1.28.0-rc.

Signed-off-by: Guillaume Marty <279286709+LemonCondor@users.noreply.github.com>
Co-authored-by: Guillaume Marty <279286709+LemonCondor@users.noreply.github.com>
2026-11-03 10:20:09 -05:00
Juan 5ec416cb24 fix: do not generate CPEs for msrc-kb packages (#5510)
A msrc-kb package's name is an MSRC product ID and its version a KB
number, so the generic generator produced CPEs such as
cpe:2.3:a:12437:12437:935509:*:*:*:*:*:*:*. A KB is a patch rather than
a product and has no CPE representation; these packages are matched
against MSRC data by name and version. Skip generation for them, as is
already done for ML model packages. The dictionary lookup already
returns nothing for this type.

Signed-off-by: juanjsebgarcia <github@juangarcia.co.uk>
2026-11-02 15:52:38 -05:00
anchore-oss-update-botandanchore-oss-update-bot 173055c39e chore(deps): update anchore dependencies (#5479)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
v1.56.0
2026-11-02 16:30:25 +00:00
anchore-oss-update-botandanchore-oss-update-bot f974ef598c chore(deps): update tool versions (#5509)
Signed-off-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
Co-authored-by: anchore-oss-update-bot <anchore-oss-update-bot@users.noreply.github.com>
2026-11-01 10:19:06 +00:00
dependabot[bot] e6813ba7b6 chore(deps): bump github.com/github/go-spdx/v2 from 2.7.1 to 2.8.0 (#5502)
Bumps [github.com/github/go-spdx/v2](https://github.com/github/go-spdx) from 2.7.1 to 2.8.0.
- [Release notes](https://github.com/github/go-spdx/releases)
- [Commits](https://github.com/github/go-spdx/compare/v2.7.1...v2.8.0)

---
updated-dependencies:
- dependency-name: github.com/github/go-spdx/v2
  dependency-version: 2.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:45:16 +00:00
dependabot[bot] 1238ace393 chore(deps): bump github.com/go-jose/go-jose/v4 from 4.1.5 to 4.1.6 (#5504)
Bumps [github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose) from 4.1.5 to 4.1.6.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Commits](https://github.com/go-jose/go-jose/compare/v4.1.5...v4.1.6)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v4
  dependency-version: 4.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:43:40 +00:00
dependabot[bot] 80ecdfe63f chore(deps): bump github.com/deitch/magic (#5503)
Bumps [github.com/deitch/magic](https://github.com/deitch/magic) from 0.0.0-20230404182410-1ff89d7342da to 1.0.0.
- [Commits](https://github.com/deitch/magic/commits/v1.0.0)

---
updated-dependencies:
- dependency-name: github.com/deitch/magic
  dependency-version: 1.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:35:51 +00:00
dependabot[bot] 1fa6bf6848 chore(deps): bump github.com/gpustack/gguf-parser-go (#5500)
Bumps [github.com/gpustack/gguf-parser-go](https://github.com/gpustack/gguf-parser-go) from 0.26.4 to 0.27.0.
- [Release notes](https://github.com/gpustack/gguf-parser-go/releases)
- [Commits](https://github.com/gpustack/gguf-parser-go/compare/v0.26.4...v0.27.0)

---
updated-dependencies:
- dependency-name: github.com/gpustack/gguf-parser-go
  dependency-version: 0.27.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:29:22 +00:00
dependabot[bot] b0bc371473 chore(deps): bump modernc.org/sqlite from 1.60.1 to 1.61.0 (#5499)
Bumps [modernc.org/sqlite](https://gitlab.com/cznic/sqlite) from 1.60.1 to 1.61.0.
- [Changelog](https://gitlab.com/cznic/sqlite/blob/master/CHANGELOG.md)
- [Commits](https://gitlab.com/cznic/sqlite/compare/v1.60.1...v1.61.0)

---
updated-dependencies:
- dependency-name: modernc.org/sqlite
  dependency-version: 1.61.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:29:00 +00:00
dependabot[bot] d91462b824 chore(deps): bump github.com/gkampitakis/go-snaps from 0.5.23 to 0.5.24 (#5501)
Bumps [github.com/gkampitakis/go-snaps](https://github.com/gkampitakis/go-snaps) from 0.5.23 to 0.5.24.
- [Release notes](https://github.com/gkampitakis/go-snaps/releases)
- [Commits](https://github.com/gkampitakis/go-snaps/compare/v0.5.23...v0.5.24)

---
updated-dependencies:
- dependency-name: github.com/gkampitakis/go-snaps
  dependency-version: 0.5.24
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:28:32 +00:00
dependabot[bot] 181b9198c0 chore(deps): bump zizmorcore/zizmor-action from 0.7.1 to 0.8.0 (#5497)
Bumps [zizmorcore/zizmor-action](https://github.com/zizmorcore/zizmor-action) from 0.7.1 to 0.8.0.
- [Release notes](https://github.com/zizmorcore/zizmor-action/releases)
- [Commits](https://github.com/zizmorcore/zizmor-action/compare/85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e...53290badfa369cb0bf7ad16342cb62c2fa47ac7b)

---
updated-dependencies:
- dependency-name: zizmorcore/zizmor-action
  dependency-version: 0.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:27:35 +00:00
dependabot[bot] 4614cf1d85 chore(deps): bump docker/login-action from 4.6.0 to 4.7.0 (#5498)
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.6.0 to 4.7.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/dbcb813823bdd20940b903addbd779551569679f...81c6f93d4bc991e510b342a00b419b3bb4efc5c6)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.7.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-10-30 13:27:21 +00:00
Alex Goodman f46acb6e4c fix(cyclonedx): tighten source-distribution external refs (#5493)
* build source PURL from metadata and gate it to CycloneDX 1.6+

- the source PURL is built from package metadata instead of editing the binary PURL: only `distro` (plus `epoch` and `rpmmod` for rpm) is carried over, subpath is dropped, and the ref is skipped when the PURL type does not match the metadata ecosystem
- one emission rule for all ecosystems: only when the source name or version differs from the binary, so self-sourced rpm and alpm packages no longer get a redundant ref
- source RPM names must end in `.src.rpm` or `.nosrc.rpm`, and `nosrc` maps to `arch=nosrc`
- `source-distribution` refs are dropped when encoding below spec 1.6, since cyclonedx-go does not downgrade them (CycloneDX/cyclonedx-go#291)

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

* limit source-distribution refs to deb and rpm

- apk origins and alpm pkgbases are build recipes, not published source packages, and their names are usually also real binary packages, so a `source-distribution` ref there would point at a binary package. They keep relying on the `upstream` PURL qualifier.
- document why this is an external reference rather than `pedigree.ancestors`, with links to the CycloneDX spec discussion (CycloneDX/specification#612)

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>

---------

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2026-10-29 18:54:49 -04:00
swadaptive 168722d880 feat(cyclonedx): output source PURL as external reference (#5246)
* Add tests for source packages in external references

Signed-off-by: swadaptive <268603322+swadaptive@users.noreply.github.com>

* Source distribution external reference utilities and test coverage

Signed-off-by: swadaptive <268603322+swadaptive@users.noreply.github.com>

* Add source-distribution external reference to components

Signed-off-by: swadaptive <268603322+swadaptive@users.noreply.github.com>

* Golden test fixtures

Signed-off-by: swadaptive <268603322+swadaptive@users.noreply.github.com>

* Adjust arch qualifier for source PURLs

Signed-off-by: swadaptive <268603322+swadaptive@users.noreply.github.com>

---------

Signed-off-by: swadaptive <268603322+swadaptive@users.noreply.github.com>
2026-10-29 17:42:00 -04:00
4b8a3db5f3 Add nested archive cataloging (#5260)
Signed-off-by: Kudryavcev Nikolay <kydry.nikolau@gmail.com>
Signed-off-by: Thomas Bechtold <thomasbechtold@jpberlin.de>
Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
Signed-off-by: Keith Zantow <kzantow@gmail.com>
Co-authored-by: Kudryavcev Nikolay <kydry.nikolau@gmail.com>
Co-authored-by: Thomas Bechtold <thomasbechtold@jpberlin.de>
Co-authored-by: Alex Goodman <wagoodman@users.noreply.github.com>
2026-10-29 17:33:07 -04:00
Vamshidher Reddy Jannapu Reddy 14a0beb93c Fix unbounded memory use decoding AI model metadata from CycloneDX (#5404)
* fix: stop unbounded recursion decoding self-referencing CycloneDX metadata

SafeTensorsModelInfo and GGUFFileHeader both carry a Parts field that is a
slice of their own type. When a CycloneDX component with that metadata is
decoded from properties, the slice decoder tries element 0, which decodes a
struct whose Parts slice tries element 0 one level deeper, and so on. The
recursion never finds a base case, building longer property-name prefixes
on every level, so memory grows until the process is killed (seen in
grype on any machine-learning-model component written by syft).

Return early from struct decoding when no property is named by the prefix
or nested below it: none of the fields could be decoded anyway, and the
recursion is now bounded by the depth of the properties that exist.

Refs anchore/grype#3767

Signed-off-by: Vamshidher Reddy Jannapu Reddy <v.jannapu@gmail.com>

* perf: look up nested CycloneDX property names in a sorted index

The struct check added in the previous commit scanned every property of a
component for every struct it decoded. Decoding a slice of structs, such as
a package's locations, does that once per element, so a component with n
properties took O(n^2): 20,000 location properties took 5.3s to decode
instead of 18ms, a cost that an untrusted SBOM can choose.

Sort the property names once per Decode/DecodeInto call and binary-search
them instead. The result of each check is unchanged; decoding is back to
O(n log n) (27ms for the same 20,000 properties).

Refs anchore/grype#3767

Signed-off-by: Vamshidher Reddy Jannapu Reddy <v.jannapu@gmail.com>

---------

Signed-off-by: Vamshidher Reddy Jannapu Reddy <v.jannapu@gmail.com>
2026-10-29 15:02:36 -04:00
Alex Goodman 1998095808 fix: hash each file once in the file digest cataloger (#5491)
Symlinks resolve to their target, so the same coordinates could show up
once per path that reaches them and get hashed again each time. The
results map hid this but the work was repeated. Drop repeated
coordinates before digesting.

Signed-off-by: Alex Goodman <wagoodman@users.noreply.github.com>
2026-10-29 12:07:01 -04:00
Pujitha PaladuguandPujitha Paladugu 12f0e2d837 fix(binary): detect envoy 1.37.1 and 1.40.x binaries (#5476)
Motivation: the envoy binary classifier returns no package for envoy 1.37.1,
1.40.0 and 1.40.1 (the official envoyproxy/envoy images), while neighbouring
versions such as 1.37.0 and 1.38.0 are detected.

Approach:
- the main matcher (NUL-delimited version followed by
  envoy_reloadable_features) only accepted 1.3x; widen it to 1.[34]x, which
  covers 1.40.0 and 1.40.1.
- in the 1.37.1 binary the version string sits between different neighbouring
  strings, so the existing matchers do not fire. Add a matcher anchored on the
  preceding "DeltaDiscoveryResponse.removed_resources" string.
- add snippets, config.yaml entries and test cases for 1.37.1, 1.40.0, 1.40.1
  (linux/amd64 images, pinned by digest).

Validation:
- cd syft/pkg/cataloger/binary && go test . -run
  'Test_Cataloger_PositiveCases/envoy' : the three new fixtures fail without
  the classifiers.go change and all envoy cases pass with it.
- golangci-lint run ./syft/pkg/cataloger/binary/... : 0 issues.
- Built syft before/after and scanned the full linux/arm64 envoy binaries from
  the official images: 1.37.1, 1.40.0 and 1.40.1 were not reported before and
  are reported with the right version after; 1.37.0 and 1.38.0 are unchanged.
- Not run: the rest of the package test suite needs docker, which is not
  available here (Test_PEPackageCataloger etc.), and snippets for other
  binaries are not downloaded locally.

The contrib-build fallback matchers still only accept 1.3x; they are untouched.

Report: https://github.com/anchore/syft/issues/5470

Assisted-by: claude-sonnet-5-5 (via Claude Code)

Signed-off-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
Co-authored-by: Pujitha Paladugu <10557236+pujitha24@users.noreply.github.com>
2026-10-28 11:01:40 -04:00
hsdfat 1636e1119a fix(binary): match istio snapshot and older pre-release versions (#5121)
The istio pilot-agent/pilot-discovery classifiers missed every
-snapshot.N build and the older -alpha.N/-beta.N/-rc.N layouts.

Two defects:

1. The doubled-version matcher anchored on a bare x.y.z followed by
   NULs, but pre-release builds repeat the full version including the
   suffix (1.15.0-beta.0 NUL NUL NUL 1.15.0-beta.0), so the anchor never
   matched. Only the capture group had been widened previously.

2. -snapshot.N was absent from every alternation, and snapshot builds
   store the version only once with no leading copy, so no existing
   matcher could reach it.

Widen the leading anchor to accept the same optional pre-release suffix
it already accepts in the capture group, add -snapshot.N to each
alternation, and add a matcher for the standalone snapshot layout. The
new matcher is second so it can never shadow a normal build.

Adds real captured snippets for pilot-agent and pilot-discovery at
1.0.0-snapshot.0, 1.5.0-alpha.0, 1.15.0-beta.0 and 1.19.0-rc.0.

Fixes #5060

Signed-off-by: phatlc <phatle.hsd@gmail.com>
2026-10-28 11:00:16 -04:00