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
gitlab

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 registry.gitlab.com/security-products/container-scanning:6 which gtcs
/usr/local/bundle/bin/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?

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

container_scanning:
  variables:
    CS_IMAGE: <registry.example.com>/<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