-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syft looks for the config file in $PWD, not in the target directory. Intentional? #2465
Comments
Hi @chmeliik, thanks for the report. I think our intention here is indeed to find the syft configuration file in the current working directory, and not in the target directory. However, if you'd like to include a config file in the directory to be scanned, you can specify a particular config file using |
Given that some of the configuration options feel like they're scoped to the thing I'm scanning (e.g. But if that's intended that's OK, using |
Sure, I understand your reasoning here, but I think we will preserve existing behavior. Glad the |
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]>
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]>
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]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
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. --- This also allows the user to - intentionally or otherwise - exclude packages that should be reported, causing false negatives. That seems like an acceptable tradeoff, given that: * For hermetic builds, the SBOM should still report everything that got in from outside, regardless of Syft configuration. * We should assume some level of co-operation from the user, we don't have to design accurate SBOMs for users that actively sabotage the proces Signed-off-by: Adam Cmiel <[email protected]>
What happened:
When a processing a directory, e.g.
syft ~/repos/syft
, Syft does not read the .syft.yaml config file in the target directory. It reads the one in the current directory instead.What you expected to happen:
Expected Syft to read
<target directory>/.syft.yaml
rather than$PWD/.syft.yaml
Steps to reproduce the issue:
In the root of this repository:
Environment:
syft version
:(built with
make build
from 0e5fb8e)cat /etc/os-release
or similar): Fedora Linux 39 (Workstation Edition)The text was updated successfully, but these errors were encountered: