fix: tools/get_network_footprint.py mediatypes and failure handling

What does this MR do and why?

This MR fix defects in tools/get_network_footprint.py.

  1. Previously, application/vnd.oci.image.index.v1+json was incorrectly included in MANIFEST_MEDIA_TYPES instead of MANIFEST_LIST_MEDIA_TYPES. This caused failures when retrieving image layers for OCI artifacts, as the code would not properly recognize multi-platform manifests.
    This MR corrects the lists to ensure OCI image indexes are handled as manifest lists, fixing layer extraction for affected images.

  2. Additionally, the script now handles cases where no media type is specified in the manifest by attempting to extract layers directly. If no layers are found, the script will raise an error.

  3. The script will also fail if a manifest cannot be read.

  4. I've added a small CI job to test the script.

cc @tmmorin

Edited by Benjamin Le Diguerher

Merge request reports

Loading