2023-11-11 00:25:45 +00:00
|
|
|
# GitMon
|
|
|
|
Monitor GitHub events and clone repositories to search for secrets, and more.
|
|
|
|
|
2023-11-11 16:21:56 +00:00
|
|
|
![Console output](.img/console-output.png)
|
|
|
|
|
2023-11-11 00:25:45 +00:00
|
|
|
## Overview
|
2023-11-11 00:41:20 +00:00
|
|
|
GitMon allows an operator to continually monitor the [GitHub Events API](https://docs.github.com/en/rest/activity/events)
|
|
|
|
to collect metadata and look for secret leakage.
|
2023-11-11 00:25:45 +00:00
|
|
|
|
|
|
|
When certain events such as _CreateEvent_ or _DeleteEvent_ are observed, GitMon
|
|
|
|
will send the repository URL to a worker that will clone the repository and
|
|
|
|
search for API keys, passwords, endpoints, and more.
|
|
|
|
|
|
|
|
GitMon will also build a table that maps commit email addresses to GitHub usernames.
|
|
|
|
|
2023-11-11 16:27:05 +00:00
|
|
|
## Installation
|
|
|
|
```shell
|
|
|
|
git clone https://git.juggalol.com/agatha/gitmon
|
|
|
|
cd gitmon
|
|
|
|
pip install -r requirements.txt
|
|
|
|
```
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
GitMon works best with a token. Without a token you are limited to 60 API calls per hour.
|
|
|
|
Creating and using a Personal Access Token will raise that limit to 60,000 API calls per hour.
|
|
|
|
|
|
|
|
To use a Personal Access Token, create a `config.py` file:
|
|
|
|
```
|
|
|
|
token = 'gh_YOUR_TOKEN_HERE'
|
|
|
|
```
|
|
|
|
|
2023-11-11 04:20:43 +00:00
|
|
|
## Caught Slippin'
|
|
|
|
![Deleted GitHub token](.img/slippin-ght.png)
|
|
|
|
|
|
|
|
![Cloud creds](.img/slippin-db.png)
|
|
|
|
|
2023-11-11 00:25:45 +00:00
|
|
|
## Contributors
|
|
|
|
- agathanonymous
|