Skip to content

Conversation

@witchcraze
Copy link
Contributor

Description

add istio classifier

$ go run cmd/syft/main.go -q istio/pilot:1.26.8 | grep -e 'istio' -e 'pilot'
istio.io/api                                      v1.26.7-0.20251203124221-04fd5ef0d3ca  go-module
istio.io/client-go                                v1.26.7-0.20251203124822-c46e19018717  go-module
istio.io/istio                                    v0.0.0-20251213104211-4ea27a1efd95     go-module
pilot-discovery                                   1.26.8                                 binary

$ go run cmd/syft/main.go -q istio/proxyv2:1.26.8 | grep -e 'istio' -e 'pilot'
istio.io/api                                      v1.26.7-0.20251203124221-04fd5ef0d3ca  go-module
istio.io/istio                                    v0.0.0-20251213104211-4ea27a1efd95     go-module
pilot-agent                                       1.26.8                                 binary
$ go test -v ./syft/pkg/cataloger/binary -run Test_Cataloger_PositiveCases/istio
=== RUN   Test_Cataloger_PositiveCases
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.3.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-discovery/1.1.17/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64
    snippet_or_binary.go:50: using snippet for "istio_pilot-agent/1.1.17/linux-amd64"
--- PASS: Test_Cataloger_PositiveCases (0.51s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64 (0.09s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64 (0.09s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64 (0.07s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64 (0.07s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64 (0.05s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64 (0.07s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64 (0.06s)
PASS
ok      github.com/anchore/syft/syft/pkg/cataloger/binary       0.533s

$ go test -v ./syft/pkg/cataloger/binary -run Test_Cataloger_PositiveCases/istio -must-use-original-
binaries
=== RUN   Test_Cataloger_PositiveCases
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.3.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-discovery/1.1.17/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.26.8/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.8.0/linux-amd64"
=== RUN   Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64
    snippet_or_binary.go:62: forcing the use of the original binary for "istio_pilot-agent/1.1.17/linux-amd64"
--- PASS: Test_Cataloger_PositiveCases (19.12s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.26.8/linux-amd64 (2.99s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.8.0/linux-amd64 (4.89s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.3.8/linux-amd64 (1.48s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-discovery/1.1.17/linux-amd64 (4.47s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.26.8/linux-amd64 (0.76s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.8.0/linux-amd64 (2.71s)
    --- PASS: Test_Cataloger_PositiveCases/istio_pilot-agent/1.1.17/linux-amd64 (1.80s)
PASS
ok      github.com/anchore/syft/syft/pkg/cataloger/binary       19.134s

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (please discuss with the team first; Syft is 1.0 software and we won't accept breaking changes without going to 2.0)
  • Documentation (updates the documentation)
  • Chore (improve the developer experience, fix a test flake, etc, without changing the visible behavior of Syft)
  • Performance (make Syft run faster or use less memory, without changing visible behavior much)

Checklist

  • I have added unit tests that cover changed behavior
  • I have tested my code in common scenarios and confirmed there are no regressions
  • I have added comments to my code, particularly in hard-to-understand sections

Issue references

Fixes #4508

@wagoodman
Copy link
Contributor

@witchcraze can you rebase this? otherwise looks good 👍

Signed-off-by: witchcraze <witchcraze@gmail.com>
@witchcraze witchcraze force-pushed the 4508_add-istio-binary-classifier branch from 474ff39 to 3d77246 Compare January 7, 2026 10:18
@witchcraze
Copy link
Contributor Author

Thank you.
I updated

@wagoodman wagoodman merged commit 6509b70 into anchore:main Jan 7, 2026
10 checks passed
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.

Catalog istio binary (pilot-discovery, pilot-agent)

2 participants