Gitlab CI
Integrate KICS with GitLab CI¶
You can integrate KICS into your GitLab CI/CD pipelines.
This provides you the ability to run KICS scans in your GitLab repositories and streamline vulnerabilities and misconfiguration checks to your infrastructure as code (IaC).
Full Example¶
image:
name: checkmarx/kics:latest
entrypoint: [""]
stages:
- kics
kics-scan:
stage: kics
script:
- kics scan --no-progress -q /app/bin/assets/queries -p ${PWD} -o ${PWD} --report-formats json --output-name kics-results
artifacts:
name: kics-results.json
paths:
- kics-results.json
when: always
Example Results¶
When your pipeline executes, it will run this job. If KICS finds any issues, it will fail the build.
Pipeline Failure¶
Pipeline Success¶
Download Artifact¶
Using GitLab SAST Reports¶
image:
name: checkmarx/kics:latest
entrypoint: [""]
stages:
- kics
kics-scan:
stage: kics
script:
- kics scan -q /app/bin/assets/queries -p ${PWD} --ignore-on-exit all --report-formats glsast -o ${PWD} --output-name kics-results
artifacts:
reports:
sast: gl-sast-kics-results.json
when: always
Example results¶
Pipeline SAST report integration¶
📝 This feature requires Gitlab Ultimate.