https://github.com/gh-customer-success/github-user-audit
Uses the GitHub GraphQL API to run audits on users and their permissions to an organization's repositories.
https://github.com/gh-customer-success/github-user-audit
actions audit github github-actions graphql
Last synced: 2 months ago
JSON representation
Uses the GitHub GraphQL API to run audits on users and their permissions to an organization's repositories.
- Host: GitHub
- URL: https://github.com/gh-customer-success/github-user-audit
- Owner: gh-customer-success
- License: mit
- Created: 2023-03-23T20:57:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2026-01-26T21:47:39.000Z (5 months ago)
- Last Synced: 2026-03-27T13:12:18.089Z (3 months ago)
- Topics: actions, audit, github, github-actions, graphql
- Language: JavaScript
- Homepage:
- Size: 1.64 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 23
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Audit: audit.gql
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# GitHub User Audit
Uses the GitHub GraphQL API to run audits on users and their permissions to an organization's repositories.
Generates a summary for all permissions and their count.

An artifact is uploaded as a CSV file. This format is supported by most spreadsheet applications, such as Microsoft [Excel](https://www.microsoft.com/en-us/microsoft-365/excel).

Alternatively CSV files can be persisted in a NoSQL DB.
## Personal Access Token (classic)
An Oganization Admin can [generate](https://github.com/settings/tokens) a token with the following permissions:

```
repo
read:org
read:user
user:email
```
## Using the Action
This Action requires 2 inputs: a [variable](https://docs.github.com/en/actions/learn-github-actions/variables#creating-configuration-variables-for-a-repository) (Organization Name) and a secret (API Token)

Pass these values in your workflow file:
```yml
...
steps:
-
name: run audit
uses: gh-customer-success/github-user-audit@main
with:
api_token: ${{ secrets.MY_SECRET_TOEKN }}
owner: ${{ vars.MY_ORG_NAME }}
id: audit
...
```
When the run is successful you should see a Job Summary with the total number of users for each `permission` and an artifact that can be downloaded by clicking on its name.
