Repository navigation
Block PRs that use AI without disclosing it - #5
Merged
Merged
Conversation
Add an "AI Use Without Disclosure" pre-merge check in error mode that flags a blocker when a PR shows AI assistance (a named AI tool or agent, an AI trailer or bot commit author, or two indirect signals) but the PR template's AI Disclosure section is deleted, unedited, still placeholders, or answers None against direct evidence. The existing "AI Contribution Disclosure" check stays a warning and now only reviews disclosure quality, accepting the PR template's table as well as the bullet form.
EsadCetiner
reviewed
Oct 27, 2026
EsadCetiner
left a comment
Member
There was a problem hiding this comment.
Not an expert in code rabbit, but this looks fine to me.
Do we want to auto-close PRs that don't disclose AI usage? imo those PRs are not worth our attention if AI usage isn't being disclosed.
Member
Author
|
If they have a label already, I can autoclose them using my AI 😄 . Which is funny. |
Member
Author
|
@EsadCetiner For now I'll test how it works, and if it is accurate we can autoclose. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
what
A new pre-merge check, "AI Use Without Disclosure", runs in
mode: errorand flags a❌ blockerwhen a PR shows AI assistance without a real disclosure. A direct signal is enough: an AI tool or agent named in the body, a commit or a comment, an AICo-Authored-Byor "Generated with" line, or an AI bot as commit author. Otherwise it needs two indirect signals, and a thin case passes.The PR template already ships
## AI Disclosurewith**AI usage for this contribution:** None / Used, so the heading alone counts for nothing. The check treats the disclosure as missing when the section is deleted, the answer is unedited or blank, "Used" is left with placeholder rows, or "None" contradicts a direct signal.The existing "AI Contribution Disclosure" check stays a warning and now only reviews disclosure quality. It accepts the template's table as well as the bullet form; before, every PR that used the template would have been warned. README and AGENTS.md now document the new check and the extra
❌ blockercase.why
Accounts are opening agent-generated PRs in bulk and dropping the disclosure section. kosoyyagent opened 21 PRs in two days and named Devin on its first four (coreruleset/coreruleset#4903 and #4906–#4908), then removed the section from the rest. One of those, coreruleset/coreruleset#4921, has a commit authored by
devin-ai-integration[bot]. The old check only raised a warning for this case.mode: errorblocks merges only whenreviews.auto_approvals(request_changes_workflow) is enabled. That setting is stillfalse, because turning it on makes CodeRabbit approve or request changes on every PR in the org, which needs its own decision. Until then the blocker appears in the review but does not stop a merge. The check also runs one PR at a time, so it cannot use an author's disclosures on other PRs.refs
.github/pull_request_template.md(the AI Disclosure section this check reads)ai disclosure
yamllint -d relaxedandcheck-jsonschemaagainst the current v2 schema both pass; checked the trigger wording against the coreruleset PR template and the commits of feat: detect php2shell session.upload_progress injection (CVE-2026-109618/109619) coreruleset#4909, #4921 and #4924