CI/CD Integrations
CircleCI Setup for Local Code Scanning
Implement CybeDefend local scanning in your CircleCI pipeline without granting direct repo access.
CircleCI pipelines can run CybeDefend local scans by either installing the CLI or using Docker. This approach ensures your code is scanned within your pipeline, and only relevant data is uploaded to CybeDefend.
Prerequisites
- API Key
Create one via Introduction & API Key Creation. Store it in Project Settings → Environment Variables (e.g.CYBEDEFEND_API_KEY
). - Branch Filters
We recommend scanning only the main (or production) branch to avoid mixing partial results.
Docker Example
.circleci/config.yml:
Explanation
- docker: We use the prebuilt
cybedefend/local-scanner:latest
image. - checkout: CircleCI’s built-in step to fetch code into
my-app
. - cybedefend scan: Zips and uploads your code, referencing environment variables for the key and project ID.
You can also run cybedefend results in a follow-up step to retrieve a SARIF or HTML report.
Alternative: CLI Binary
If you prefer your own Docker or machine executor:
Large codebases can require extra CPU/RAM. If you hit resource limits, upgrade your CircleCI plan or use a larger resource class.
For advanced gating, parse the CLI exit code or scan summary to fail the job on critical issues.