312-97 practice question 9 of 35

(Dustin Hoffman has been working as a DevSecOps engineer in an IT company located in San Diego, Californi a. For detecting new security…

Full set: 100 questions
(Dustin Hoffman has been working as a DevSecOps engineer in an IT company located in San Diego, Californi a. For detecting new security vulnerabilities at the beginning of the source code development, he would like to integrate Checkmarx SCA tool with GitLab. The Checkmarx template has all the jobs defined for pipeline. Where should Dustin incorporate the Checkmarx template file ‘https://raw.githubusercontent.com/checkmarx-ltd/cxflow/develop/templates/gitlab/v3/Checkmarx.gitlab-ci.yml’?)
Answer options
A: gitlab-cd.yml root directory.
B: gitlab-ci/cd.yml root directory.
C: gitlab.yml root directory.
D: gitlab-ci.yml root directory. Correct answer
Correct Answer:
D. gitlab-ci.yml root directory.
Explanation

GitLab CI/CD pipelines are configured using a YAML file named .gitlab-ci.yml located in the project's root directory. To integrate an external tool like Checkmarx, its predefined template is included in the main .gitlab-ci.yml file using the include: keyword. This allows the pipeline to execute the jobs defined in the Checkmarx template. The other filenames are not the standard convention recognized by GitLab for CI/CD configuration.

Why Incorrect

A. gitlab-cd.yml is not the standard filename for GitLab CI/CD configuration. GitLab specifically looks for .gitlab-ci.yml.
B. gitlab-ci/cd.yml is an incorrect filename and path. The configuration file must be in the project's root directory.
C. gitlab.yml is not the correct filename for defining CI/CD pipelines in GitLab.

References

1. GitLab Documentation. (n.d.). The .gitlab-ci.yml file. GitLab Docs. Retrieved from https://docs.gitlab.com/ee/ci/yaml/. In the introduction, it states, "To use GitLab CI/CD, you start with a .gitlab-ci.yml file in the root of your project."

2. GitLab Documentation. (n.d.). Keyword reference for the .gitlab-ci.yml file - include. GitLab Docs. Retrieved from https://docs.gitlab.com/ee/ci/yaml/index.html#include. This section details how to use the include keyword to incorporate external YAML files, including remote ones via URL.

3. Checkmarx Documentation. (2023). GitLab Integration. Retrieved from https://checkmarx.com/resource/documents/en/34965-6413-gitlab-integration.html. The integration guide specifies adding the Checkmarx template to the .gitlab-ci.yml file.

Scroll to Top