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
Support yaml as an output format #1395
Comments
I'm not sure why you want an output like the CRDs we have in the cluster. |
Why not? Why couldn't we get output in the same format as the |
Can I take up this issue? |
With all |
I wonder if using the JSON printer to generate the report and then converting it to the YAML format would do the trick. I managed to make it work locally. Attaching the YAML report for reference. YAML presenter is not present at https://github.com/anchore/grype/tree/main/grype/presenter. Hence, I thought that converting JSON to YAML could be a potential solution. |
This commit adds the support for using yaml as an output format to store the reports. For Example: kubescape scan image nginx -f yaml The report will be stored in the "report.yaml" file. Fixes: kubescape#1395 Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
The YAML output should be aligned with the CRDs created by the kubpescape-operator.
We are still working on the configuration scanning output. |
Thanks for the additional information @dwertent. I noticed that the command you shared fetches the vulnerability manifests of a single resource out of many resources in the cluster. The report.yaml file contains the information of all the resources under the Attaching a screenshot for better clarification. I'm running a local kind cluster. I don't have similar CRDs, any information on how to set up the Kubscape namespace and similar resources for testing would be very helpful. Thanks. |
This commit adds the support for using yaml as an output format to store the reports. For Example: kubescape scan image nginx -f yaml The report will be stored in the "report.yaml" file. Fixes: kubescape#1395 Signed-off-by: VaibhavMalik4187 <vaibhavmalik2018@gmail.com>
@craigbox My concern is that we would be adding more code for us to support when our JSON/YAML is not supposed to be human-readable, we don’t use the YAMLs for interchange between components and I don’t think we intend to. So what value would we give if this feature were implemented? |
I think it's worth being consistent. If the intention is all interchange happen in JSON, then we should remove support for YAML in scan output results. |
@matthyx any updates on this issue? |
not yet, don't waste time on that for the moment |
Okay, understood. |
expected: output manifest in YAML format, same as
VulnerabilityManifest
in the clusteractual: error message
expected: YAML output
actual: pretty-printed output
The text was updated successfully, but these errors were encountered: