Container scanning

Has anyone tried to use container scanning in the CICD pipeline and encountered error “gtcs scan”
$ gtcs scan bash: line 135: gtcs: command not found

Please share the configuration in .gitlab-ci.yml for container scanning, and the environment (self-managed/SaaS, which versions, etc.) :slight_smile:

This error indicates that the gtcs command is not available.

gtcs is the command which the container_scanning job uses to perform container scanning by default.

greg@gitlab:[~]:) docker run -it which gtcs

Can you confirm that all prerequisites for running container scanning in your pipeline have been fulfilled?

If you comment everything out except for the following minimal container_scanning job configuration, does the error persist?

  - template: Jobs/Container-Scanning.gitlab-ci.yml

    CS_IMAGE: <>/<image>:<tag>

Yes , everything commented out and same error

The template include uses Security/ as path. This was deprecated and moved in 15.x. The current configuration uses Jobs/.

Re-iterating on my question earlier, which GitLab version is involved here? My guess is self-managed, and a version in or before 15.x.

Gitlab version 15.9 and tried using Jobs/ and encounter the same problem. I even created I new project and use the examples in Gitlab container scanning docs and still same error

If you have a nested pipeline and/or are running into this issue, you can resolve it by referencing the image from gitlab directly