Fix image name and operating_system name edge case error
This MR fixes:
- When
location['image']is'alpine:latest'current logic set thelocation['image']as['alpine:latest']sincenamed_captures.valuesreturns an array. The first value should be taken in that case. - The OS names are fixed and it does not contain special characters (
:) for trivy. Grype outputs the os names with the version(centos:8). In order to support both, the regex could be modified to/[a-z]*/. - Modifies
as_container_scannershared examples to separate trivy and grype related assertions
Edited by Sashi Kumar Kumaresan