KORTHEXkorthex.io

Integrations / CI/CD

CI/CD Cryptography Scanning

Written and maintained by Hendrik Schneider · Last reviewed · How we check this

Korthex turns cryptographic compliance into a pipeline gate: scan on every commit, fail the build above a configurable risk threshold, and keep the Cryptographic Bill of Materials current automatically. Six platforms ship a maintained template, and they differ in how deep the result lands, not in whether they are supported. 100% on-premise.

Six maintained templates, one gate

  • GitHub Actions: SARIF into GitHub Code Scanning, a pull-request comment and inline annotations, plus a composite action for repositories that share the gate across workflows
  • GitLab CI: the native Code Quality widget on the merge request, written directly by the scan
  • Azure Pipelines: logissue annotations in the build log, with SARIF published as a build artifact
  • Jenkins: a declarative pipeline whose recordIssues step reads the SARIF, which needs the Warnings Next Generation plugin
  • Bitbucket Pipelines: no native SARIF ingestion exists, so SARIF and the encrypted .krx report go out as build artifacts
  • CircleCI: no native SARIF ingestion either, so the same files go out through store_artifacts
  • Everything else gates on the exit code: Drone, Buildkite and any other runner, exactly as the six templates do
  • IntelliJ and VS Code plugins surface the same findings inline before code ever reaches the pipeline

What differs is the depth, not the support

All six templates run the same single korthex check command and gate on the same exit code. What differs is what the platform natively accepts back. GitHub, GitLab, Azure and Jenkins render the result where you review the change. Bitbucket and CircleCI have no bundled step that renders a SARIF file into the pull-request view, so their templates publish the artifact instead of claiming an inline annotation they do not implement.

Two of the six also run cold on purpose. Korthex scans incrementally by reusing a cache that holds both the content-hash snapshot deciding which files are re-analysed and the per-file findings reused for the rest, so a cache entry can make the gate skip a file and supply that file's findings. GitHub and Azure scope a cache to a branch; GitLab keeps protected and non-protected branches apart. Bitbucket does not document whether it scopes per branch, and CircleCI documents that it does not: keys live in a project-wide namespace, restore_cache matches by prefix, and same-repository pull requests share the main repository's cache. An unscoped shared cache is a channel for suppressing findings, so those two templates carry no cache until the scoping rule exists.

Why gate cryptography in CI?

Cryptographic regressions are silent. A dependency bump reintroduces 3DES, a copy-pasted helper brings MD5 back, a config change weakens TLS, and no unit test notices. A per-commit scan makes the regression visible in the pull request that causes it, when it costs minutes to fix instead of an audit finding later.

There is a second, newer reason: AI coding assistants rewrite cryptography non-deterministically. Korthex is the deterministic gate behind them: let an assistant refactor, then verify that the result is genuinely compliant, that no weak primitive slipped back in, and that the CBOM changed exactly as expected.

Performance and rollout

Source analysis of 50,000 to 500,000 lines takes seconds to about half a minute on a current workstation. How long the whole run takes is decided by the depth of the git history and the machine, so korthex.io/scan-duration publishes the cost model and the measurements behind it instead of a flat promise. For most repositories that is fast enough for every push. Roll out in two steps: run report-only first to see the baseline, then enable the threshold (Critical, High, Medium or Low) once the existing findings are triaged, so the gate never blocks a team on day one.

Compliance as a byproduct

Every pipeline run regenerates the CBOM with per-finding compliance status against NIST FIPS 140-3, FIPS 203 / 204 / 205, BSI IT-Grundschutz, TR-02102, PCI-DSS and ISO 27001. The recurring inventory that PCI DSS 12.3.3 and every migration framework demand stops being a manual exercise.

Frequently asked questions

Which CI systems does Korthex support?

Six platforms ship a maintained template: GitHub Actions, GitLab CI, Azure Pipelines, Jenkins, Bitbucket Pipelines and CircleCI. All six run the same single korthex check command and gate on the same exit code; they differ only in what the platform natively accepts back. Drone, Buildkite and anything else gate on that exit code too, without a template.

How does the gating work?

The CLI returns a non-zero exit code when findings exceed the configured risk threshold (Critical, High, Medium or Low). The pipeline treats it like a failing test.

Which tools consume the SARIF output?

GitHub Code Scanning renders it as inline pull-request annotations, and Jenkins reads it through the Warnings Next Generation plugin. Azure, Bitbucket and CircleCI have no native SARIF ingestion, so their templates publish the file as a build artifact. GitLab is the exception that needs no SARIF at all: the scan writes the Code Quality format its merge-request widget parses. SARIF 2.1 is a standard format, so other SARIF consumers work too.

Do all six templates reuse a warm scan cache?

Four do. GitHub, GitLab, Azure and Jenkins preserve the incremental scan cache between runs, so only changed files are re-analysed. Bitbucket and CircleCI deliberately do not. A cache entry can make the gate skip a file and also supply that file's findings, so an unscoped cache is a way to suppress findings. Bitbucket does not document whether it scopes a cache per branch, and CircleCI documents that its keys are project-wide with prefix matching. Those two run cold until the scoping rule exists.

How do I roll this out without breaking builds?

Start report-only to establish the baseline, triage the existing findings with the migration plan, then enable the threshold. New regressions fail from that point on; legacy findings are burned down on the plan's order.

Does the pipeline need internet access?

No. Scans run fully on-premise, including air-gapped runners. Only the optional dashboard report transmits anonymized metadata.