Closed matifali closed 6 months ago
@matifali Thanks for the suggestion. I've added this to our road map.
@alexhung Thanks. Looking forward to it.
Thank you @alexhung. Could you give an example of how it can be used to only get vulnerabilities of a single artifact instead of all the artifacts in the repo?
Thanks :)
@matifali For your use case, you should be able to find the artifact scan using the repo
and repo_path
attributes:
data "xray_artifacts_scan" "my_artifacts_scan" {
repo = "docker-local"
repo_path = "/<NAMESPACE>/<IMAGE>:<TAG>"
}
output "my_artifacts_scan" {
value = data.xray_artifacts_scan.my_artifacts_scan.results[0]
}
Great thank you @alexhung
I want to fetch xray scan results of a docker artifact using the xray provider.
I am proposing having a
data
source with the namexray_artifact_scan
in the form of,Here,
data.xray_artifact_scan.example.result
should have the form as returned by the following API endpoint to fetch vulnerabilities in an image. https://jfrog.com/help/r/xray-rest-apis/scans-list-get-artifacts.