Code Security Vulnerabilities Scanner
GuardAI
GuardAI leverages multiple AI models, including OpenAI, Gemini, and custom self-hosted AI servers, to scan code for security vulnerabilities. It is designed to integrate seamlessly into CI/CD pipelines, such as GitHub Actions, allowing developers to automatically analyze their code for potential security issues during the development process.
Full Demo: https://github.com/codeguardai/demo
Features
-
Multi-AI Model Support:
- OpenAI Integration: Scan your code using OpenAI's powerful models like GPT-4 to identify potential security vulnerabilities.
- Gemini Integration: Leverage Gemini's capabilities to analyze code for security risks.
- Groq Integration: Uses Groq's Fast AI Inference
- Custom AI Server Integration: Connect to a self-hosted or privately hosted AI server to perform security scans, allowing for fully customizable and self-hosted AI solutions.
-
CI/CD Integration:
- Easily integrate the CLI tool into GitHub Actions, enabling automated code scanning for security vulnerabilities on every pull request.
- Provides support for running scans on specific branches or changes in a repository.
-
Flexible Scanning Options:
- Full Directory Scans: Analyze all files within a directory for comprehensive security analysis.
- PR-Specific Scans: Focus on files changed in a specific pull request to streamline the scanning process and reduce overhead.
Getting Started
Prerequisites
- Python 3.10 or higher
- API keys for the supported AI models:
- OpenAI API key
- Gemini API key
- Groq API key
- Access to a custom AI server (host, port, and optional token)
Installation
Option 1: Install via pip
You can install the tool directly from the repository using pip:
pip install guardai
This will allow you to use the guardai command directly in your terminal.
Option 2: Clone the Repository
If you prefer to clone the repository and install the dependencies manually:
git clone https://github.com/codeguardai/guardai.git
cd guardai
pip install -r requirements.txt
pip install -r requirements-dev.txt
Usage
Scanning a Directory
To scan all files within a directory:
guardai --provider openai --directory path/to/your/code
Scanning with a Custom AI Server
To scan code using a custom AI server:
guardai --provider custom --host http://localhost --port 5000 --token your_token --directory path/to/your/code
Supported AI Providers
- OpenAI: Leverages GPT models for detailed security analysis.
- Gemini: Provides robust security analysis using Gemini's capabilities.
- Custom: Integrates with a self-hosted or privately hosted AI server, allowing for fully customizable solutions.
Future Work
-
Caching Implementation: A caching mechanism to store results of previously scanned files, reducing the number of API calls and optimizing performance.
-
Expanded Git Provider Support: The tool is currently integrated with GitHub for PR-based scanning, future plans include extending support to other Git providers like GitLab, Bitbucket, and Azure Repos.
Contributing
Contributions are welcome! Please fork the repository and submit a pull request with your improvements.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for guardai 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| guardai-0.2.0.tar.gz | 12.6 kB | Without provenance | Details for guardai-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| guardai-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for guardai-0.2.0-py3-none-any.whl |
Total release size: 22.0 kB
Release files / guardai-0.2.0.tar.gz
| Download URL | guardai-0.2.0.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98562e6207161312fa43c307cbe0dd6d30d0e7f41922a3f3f62e076676146b70
|
|
BLAKE2b-256 checksum How to use checksums |
702c3643ff2a8139fabf026d0f4aec1c629f0afdd2f819c6838b48273f3437d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.14
|
Release files / guardai-0.2.0-py3-none-any.whl
| Download URL | guardai-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
29e2127cc6480edb4ae9ec3620c00e4237a06ede9a71228110c49512b1b79731
|
|
BLAKE2b-256 checksum How to use checksums |
20815edc407b81aac2a3081348281d4c7df4f36eac93919e8a8cc9816c9f0617
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.14
|
Security for guardai 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.