Code Ownership Map Generator (CODEOWNERS Validator)
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
This tool validates CODEOWNERS files and generates a comprehensive ownership map for smart contract repositories. By analyzing the CODEOWNERS configuration against the actual file structure, it identifies which files have designated owners, which patterns are misconfigured, and which files are left unowned. The tool fetches the CODEOWNERS file from any GitHub repository, parses its syntax, and validates each pattern against the repository's file tree. It also optionally correlates on-chain contract addresses to source files via block explorer verification data, providing a complete view of code ownership from repository to deployment. Results include a detailed ownership map showing every file's owner(s), validation status, and any warnings or errors in the CODEOWNERS configuration.
HOW TO USE
Connect your wallet (read-only, no transaction required) and select the target network. Enter the GitHub repository (format: owner/repo) and the branch to analyze. Provide a GitHub personal access token to increase API rate limits (optional). Click "validate CODEOWNERS" and the tool will fetch the CODEOWNERS file, parse its patterns, and validate them against the repository's file structure. Results display the CODEOWNERS content, a summary of validation statistics (valid, warning, unowned), and a detailed table showing each file's path, assigned owners, and validation status. Use this data to ensure all critical contract files have proper ownership and to identify gaps in your CODEOWNERS configuration.
TECHNICAL MECHANISM
The analyzer uses the GitHub REST API to fetch the CODEOWNERS file from the specified repository and branch (checking common locations: .github/CODEOWNERS, docs/CODEOWNERS, or root). It then parses the file content line by line, extracting patterns and their associated owner teams (e.g., @org/team). The tool fetches the repository's file tree using the GitHub API's contents endpoint, recursively traversing directories to build a complete list of tracked files. For each file, it applies the CODEOWNERS patterns in order of specificity, matching patterns based on GitHub's CODEOWNERS matching rules (exact matches, directory wildcards, and pattern matching). Files that match no pattern are flagged as "unowned," while files matching patterns with invalid owner references are flagged as "warning." The tool also validates that referenced owner teams exist in the repository's context. Results are cached during the session to minimize API calls and respect rate limits.
WHAT IT CANNOT SEE
This tool cannot analyze repositories that do not have a CODEOWNERS file or are not accessible via the GitHub API. It is limited by GitHub API rate limits, which may restrict file tree traversal and CODEOWNERS file retrieval, especially without a GitHub token. It cannot determine ownership for files that have never been modified or have ambiguous authorship—the tool relies entirely on the CODEOWNERS configuration. It cannot identify delegated or shared ownership patterns that are documented outside the CODEOWNERS file (e.g., in team documentation). It relies on the accuracy and completeness of the CODEOWNERS configuration and GitHub metadata; if the CODEOWNERS file contains errors, the validation results will reflect those errors. It cannot validate that CODEOWNERS patterns actually match the intended file paths without proper testing—pattern validation is based on syntax and file tree matching, not semantic intent. The tool is limited to repositories that are accessible and have at least one verified contract deployed on-chain when attempting contract-to-source mapping; otherwise, it operates purely on GitHub data.
PLEASE NOTE
This is a read‑only analytics tool—it never submits transactions or signs anything. It is designed for EVM‑compatible chains but can analyze GitHub data for any repository. For best results, provide a GitHub personal access token to increase API rate limits from 60 to 5,000 requests per hour. The tool respects GitHub's API terms of service and includes appropriate delays between requests to avoid rate limiting. The CODEOWNERS validation is based on GitHub's documented pattern matching rules and syntax.