This guide runs Vibgrate drift scanning in a Harness CI pipeline. It is for platform teams using Harness with Kubernetes or Docker build infrastructure.
Prerequisites
- A Harness CI pipeline with a build stage.
- A container image with Node.js 18+ for the step.
Run step
Add a Run step to your CI stage:
- step:
type: Run
name: Vibgrate drift scan
spec:
image: node:22
command: |
npx @vibgrate/cli scan --fail-on error
Harness clones your repository into the workspace, so npx @vibgrate/cli scan scans the project root.
Gating the build
A non-zero exit code fails the step and the stage. Use --fail-on error for severity gating, or --drift-budget for a numeric DriftScore budget:
npx @vibgrate/cli scan --drift-budget 60
Pushing to Vibgrate Cloud
To centralize results, run a scan with --push (configure your DSN as a Harness secret):
npx @vibgrate/cli scan --push
See Push scan results to Vibgrate Cloud from CI for the full token setup.
Report artifact
Write a report and upload it via your artifact step or object store:
npx @vibgrate/cli scan --format markdown --out drift-report.md
Related
- Fail builds on a severity threshold for fine-grained gating.
- Cache Vibgrate scans in CI to speed up repeat runs.