/github-auditor

Creates reports on a GitHub organization's members, teams, and repository access rights.

Primary LanguageJavaScriptMIT LicenseMIT

GitHub Auditor

Generate reports about the users and teams of your GitHub organization and their access to your repositories.

Requirements

  • To use this tool, you must be an Owner of the GitHub organization you wish to audit.
  • You will need a Personal Access Token from GitHub with the repo and read:org scopes enabled. Save this token in a file called token.secret in the base directory of this project.
  • This project was created using Node.js version 9.4.0. It is untested in other versions.

Usage

Begin by cloning this project to a convenient location on your local machine:

$ git clone https://github.com/aj-foster/github-auditor.git

Now, enter the project directory and install its dependencies:

$ cd github-auditor
$ npm install

Create a Personal Access Token for your GitHub account and save it in a file token.secret at the root of the project. Note: You probably want to revoke this token from your account when you finish the audit.

Finally, run the auditor by passing the URL-friendly name ("login") of the organization you wish to audit:

node index.js [organization]

Results can be found in output/[organization].html.

Advanced

The creation of an audit has two distinct steps: retrieving information from the GitHub API, and creating an HTML report of the data. In between these steps, the data is saved in a JSON format (output/[organization].json) which you may use for your own purposes.

To run one step or the other individually, use:

node index.js retrieve [organization]
node index.js report [organization]