fix(ci): install syft and call binary by absolute path#823
Merged
Conversation
Install syft on the runner via anchore/sbom-action/download-syft (pinned to v0.24.0 / syft v1.32.0) alongside the existing cosign install step. The anchore/syft image is FROM scratch with ENTRYPOINT ["/syft"] and no $PATH, so Dagger's WithExec could not resolve "syft" and failed with `exec: "syft": executable file not found in $PATH`. Call the binary by its absolute path instead. Signed-off-by: Prasanth Baskar <bupdprasanth@gmail.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #823 +/- ##
=========================================
- Coverage 10.99% 9.13% -1.86%
=========================================
Files 173 270 +97
Lines 8671 13195 +4524
=========================================
+ Hits 953 1206 +253
- Misses 7612 11876 +4264
- Partials 106 113 +7 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
LAKSHJAIN14
pushed a commit
to LAKSHJAIN14/harbor-cli
that referenced
this pull request
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Install Syftstep to thepublish-and-signcomposite action, pinned toanchore/sbom-action/download-syft@v0.24.0withsyft-version: v1.32.0.GenerateSBOMin.dagger/publishimage.goto call/syftby absolute path.Why
The latest publish run failed with:
anchore/syft:latestis builtFROM scratchwithENTRYPOINT ["/syft"]and no shell or$PATH. Dagger'sWithExecdoes not invoke the entrypoint, so"syft"could not be resolved. Using the absolute path/syftresolves the binary directly.The
Install Syftrunner step mirrors the existingInstall Cosignpattern and pins the action by SHA plus a fixed syft version for reproducibility.Test plan
publish-image-and-signcompletes, SBOM is generated, and the in-toto attestation is attached to the published image.