Repository navigation
feat(ai): detect credit trailers, Warp, Crush and plain Claude Code notices - #672
Merged
Merged
Conversation
…otices Projects that write their own AI-attribution checks reject marks the built-in detection let through: - Reviewed-by, Suggested-by, Helped-by, Tested-by and Reported-by naming a known tool. They reuse each tool's identity patterns and count as a stamp: forbid rejects them, disclose asks for a disclosure beside them. - Claude Code's "Generated with [Claude Code](...)" notice without the robot emoji, and a line that is only a claude.ai/code/session link. - Warp's cloud agent identity, agent@warp.dev, as author or co-author. - Crush's "Generated with Crush" notice and its co-author address crush@charm.land (its default Assisted-by trailer was already read). A person reviewing under their own name, a sentence that mentions Claude Code or cites a session link, and "Warp" or "Crush" as names still pass.
Contributor
|
Warning Review limit reachedYou'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 33 minutes. View limit details
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. |
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #672 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 14 14
Lines 2495 2498 +3
Branches 484 484
=========================================
+ Hits 2495 2498 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.



Why
Many projects (Nextcloud, neovim, xymon, LangChain docs, Solana Foundation and others) enforce their AI-attribution policy with hand-written grep steps. Their patterns catch marks that
ai_attributionlets through today. xymon's workflow ships 29 test lines, so they make a good yardstick.What changes
All data, no engine change:
Reviewed-by,Suggested-by,Helped-by,Tested-by,Reported-bynaming a known tool. They reuse every tool's identity pattern (so a person keeps passing) and count as a stamp:forbidrejects them,discloseasks for a disclosure beside them.Generated with [Claude Code](...),Generated with Claude Code), and a line that is only ahttps://claude.ai/code/session_...link.Warp <agent@warp.dev>(author, co-author, sign-off; source:DEFAULT_GIT_EMAILin Warp'sgit_credentials.rs).💘 Generated with CrushandCo-Authored-By: Crush <crush@charm.land>(its defaultAssisted-by: Crush:<model>was already read).Before / after
xymon's 29 lines,
CCHK_AI_ATTRIBUTION=forbid, human author:Newly caught,
forbid:Reviewed-by: Claude Code <noreply@anthropic.com>Suggested-by: GitHub Copilot <198982749+Copilot@users.noreply.github.com>Reviewed-by: Codex <bot@example.com>Generated with [Claude Code](https://claude.com/claude-code)Generated with Claude Codehttps://claude.ai/code/session_016y2DnP4kiXgy(own line)💘 Generated with CrushWarp <agent@warp.dev>Still passing on purpose:
Reviewed-by: Alice <alice@anthropic.com>,Reviewed-by: Claude Dubois <claude@example.org>, a sentence that mentions Claude Code or cites a session link mid-line,Co-authored-by: Warp <warp@example.com>,Jane Dev <jane@warp.dev>, "crush" as a word. The 5 xymon lines still not caught are a bare first name or company with any address (Claude <bot@example.com>,Devin <devin@example.com>,Anthropic <bot@example.com>,GPT4 <bot@example.com>), left alone because Claude and Devin are also people's names.disclose:Reviewed-by: Claude Code <noreply@anthropic.com>alone fails CC014 with "Disclose the tool withAssisted-by: Claude Code"; with that trailer added it passes.Checks
pytest1582 passed (the one failure,test_load_config_file_permission_error, fails only when run as root, same on main); coverage 100%; ruff 0.17.1, mypy, codespell clean.