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
2025-12-17 18:00:38 +00:00
2020-06-24 14:37:00 -04:00
2026-05-18 11:59:55 -04:00
2024-10-11 05:17:01 -04:00

Cute pink owl syft logo

Syft

A CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems. Exceptional for vulnerability detection when used with a scanner like Grype.

 Validations   GitHub release   GitHub go.mod Go version   License: Apache-2.0   Join our Discourse   Follow on Mastodon 

syft-demo

Features

Tip

New to Syft? Check out the Getting Started guide for a walkthrough!

Installation

The quickest way to get up and going:

curl -sSfL https://get.anchore.io/syft | sudo sh -s -- -b /usr/local/bin

Tip

See Installation docs for more ways to get Syft, including Homebrew, Docker, Scoop, Chocolatey, Nix, and more!

The basics

See the packages within a container image or directory:

# container image
syft alpine:latest

# directory
syft ./my-project

To get an SBOM, specify one or more output formats:

# SBOM to stdout
syft <image> -o cyclonedx-json

# Multiple SBOMs to files
syft <image> -o spdx-json=./spdx.json -o cyclonedx-json=./cdx.json

Local containers-storage images

On Linux, syft can scan images from a local containers-storage store (e.g. built with Buildah or Podman) when asked explicitly; plain image references never look there:

syft --from containers-storage localhost/myimage:latest

# rootless stores must be read from inside the builder's user namespace
podman unshare syft --from containers-storage localhost/myimage:latest

This is included in the Linux release binaries. When building from source, add -tags containers_image_openpgp,exclude_graphdriver_btrfs.

Tip

Check out the Getting Started guide to explore all of the capabilities and features.

Want to know all of the ins-and-outs of Syft? Check out the CLI docs, configuration docs, and JSON schema.

Contributing

We encourage users to help make these tools better by submitting issues when you find a bug or want a new feature. Check out our contributing overview and developer-specific documentation if you are interested in providing code contributions.

Syft development is sponsored by Anchore, and is released under the Apache-2.0 License. The Syft logo by Anchore is licensed under CC BY 4.0

For commercial support options with Syft or Grype, please contact Anchore.

Come talk to us!

The Syft Team holds regular community meetings online. All are welcome to join to bring topics for discussion.

S
Description
A CLI tool and Go library for generating a Software Bill of Materials (SBOM) from container images and filesystems.
Readme Apache-2.0
196 MiB
Languages
Go 98.6%
Shell 0.9%
Python 0.4%