GuardAI


NameGuardAI JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA CLI tool for AI-powered code security scanning
upload_time2024-08-16 06:22:30
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords security ai cli code scanning
VCS
bugtrack_url
requirements openai PyGithub requests google-generativeai ipython
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

## 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.
  - **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
  - 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:

```bash
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:

```bash
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:

```bash
guardai --provider openai --directory path/to/your/code
```

#### Scanning with a Custom AI Server

To scan code using a custom AI server:

```bash
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](LICENSE) file for details.

## Contact

For any inquiries or support, please contact [Best Olunusi](mailto:olunusibest@gmail.com).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "GuardAI",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "security, ai, cli, code scanning",
    "author": null,
    "author_email": "Best Olunusi <olunusibest@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/48/ba/d6d8f4f2f8b547c1c3cf8fe2716b2deade6a51286f658c52c89284e97d77/guardai-0.1.0.tar.gz",
    "platform": null,
    "description": "# GuardAI\n\nGuardAI 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.\n\n## Features\n\n- **Multi-AI Model Support:**\n\n  - **OpenAI Integration:** Scan your code using OpenAI's powerful models like GPT-4 to identify potential security vulnerabilities.\n  - **Gemini Integration:** Leverage Gemini's capabilities to analyze code for security risks.\n  - **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.\n\n- **CI/CD Integration:**\n\n  - Easily integrate the CLI tool into GitHub Actions, enabling automated code scanning for security vulnerabilities on every pull request.\n  - Provides support for running scans on specific branches or changes in a repository.\n\n- **Flexible Scanning Options:**\n  - **Full Directory Scans:** Analyze all files within a directory for comprehensive security analysis.\n  - **PR-Specific Scans:** Focus on files changed in a specific pull request to streamline the scanning process and reduce overhead.\n\n## Getting Started\n\n### Prerequisites\n\n- Python 3.10 or higher\n- API keys for the supported AI models:\n  - OpenAI API key\n  - Gemini API key\n  - Access to a custom AI server (host, port, and optional token)\n\n### Installation\n\n#### Option 1: Install via pip\n\nYou can install the tool directly from the repository using pip:\n\n```bash\npip install guardai\n```\n\nThis will allow you to use the `guardai` command directly in your terminal.\n\n#### Option 2: Clone the Repository\n\nIf you prefer to clone the repository and install the dependencies manually:\n\n```bash\ngit clone https://github.com/codeguardai/guardai.git\ncd guardai\npip install -r requirements.txt\npip install -r requirements-dev.txt\n```\n\n### Usage\n\n#### Scanning a Directory\n\nTo scan all files within a directory:\n\n```bash\nguardai --provider openai --directory path/to/your/code\n```\n\n#### Scanning with a Custom AI Server\n\nTo scan code using a custom AI server:\n\n```bash\nguardai --provider custom --host http://localhost --port 5000 --token your_token --directory path/to/your/code\n```\n\n### Supported AI Providers\n\n- **OpenAI:** Leverages GPT models for detailed security analysis.\n- **Gemini:** Provides robust security analysis using Gemini's capabilities.\n- **Custom:** Integrates with a self-hosted or privately hosted AI server, allowing for fully customizable solutions.\n\n## Future Work\n\n- **Caching Implementation:** A caching mechanism to store results of previously scanned files, reducing the number of API calls and optimizing performance.\n\n- **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.\n\n## Contributing\n\nContributions are welcome! Please fork the repository and submit a pull request with your improvements.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## Contact\n\nFor any inquiries or support, please contact [Best Olunusi](mailto:olunusibest@gmail.com).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A CLI tool for AI-powered code security scanning",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/codeguardai/guardai"
    },
    "split_keywords": [
        "security",
        " ai",
        " cli",
        " code scanning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b27740ece7d4962a88a06e29bd461fb3188ad1a3600bd393fa486063ef0a23a1",
                "md5": "90a03dc0995f8afead9dd1c7742bd80f",
                "sha256": "bf5822e1bd4c15cf0c609af6eedf1b407a31c441b6b6572defca7473f8733613"
            },
            "downloads": -1,
            "filename": "GuardAI-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "90a03dc0995f8afead9dd1c7742bd80f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 8908,
            "upload_time": "2024-08-16T06:22:28",
            "upload_time_iso_8601": "2024-08-16T06:22:28.379841Z",
            "url": "https://files.pythonhosted.org/packages/b2/77/40ece7d4962a88a06e29bd461fb3188ad1a3600bd393fa486063ef0a23a1/GuardAI-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48bad6d8f4f2f8b547c1c3cf8fe2716b2deade6a51286f658c52c89284e97d77",
                "md5": "3cf5a06eaacb1093c2977566f0cb885b",
                "sha256": "ec8bbfd060358e52bd72bd220c120c50693eb059b9b024abcfac02b7456afff3"
            },
            "downloads": -1,
            "filename": "guardai-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3cf5a06eaacb1093c2977566f0cb885b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 10321,
            "upload_time": "2024-08-16T06:22:30",
            "upload_time_iso_8601": "2024-08-16T06:22:30.035861Z",
            "url": "https://files.pythonhosted.org/packages/48/ba/d6d8f4f2f8b547c1c3cf8fe2716b2deade6a51286f658c52c89284e97d77/guardai-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-16 06:22:30",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "codeguardai",
    "github_project": "guardai",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "openai",
            "specs": [
                [
                    "==",
                    "1.40.8"
                ]
            ]
        },
        {
            "name": "PyGithub",
            "specs": [
                [
                    "==",
                    "2.3.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "google-generativeai",
            "specs": [
                [
                    "==",
                    "0.7.2"
                ]
            ]
        },
        {
            "name": "ipython",
            "specs": [
                [
                    "==",
                    "8.26.0"
                ]
            ]
        }
    ],
    "lcname": "guardai"
}
        
Elapsed time: 2.85978s