New version (6.6.0) of container-scanning throws an error when initialising scan

Summary

When running the https://gitlab.com/gitlab-org/security-products/analyzers/container-scanning tool in my CI pipeline, after the most recent release, it fails to run the scan

Steps to reproduce

Run the container_scanning job

Example Project

What is the current bug behavior?

It fails with

[INFO] [2023-12-18 08:44:39 +0000] [container-scanning]  >  Scanning container from registry registry.gitlab.com/org/folder/project/main:109jf2938f2398jf2389 for vulnerabilities with severity level UNKNOWN or higher, with gcs 6.6.0 and Trivy Version: 0.44.1....
[ERROR] [2023-12-18 08:45:11 +0000] [container-scanning] > different prefix: "" and "/builds/org/folder/project-name"

What is the expected correct behavior?

It passes and generates the relevant output, for example:

[32;1m$ gtcs scan[0;m
[[32mINFO[0m] [2023-12-19 14:02:37 +0000] [container-scanning]  >  Scanning container from registry registry.gitlab.com/org/folder/project/foobranch:109jf2938f2398jf2389 for vulnerabilities with severity level UNKNOWN or higher, with gcs 6.5.1 and Trivy Version: 0.44.1..... 
+------------+--------------+------------------------------+-------------------------+------------------------------------------------------------------------+
|   STATUS   | CVE SEVERITY |         PACKAGE NAME         |     PACKAGE VERSION     |                            CVE DESCRIPTION                             |
+------------+--------------+------------------------------+-------------------------+------------------------------------------------------------------------+
| [31mUnapproved[0m |     Low      |             xxx              |          1.2.3          | Some description |
|            |              |                              |                         | more desc |
|            |              |                              |                         |                            more desc.                            |
+------------+--------------+------------------------------+-------------------------+------------------------------------------------------------------------+

... and so on

This output was generated by pinning the version of the container-scanning back to 6.5.1, so it's clear that 6.6.0 has caused this problem.

Relevant logs and/or screenshots

Links provided above

Output of checks

Results of GitLab environment info

Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of: \\\\\\\`sudo gitlab-rake gitlab:env:info\\\\\\\`) (For installations from source run and paste the output of: \\\\\\\`sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production\\\\\\\`)

Results of GitLab application Check

Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of: \\\`sudo gitlab-rake gitlab:check SANITIZE=true\\\`) (For installations from source run and paste the output of: \\\`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true\\\`) (we will only investigate if the tests are passing)

Possible fixes

Edited by James Reed