Repository-wide ownership evidence

CODEOWNERS Repository Coverage & Rule Reachability Auditor

See the rule that actually decides every path—not merely the first pattern that looks relevant. Find unowned files, intentional ownership clears, invalid lines, dead rules, fully shadowed rules, inactive CODEOWNERS locations, and the owner alternatives for a proposed change.

Paste text or inventory a selected folder

Supply repository evidence

No files selected. Folder selection exposes names and local CODEOWNERS text to this tab, but never uploads file contents.

An ownerless pattern is valid and clears ownership for its matches. Invalid rules are skipped.

One file path per line, relative to the repository root. Matching is case-sensitive.

Use this for pull-request planning. Owners on one deciding line are alternatives: GitHub requires approval from any one of them, not all of them.

Paste evidence, upload text files, or choose a repository folder.

Local and read-only: CODEOWNERS text, filenames, paths, findings, and reports stay in this browser tab. Folder selection reads only the active CODEOWNERS file’s text; it does not open the other selected files, contact GitHub, create reviews, or modify the repository.

Why plausible rules still fail in practice

CODEOWNERS is an ordered policy. GitHub evaluates case-sensitive patterns and uses the last matching rule, so a broad late rule can silently override a carefully placed earlier rule. This auditor preserves the entire matching-line trace, then separates patterns that match nothing in the supplied inventory from patterns that match files but never become the decision.

Location is part of the policy

GitHub searches .github/CODEOWNERS, root CODEOWNERS, then docs/CODEOWNERS, and uses the first file it finds. Choosing a repository folder lets this tool apply that priority and report lower-priority inactive files. A pasted file cannot prove its branch or location, so those facts remain explicitly unverified.

Cleared ownership is different from no match

A later pattern with no owners deliberately clears ownership for matching paths. That is distinct from a file that never matched a valid rule. Both lack a deciding owner, but the path table labels the reason so an intentional exception is not confused with an accidental gap.

Protect the policy itself

GitHub recommends assigning an owner to the CODEOWNERS file or the entire .github directory. When its active location is known, this audit evaluates that path through the same rule engine and warns when it is not owned.

Authoritative confirmation

The precedence, location, file-size, owner, branch-protection, and syntax model follows GitHub’s CODEOWNERS documentation. Confirm highlighted syntax on GitHub itself; its file view and REST API can expose repository-specific errors.

Validation boundary

This is a bounded independent matcher, not GitHub. It does not know the pull request’s actual base branch; query GitHub’s syntax-error API; prove that users or teams exist, are visible, or have explicit write access; evaluate branch protection or rulesets; infer files absent from the supplied inventory; resolve symlinks; inspect submodules; or guarantee that GitHub will request a reviewer. Folder inventory relies on browser directory-selection support and treats selected paths as evidence at that moment.

Frequently asked questions

Why did an earlier matching rule not win?

CODEOWNERS uses last-match-wins precedence. Put the more specific exception after the broader rule that it must override.

Does docs/* cover nested documentation?

No. GitHub documents it as matching direct children such as docs/getting-started.md, not deeper paths. Use /docs/ when the root documentation tree and its descendants should share an owner.

Do all owners on one line have to approve?

No. When code-owner approval is required, approval from any one listed owner satisfies that ownership set.

Can I exclude a directory with !?

No. Negation is unsupported. Add a later matching pattern with no owners to clear ownership for that subtree.

Audit kubeconfig merge precedence · Browse developer tools