Skip to content

fix(binary): match istio snapshot and older pre-release versions - #5121

Open
hsdfat wants to merge 1 commit into
anchore:mainfrom
hsdfat:fix-istio-snapshot-and-prerelease-versions
Open

fix(binary): match istio snapshot and older pre-release versions#5121
hsdfat wants to merge 1 commit into
anchore:mainfrom
hsdfat:fix-istio-snapshot-and-prerelease-versions

Conversation

@hsdfat

@hsdfat hsdfat commented Jul 29, 2026

Copy link
Copy Markdown

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

Description

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

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 anchore#5060

Signed-off-by: phatlc <phatle.hsd@gmail.com>
@hsdfat

hsdfat commented Jul 29, 2026

Copy link
Copy Markdown
Author

The Unit tests job failed as infrastructure rather than as a test — the Go compiler was killed while building aws-sdk-go-v2/service/s3 and the runner then received a shutdown signal:

▎ aws-sdk-go-v2/service/s3: .../pkg/tool/linux_amd64/compile: signal: killed
▎ make: *** [Makefile:18: unit] Terminated
▎ ##[error]Process completed with exit code 143.
▎ ##[error]The runner has received a shutdown signal.

The run never reached any test in this PR. The same signature has hit main before (run 12976, commit ae95342). The other 7 Validations jobs are green, as are CodeQL, Validate GitHub Actions and DCO, and go test ./syft/pkg/cataloger/binary/... passes locally. Could someone re-run the failed job?

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.

Support istio binary various versions

1 participant