Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

History

10 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

CodeDelta GitHub Action

Measure code churn and flag AI-generated / AI-agent code on every pull request — then comment the summary on the PR, surface findings in the code-scanning (Security) tab, and optionally block the merge. Runs entirely on your own runner; no source leaves the machine and nothing phones home. Setup is two lines in a workflow file — the theoretical minimum of effort.

CodeDelta's actual PR comment posting itself — verbatim from the public demo PR, default mode

Real output: the comment above is character-for-character what CodeDelta posted on the public demo PR, running the default mode (churn + Agent Scan).

Who makes inline edits? Hand-maintained projects: 17 in every 100 changes. One agent-built codebase: fewer than 1 in 100.

The data behind the Action: inline edit = CHG_LLOC, a changed logical statement — study and reproduction hashes at codedelta.app/paper-repchurn.html.

# .github/workflows/codedelta.ymlname: CodeDeltaon: [pull_request]permissions:
contents: readpull-requests: write # post the summary commentsecurity-events: write # upload SARIF to the code-scanning tabjobs:
codedelta:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4with: { fetch-depth: 0 } # full history so churn (base..head) works
- uses: code-delta-app/action@v1

That's the whole setup. Free and fully unlocked during the beta (to 31 August 2026) — no license, no secrets, no signup. The engine downloads itself. See example-workflow.yml for a fully configured workflow with gating and an AI Bill of Materials.

Setup (one minute)

  1. Add the workflow above to .github/workflows/codedelta.yml. Done.

To run past the beta — or to use your own license sooner — add one secret: CODEDELTA_LICENSE = base64 of your codedelta.lic (base64 -i codedelta.lic | pbcopy), then pass it as the license input. It overrides the built-in beta license automatically. Get a license at codedelta.app.

No install on anyone's machine; it all runs on the GitHub runner.

Inputs

InputDefaultDescription
licensebuilt-in beta licenseOptional. base64 of codedelta.lic, or a path to it (use a repo secret). Overrides the free beta license (valid to 31 August 2026).
engine-urllatest releaseURL of the CodeDelta Linux bundle (.tar.gz). Defaults to the latest published release; override to pin a version or self-host.
path.Directory to scan.
modechurn_agentchurn_agent (churn + Agent Scan — the default) / both (adds the ML AI audit) / churn (churn only) / ai_audit (AI + agent, no churn) / ai / agent.
threshold50AI sensitivity 0–100 (affects rating cut-offs only).
baselinePath to a committed codedelta-baseline.json.
fail-on-newfalseFail the job if there are new findings vs the baseline.
commenttruePost the summary as a PR comment (updates in place).
sariftrueUpload findings as SARIF to the code-scanning tab.
gatefalseFail the job on the default AI-governance policy: egress to a non-allied jurisdiction (CN/RU/KP/IR) or the rogue exec-on-model pattern. Needs an agent scan (mode: agent/both/ai_audit/churn_agent, i.e. any mode but plain churn/ai).
gate-policyPath to a custom gate policy JSON (deny_jurisdictions / allow_providers / deny_flags / max_risk). Implies gate.
bomWrite an AI Bill of Materials to this path.
bom-formatnativenative or cyclonedx (CycloneDX 1.6).

How findings reach the PR

  • Comment — a concise churn + AI summary, re-used (edited) on each push.
  • Annotations / Security tab — SARIF results appear inline on the diff and in code scanning, keyed to the flagged files. (Public repos, or private repos with GitHub Advanced Security.)
  • Merge gate — with baseline + fail-on-new, only files that got worse than the accepted baseline fail the check (exit code 3).

Notes

  • The license is verified locally on the runner; nothing leaves the machine. AI signals are pointers for review, not verdicts.
  • Generate a baseline once and commit it: codedelta-gui scan . --mode both --write-baseline codedelta-baseline.json -q
  • Default mode: churn is the ~90% case — fast, pure measurement, no ML. Switch to both to add the AI audit and agent scan.

About

Measure code churn and flag AI-generated code on every pull request — PR comment, Security tab, optional merge gate.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors