DEV Community

Cover image for Claude Code GitHub Actions: 5 Checks for What the Agent Pushes
flisk
flisk

Posted on

Claude Code GitHub Actions: 5 Checks for What the Agent Pushes

TL;DR: when Claude Code opens pull requests in your repo, the review still has to catch what an agent gets wrong in the same ways a tired person does. GEL runs 15 checks in about a second with no model and no network. Below are the five that matter most for agent-written PRs, and what they caught on a bench.

If you search Claude Code GitHub Actions, most results explain how to run the agent in CI. This is the other half: what to run on the pull request it opens.

The five checks

Check Fails when
secret-scan an AWS, GitHub, Anthropic, OpenAI, Stripe live or Slack key, or a private key block, is in a file
pinned-actions a workflow uses another org's action by tag or branch instead of a commit SHA
workflow-permissions a job has no permissions, uses write-all, or checks out the fork's code under pull_request_target
done-without-green a PR says "all checks pass" or "ready to merge" while a check on its last commit is red
tests-with-change a PR changes product code and no test file in the same PR

What it caught on a bench

GEL was run on 30 public repos (11,350 files) and 231 real pull requests.

With GEL The repos' own CI today
Leaked keys caught (planted, 5 formats) 150 / 150 1 of 30 repos scans for keys
Unpinned actions caught (planted) 90 / 90 3 of 30 repos check pins
PRs that said green while a check was red 35 of 231 flagged 0 of 30 repos check this

These are planted defects, so read them as recall. On clean repos, workflow-permissions reported 45 findings in 18 of 30 repos (5 of 5 read by hand were real), and 16 of 21 dead-link findings were not real. Method and limits: the bench README.

Add it in one step

- uses: actions/checkout@v4   # pin it to a SHA; GEL will tell you
  with: { fetch-depth: 0 }
- uses: flisk-sh/gel@v1
Enter fullscreen mode Exit fullscreen mode

Or run it on a local folder:

npx github:flisk-sh/gel run --root .
Enter fullscreen mode Exit fullscreen mode

It starts in report mode, so nothing blocks until you say so. Block one guard first:

{ "mode": "report", "guards": { "secret-scan": "block" } }
Enter fullscreen mode Exit fullscreen mode

Promote others after the run records (gel-record.jsonl) show a guard was right.

Lanes: more care where it matters

GEL picks a risk lane from the changed files, never from a label: A docs and tests, B product code, C workflows, gel.json, auth, payment, secrets, migrations, Dockerfiles and deploy config, where a person approves. An agent that edits a workflow lands in lane C.

Limits

GEL checks files and PR text. It does not read your code for logic errors, and it does not judge whether the agent solved the task.

Source: github.com/flisk-sh/gel (MIT).

Top comments (0)