GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(ai): reject commits whose author is an AI tool (CC017) by shenxianpeng · Pull Request #661 · commit-check/commit-check

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

What

The AI rules read only the commit message. So a commit authored by the agent itself, with the person at most a Co-authored-by: line, passed both forbid and disclose. Projects that adopted forbid have written policies such as "commits must be authored by you" and "AI tools must not be listed as commit authors or co-authors". Those policies were not enforced for this case.

New rule CC017 ai-author reads the author of the commit under test. It judges the author exactly as the same identity on a Co-authored-by: line, so the two checks can never disagree about who is a tool.

  • Built under both forbid and disclose. Under disclose, CC015 already refuses the tool as a co-author, and the author slot takes a person's place even more.
  • A project that accepts agent-authored commits can list CC017 under warn.
  • ignore_authors skips it like the other commit rules.
  • Existing commit (--rev, or HEAD): reads the recorded author.
  • Message not yet committed (commit-msg hook, piped message, api.validate_message, the MCP validate_message tool): reads the author git would record, via git var GIT_AUTHOR_IDENT. That honours GIT_AUTHOR_NAME / GIT_AUTHOR_EMAIL the way git commit does, which is how Aider commits as <name> (aider). It fires only when that identity is an AI tool, which is exactly when the commit about to be made would be authored by one. With no identity at all, nothing is flagged.

It also adds the GitHub App identities of Claude (claude[bot]), Cursor's background agent (cursor[bot]), Codex cloud (chatgpt-codex-connector[bot]) and Amazon Q Developer (amazon-q-developer[bot]). The App already checks commits from these accounts; now they also count as co-authors.

ignore_authors on a piped message now takes GIT_AUTHOR_NAME before user.name, the same order git uses. Without the variable, nothing changes. With it, a piped message is judged by the author it names. commit-check-action#321 uses this to hand over each pull request commit's author.

Before / after

Commit message Fix parser crash + Co-authored-by: Jane Dev <[email protected]>, checked with commit-check -m --rev <sha>:

Author Before, forbid / disclose After, forbid / disclose
google-labs-jules[bot] pass / pass CC017 / CC017
openhands <[email protected]> pass / pass CC017 / CC017
Jane Dev (aider) pass / pass CC017 / CC017
claude[bot] pass / pass CC017 / CC017
Copilot <[email protected]> pass / pass CC017 / CC017
devin-ai-integration[bot] pass / pass CC017 / CC017
Jane Dev, dependabot[bot], renovate[bot] pass pass
CC017 ai-author check failed ==> devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
An AI tool is the commit author: Devin
Suggest: Author the commit yourself: git commit --amend --reset-author, and disclose the tool with "Assisted-by: Devin"
Docs: https://commit-check.com/rules/#cc017

Under forbid, the suggestion stops after --reset-author.

Piped message, ignore_authors = ["Renovate Bot"], GIT_AUTHOR_NAME=Renovate Bot: before, the message was checked under the runner's user.name. After, it is skipped.

False positives

I ran the detector over every author in junit-framework's last 3,000 commits (93 identities, including renovate, dependabot, github-actions and pre-commit-ci) and over this org's repos: no matches.

Checks

pytest: 1563 passed, 100% line and branch coverage. The one failure, test_load_config_file_permission_error, also fails on main when run as root. ruff check and ruff format are clean.

TestFixOption now pins GIT_AUTHOR_NAME/GIT_AUTHOR_EMAIL, because on a machine whose git identity is an agent, the pending author is an AI tool. The README rule table now says CC013–CC017.

The site's rules page needs a CC017 section. It goes in the release docs PR, because commit-check.com documents released behaviour only.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
shenxianpeng added 2 commits November 8, 2026 03:37
@shenxianpeng
feat(ai): reject commits whose author is an AI tool (CC017)
15164cf
The AI rules read only the message, so a commit authored by the agent
itself, with the person at most a Co-authored-by line, passed both forbid
and disclose: Jules (google-labs-jules[bot]), OpenHands
(openhands <[email protected]>), Aider ("<name> (aider)"),
claude[bot], Copilot and devin-ai-integration[bot] all did.

CC017 ai-author reads the author of the commit under test and judges it
as the same identity on a Co-authored-by line, so the two can't disagree
about who is a tool. It is built under both forbid and disclose: a tool
in the author's place takes a person's place even more than a co-author
line does. A project that accepts agent-authored commits can list CC017
under warn. It reads an existing commit (--rev, or HEAD); a message not
yet committed has no author and passes.

The GitHub App identities of Claude, Cursor's background agent, Codex
cloud and Amazon Q Developer are added, so they count as co-authors too.
@shenxianpeng
feat(ai): judge a message not yet committed by its pending author
84367a8
A commit-msg hook or a piped message has no commit to read, so CC017 now
reads the author git would record: git var GIT_AUTHOR_IDENT honours
GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL the way git commit does, which is how
Aider commits as "<name> (aider)", and falls back to user.name and
user.email. With no identity at all, nothing is flagged.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 8, 2026 03:44
@coderabbitai

coderabbitai Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 15 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 067db1d2-468e-47cb-9085-4dc0f789d9cf
Commits

Reviewing files that changed from the base of the PR and between 38f1a1e and 22c2814.

Files selected for processing: 13

  • README.md
  • commit_check/ai_signatures.py
  • commit_check/ai_signatures_data.py
  • commit_check/engine.py
  • commit_check/rule_builder.py
  • commit_check/rules_catalog.py
  • commit_check/util.py
  • tests/ai_signatures_test.py
  • tests/engine_fixes_test.py
  • tests/engine_test.py
  • tests/main_test.py
  • tests/rule_builder_test.py
  • tests/util_test.py
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the enhancement New feature or request label Nov 8, 2026
@shenxianpeng shenxianpeng self-assigned this Nov 8, 2026
@codecov

codecov Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (38f1a1e) to head (22c2814).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #661   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           14        14           
  Lines         2462      2499   +37     
  Branches       478       484    +6     
=========================================
+ Hits          2462      2499   +37     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

shenxianpeng added 3 commits November 8, 2026 03:47
@shenxianpeng
refactor(ai): pick the co-author match with next()
c4c4da2
@shenxianpeng
fix: judge ignore_authors on a piped message by GIT_AUTHOR_NAME first
87f990e
@shenxianpeng
refactor: name the user.name config key once
22c2814
@sonarqubecloud

sonarqubecloud Bot commented Nov 8, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codspeed

codspeed Bot commented Nov 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Merging this PR will not alter performance

1 warning

⚠️ 143 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 666 untouched benchmarks
⏩ 126 skipped benchmarks1


Comparing feat/detect-ai-commit-author (22c2814) with main (38f1a1e)

Open in CodSpeed

Footnotes

  1. 126 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
shenxianpeng merged commit dc83e63 into main Nov 8, 2026
32 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
shenxianpeng deleted the feat/detect-ai-commit-author branch November 8, 2026 06:55
@shenxianpeng shenxianpeng added the minor A minor version bump label Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@shenxianpeng shenxianpeng

Labels

enhancement New feature or request minor A minor version bump

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@shenxianpeng
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.