forked from konflux-ci/build-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tasks/buildah: respect user configuration for Syft
STONEBLD-2095 Syft makes many things configurable: https://github.com/anchore/syft#configuration For example, users can take advantage of this to get rid of false positives. This will be useful for the Syft build itself: redhat-appstudio/rh-syft#21 Currently, our SBOM generation does not respect the user configuration. Syft reads the config from the current working directory, not from the target directory (anchore/syft#2465). Set the working directory to the root of the user's repository to ensure we respect the configuration. Signed-off-by: Adam Cmiel <[email protected]>
- Loading branch information
Showing
3 changed files
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -98,6 +98,9 @@ spec: | |
|
||
- name: generate-sboms | ||
image: quay.io/redhat-appstudio/syft:v0.105.0@sha256:32a9d2007f2b042ceec4ef32fa1d90b8d28141822e7d9748f240da9d55c56601 | ||
# Respect Syft configuration if the user has it in the root of their repository | ||
# (need to set the workdir, see https://github.com/anchore/syft/issues/2465) | ||
workingDir: $(workspaces.source.path)/source | ||
script: | | ||
syft dir:$(workspaces.source.path)/source --output [email protected]=/tmp/files/sbom-source.json | ||
syft oci-dir:/tmp/files/image --output [email protected]=/tmp/files/sbom-image.json | ||
|
This file contains 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