crashappsec / chalk

Chalk allows you to follow code from development, through builds and into production.
https://crashoverride.com/
GNU General Public License v3.0
322 stars 11 forks source link

derive _OP_ARTIFACT_TYPE from ChalkObj.resourceType #268

Open miki725 opened 2 months ago

miki725 commented 2 months ago

Description

ChalkObj.resourceType is currently a set whereas _OP_ARTIFACT_TYPE is a single string value. In some places like a docker container resourceType can contain both image and container resources whereas artifact type is only reported as a container. Instead of manually setting the reporting field, we can derive it from the resourceType if we use something like OrderedSet so that first item in the set is the main artifact type and any subsequent types are supplementary and maybe we can report on them separately.

Result

Will simplify internal code a bit