Integrate the CybeDefend CLI into a GitLab Self-Managed CI/CD pipeline for secure local code scanning.
This guide shows you how to run CybeDefend local scans within a GitLab Self-Managed environment. It’s ideal if you want to keep your code in-house and still benefit from automated security checks.
The —ci flag in CybeDefend’s CLI disables colors and fancy formatting, providing minimal, script-friendly output.
curl
commands to grab the binary.--dir .
to scan current working directory.$CYBEDEFEND_API_KEY
and $CYBEDEFEND_PROJECT_ID
are stored in GitLab’s CI/CD Variables.Using Docker Instead
If you prefer Docker-based scanning, create or pull an image with cybedefend pre-installed, then run the scan inside a container in your pipeline.
After the job completes, you can:
For large codebases, consider caching dependencies to speed up builds – your security scans will remain unaffected as long as you keep scanning the final code or artifact.