Skip to content

Inspired by seeing some projects with API keys left out. A basic SAST scanner to test on a GitHub repo and return security vulnerabilities that are found

Notifications You must be signed in to change notification settings

benj327/custom-SAST-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Security Analyzer

This tool is designed to analyze a GitHub repository for security vulnerabilities in Python code and dependencies. It uses the Bandit static code analysis tool to scan Python files and GitHub's GraphQL API to fetch dependency vulnerability alerts.

Installation

  1. Clone this repository:

git clone https://github.com/benj327/custom-SAST-tool

  1. Change to the project directory:

cd custom-SAST-tool

  1. Create a virtual environment and activate it:

For Unix or macOS:

python3 -m venv venv source venv/bin/activate

For Windows:

python -m venv venv .\venv\Scripts\activate

  1. Install the required dependencies:

pip install -r requirements.txt

  1. Create a config.py file with your GitHub API token:

apikey = "your-github-api-token"

Usage

Run the script with the following command:

python main.py [repo_url] --python

Replace [repo_url] with the URL of the GitHub repository you want to analyze.

Example:

python main.py https://github.com/yourusername/your-repo --python

This will analyze the specified repository and display the security issues found in the Python code and dependencies.

About

Inspired by seeing some projects with API keys left out. A basic SAST scanner to test on a GitHub repo and return security vulnerabilities that are found

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages