updated README
This commit is contained in:
parent
1cad648e4f
commit
2eb947bb0f
1 changed files with 58 additions and 12 deletions
70
README.md
70
README.md
|
@ -1,12 +1,15 @@
|
||||||
# GitHub Searcher
|
# GitHub Searcher
|
||||||
|
|
||||||
GitHub Searcher is a command-line tool to search for PoC exploits for CVEs and security vulnerabilities in open-source software on GitHub. It allows you to search repositories, users, and repository names, and optionally fetch open issues and repository contents.
|
GitHub Searcher is a command-line tool to search GitHub repositories and users for PoC exploits and CVEs. It supports various search types and can output results in JSON format.
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
- Search GitHub repositories, users, and repository names.
|
- Search GitHub repositories by query.
|
||||||
- Fetch open issues of a repository.
|
- Search GitHub users by query.
|
||||||
- Fetch contents of a repository.
|
- Search within repository names.
|
||||||
|
- Retrieve open issues and pull requests for repositories.
|
||||||
|
- Retrieve file contents for repositories.
|
||||||
|
- Output results in JSON format.
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
@ -16,24 +19,67 @@ GitHub Searcher is a command-line tool to search for PoC exploits for CVEs and s
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
1. Clone the repository:
|
1. Clone the repository:
|
||||||
```bash
|
```sh
|
||||||
git clone https://git.mcdevitt.tech/bpmcdevitt/github_searcher.git
|
git clone https://github.com/yourusername/github_searcher.git
|
||||||
cd github_searcher
|
cd github_searcher
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Install the required dependencies:
|
2. Install the required dependencies:
|
||||||
```bash
|
```sh
|
||||||
pip install PyGithub
|
pip install PyGithub
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Set your GitHub access token as an environment variable:
|
3. Set the `GITHUB_ACCESS_TOKEN` environment variable with your GitHub access token:
|
||||||
```bash
|
```sh
|
||||||
export GITHUB_ACCESS_TOKEN=your_access_token
|
export GITHUB_ACCESS_TOKEN=your_access_token
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Run the script with the required arguments:
|
```sh
|
||||||
|
python github_searcher.py --query QUERY --search_type SEARCH_TYPE [--get_file_contents] [--get_open_issues] [--get_open_pull_requests] [--json]
|
||||||
|
```
|
||||||
|
|
||||||
```bash
|
### Arguments
|
||||||
python3 github_searcher.py --query=<query> --search_type=<search_type> [--get_open_issues] [--get_file_contents]
|
|
||||||
|
- `--query`: The search query (required).
|
||||||
|
- `--search_type`: The type of search to perform (required). Choices are:
|
||||||
|
- `repo`: Search repositories.
|
||||||
|
- `users`: Search users.
|
||||||
|
- `in-repo-name`: Search within repository names.
|
||||||
|
- `--get_file_contents`: Get the contents of repository results (optional).
|
||||||
|
- `--get_open_issues`: Get the open issues of repository results (optional).
|
||||||
|
- `--get_open_pull_requests`: Get the open pull requests of repository results (optional).
|
||||||
|
- `--json`: Output the results in JSON format (optional).
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
1. Search repositories with a query:
|
||||||
|
```sh
|
||||||
|
python github_searcher.py --query "machine learning" --search_type repo
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Search users with a query:
|
||||||
|
```sh
|
||||||
|
python github_searcher.py --query "john doe" --search_type users
|
||||||
|
```
|
||||||
|
|
||||||
|
3. Search within repository names:
|
||||||
|
```sh
|
||||||
|
python github_searcher.py --query "tensorflow" --search_type in-repo-name
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Get open issues and pull requests for repositories:
|
||||||
|
```sh
|
||||||
|
python github_searcher.py --query "machine learning" --search_type repo --get_open_issues --get_open_pull_requests
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Output results in JSON format:
|
||||||
|
```sh
|
||||||
|
python github_searcher.py --query "machine learning" --search_type repo --json
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Use Docker Compose to search for a specific CVE-ID and output results to a file:
|
||||||
|
```sh
|
||||||
|
docker-compose run --rm app python3 /usr/src/app/github_searcher.py --query=CVE-2024-5932 --search_type=in-repo-name --get_open_issues --get_open_pull_requests --get_file_contents --json > cve-2024-5932
|
||||||
|
```
|
Loading…
Add table
Reference in a new issue