An open API service indexing awesome lists of open source software.

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.

Awesome Lists containing this project

README

          

# GitHub User Audit


javscript-action status

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.

image

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).

image

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:

image
image
image

```
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)

image

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.

image