RepoAuditor - README
Contents
Installation
We recommend using uv since it can install RepoAuditor as a tool via uvx into a sandbox environment for quick use.
This lets you directly run RepoAuditor.
uvx RepoAuditor
Alternatively, yuou can install RepoAuditor via uv or pip.
uv is preferred to pip since it creates and manages a virtual environment.
| Installation Method | Command |
|---|---|
| Via uv | uv add repoauditor |
| Via pip | pip install repoauditor |
Overview
How to use RepoAuditor
Once installed, you can invoke the following to verify if RepoAuditor is installed correctly:
uvx RepoAuditor --version
and you should see something like
RepoAuditor vX.X.X
To get a list of command line options, you can run
uvx RepoAuditor --help
Personal Access Token (PAT)
The most common use case for RepoAuditor would be to audit a GitHub repository.
In order to allow RepoAuditor to read the repository, you first need to generate a Personal Access Token or PAT.
Please refer to the GitHub documentation on Personal Access Tokens for details about a Fine-grained PAT which we will be using.
To generate the Fine-grained PAT, we perform the following steps:
- Go to
Settings -> Developer settings -> Personal Access Token -> Fine-grained tokens. - Click on
Generate new token. - Give the token a name and a description.
- Set an appropriate expiration date.
- Under
Repository Access, selectAll repositories. - For permissions, we need to go to
Repository permissions. - Enable the following permissions:
- Read-Write access to
Contents. - Read access to
AdministrationandSecret scanning alerts.
- Read-Write access to
- Click on
Generate token. - Copy the generated string. This is your PAT.
- Save the PAT to a convenient location on your machine (such as your hime directory
~/) in the filePAT.txt.
The path to the PAT.txt will be passed into RepoAuditor. E.g.
uvx RepoAuditor --GitHub-pat ~/PAT.txt
Example Usage
With the above generated PAT file, you can now run RepoAuditor on your GitHub repository.
As a general example, we will use the python-helloworld repository.
NOTE You need to fork the repository since your default PAT only has access to repos under your account.
To run RepoAuditor, we can enter the following in the command-line:
uvx RepoAuditor --include GitHub \
--GitHub-url https://github.com/<username>/python-helloworld \
--GitHub-pat ~/PAT.txt
RepoAuditor will generate a series of messages describing all the issues in the repository, along with the rationale behind them and the steps for resolution.
Custom Settings
RepoAuditor tries to provide default settings and checks which are considered best practices. However, your team or organization may have different ways of doing things.
You can override the default settings by specifying the appropriate flag.
We have 3 types of flags:
- Boolean flags for those settings which are checked to be on by default and you wish to check are off, with the form
Module-no-Requirement(e.g.--GitHub-no-MergeCommit). - Conversely, boolean flags for those settings which are checked to be off by default, and you wish to check are on, denoted by the form
Module-Requirement(e.g.--GitHub-AllowDeletions). - Values flags take a string value to determine what value to enforce, and have the form
Module-Requirement-value(e.g.--GitHub-License-value "MIT License").
Please run uvx repoauditor --help to get the list of all flags available.
Examples
For example, RepoAuditor by default checks that the setting Allow rebase merging is off. If you wish to check that this setting is turned on, you can run:
uvx repoauditor --GitHub-RebaseMergeCommit
Similarly, RepoAuditor checks if Issues are enabled. You can set RepoAuditor to check if Issues is disabled by specifying
uvx repoauditor --GitHub-no-SupportIssues
Finally, RepoAuditor by default enforces that the MIT License exists for the repository. If your organization requires another license (such as GPL), you can enforce that by specifying the license keyword such as:
uvx repoauditor --GitHub-License-value "GNU General Public License v2.0"
The types of licenses supported by GitHub can be found here. Be sure to specify the full license name, e.g. GNU General Public License v2.0.
Config File
RepoAuditor accepts both a set of flags as well as a configuratin YAML file.
The configuration (or config) file can make usage easier by recording preferences as well as facilitating sharing of enforced requirements within an organization. We have provided a sample configuration file called default_config.yaml, which can be used as:
uvx run RepoAuditor --config default_config.yaml
Development
Please visit Contributing and Development for information on contributing to this project.
Additional Information
Additional information can be found at these locations.
| Title | Document | Description |
|---|---|---|
| Code of Conduct | CODE_OF_CONDUCT.md | Information about the norms, rules, and responsibilities we adhere to when participating in this open source community. |
| Contributing | CONTRIBUTING.md | Information about contributing to this project. |
| Development | DEVELOPMENT.md | Information about development activities involved in making changes to this project. |
| Governance | GOVERNANCE.md | Information about how this project is governed. |
| Maintainers | MAINTAINERS.md | Information about individuals who maintain this project. |
| Security | SECURITY.md | Information about how to privately report security issues associated with this project. |
License
RepoAuditor is licensed under the MIT license.
Metadata
Release files for RepoAuditor 0.2.81
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| repoauditor-0.2.81.tar.gz | 140.3 kB | Without provenance | Details for repoauditor-0.2.81.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| repoauditor-0.2.81-py3-none-any.whl | Python 3 | none | any | Details for repoauditor-0.2.81-py3-none-any.whl |
Total release size: 234.4 kB
Release files / repoauditor-0.2.81.tar.gz
| Download URL | repoauditor-0.2.81.tar.gz |
|---|---|
| Size | 140.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3617b9afe8566162920159fb591c803d9974d28bfa99eee57af0f8651f2e5c40
|
|
BLAKE2b-256 checksum How to use checksums |
7b5d59c6a6b29ab06312071d6b5dcbec72d48f19a1f20297b605d605e1c8e3a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Release files / repoauditor-0.2.81-py3-none-any.whl
| Download URL | repoauditor-0.2.81-py3-none-any.whl |
|---|---|
| Size | 94.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28f1db95f831397da5db9cf10402616cd1139bf7460b568e3e7d8b136bf001b5
|
|
BLAKE2b-256 checksum How to use checksums |
b792d3009654dbf7606e6013a84214aaa63bf356df0ab927cf5da6a95b82f8b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.4
|
Security for RepoAuditor 0.2.81
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.