CI/CD Integration
CODYGIENE is designed to run on your CI infrastructure. The scanner runs locally on your CI runner · no source code is sent to CODYGIENE.
Generic CI pattern
CODYGIENE works in any CI that supports Node.js:
# Install
npm install -g codygiene@beta
# Scan (exits 0 regardless of findings)
codygiene scan --format json -o codygiene-report.json
# Or fail on high-severity findings
codygiene scan --fail-on high --format sarif -o codygiene.sarif
During the public test period, install from the beta tarball instead:
npm install -g codygiene-0.9.1-beta.1.tgz
Quality gates
Use --fail-on to control exit behavior:
# Fail if any critical findings
codygiene scan --fail-on critical
# Fail if any high or critical findings
codygiene scan --fail-on high
# Fail if any medium or above findings
codygiene scan --fail-on medium
Without --fail-on, the scan exits 0 even with findings. This lets you
decide your own quality gate threshold.
SARIF for GitHub Code Scanning
codygiene scan --format sarif -o codygiene.sarif
Upload the SARIF file to GitHub Code Scanning for integrated results in pull requests and the Security tab.
Baseline comparison in CI
# On main branch: save baseline
codygiene baseline --baseline-path codygiene-baseline.json
# On pull requests: compare against baseline
codygiene diff --fail-on new-high --baseline-path codygiene-baseline.json
This fails CI only on new high-severity findings or regressions, not on pre-existing issues.
What CODYGIENE does NOT do in CI
- Does not upload your source code
- Does not connect to your database
- Does not execute your code
- Does not send telemetry
The scanner runs entirely on your CI runner.
Dedicated integrations
Dedicated GitHub Actions, GitLab CI templates, and Jenkins plugins are planned for future releases. For now, the generic pattern above works in any Node.js-capable CI environment.
Spotted something wrong or missing? Send feedback