-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 03ca772
Showing
3,765 changed files
with
545,683 additions
and
0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
AGPL-3.0 License | ||
|
||
The GNU Affero General Public License (AGPL) version 3.0, or any later version, applies to this software. | ||
|
||
This software is free to use, modify, and distribute under the terms of the AGPL-3.0 License. For the full text of the license, please visit: | ||
|
||
https://www.gnu.org/licenses/agpl-3.0.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
include README.md | ||
include setup.cfg | ||
recursive-include aigraphcodescan * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# AIGraphCodeScan | ||
|
||
**AIGraphCodeScan** is a tool designed for performing security reviews of codebases using graph analysis. The package utilizes Neo4j and Fast GraphRAG to query and visualize relationships within the code, helping identify potential security risks and vulnerabilities by analyzing the structure and flow of the code. | ||
|
||
## Features | ||
|
||
- **Graph-based Code Analysis**: Leverages graph theory to analyze code relationships and interactions. | ||
- **Neo4j Integration**: Stores and queries code structure and data flow in a Neo4j graph database. | ||
- **Security Review**: Helps identify potential security vulnerabilities based on the code's structure and relationships. | ||
|
||
## Installation | ||
|
||
### Prerequisites | ||
|
||
Ensure you have Python 3.6 or higher installed. You will also need a Neo4j instance running to store and query code-related data. | ||
|
||
### Installation Steps | ||
|
||
Clone the repository and install the required dependencies: | ||
|
||
```bash | ||
git clone https://github.com/tcosolutions/aigraphcodescan.git | ||
cd aigraphcodescan | ||
pip install -e . | ||
``` | ||
|
||
### Requirements | ||
|
||
- Python 3.6+ | ||
- `neo4j >= 4.0.0` | ||
- `fast_graphrag >= 0.1.0` | ||
- `argparse`, `logging`, `json` | ||
|
||
## Usage | ||
|
||
Once installed, you can use the `aigraphcodescan` command to run the security review. | ||
|
||
```bash | ||
aigraphcodescan --debug | ||
``` | ||
|
||
The command will start the graph-based security review process. The `--debug` option enables more detailed logging output. | ||
|
||
## Example Workflow | ||
|
||
1. **Run the security scan**: Use the `aigraphcodescan` command to analyze your codebase. | ||
2. **Review findings**: Based on the graph analysis, the tool will provide insights into potential security vulnerabilities, such as unexpected interactions between modules, exposed endpoints, or insecure data flows. | ||
3. **Improve your code**: Use the output to guide security improvements in your codebase. | ||
|
||
## Contributing | ||
|
||
We welcome contributions to **AIGraphCodeScan**. If you find a bug or have a suggestion, please open an issue or submit a pull request. | ||
|
||
## License | ||
|
||
This project is licensed under the AGPL 3.0 License - see the [LICENSE](LICENSE) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Metadata-Version: 2.1 | ||
Name: aigraphcodescan | ||
Version: 1.1.5 | ||
Summary: A tool for security review of code using graph-based analysis | ||
Home-page: https://github.com/tcosolutions/aigraphcodescan | ||
Author: Marcin Kozlowski | ||
Author-email: [email protected] | ||
License: AGPL 3.0 | ||
Classifier: Programming Language :: Python :: 3 | ||
Classifier: License :: OSI Approved :: MIT License | ||
Classifier: Operating System :: OS Independent | ||
Description-Content-Type: text/markdown | ||
License-File: LICENSE | ||
|
||
# AIGraphCodeScan | ||
|
||
**AIGraphCodeScan** is a tool designed for performing security reviews of codebases using graph analysis. The package utilizes Neo4j and Fast GraphRAG to query and visualize relationships within the code, helping identify potential security risks and vulnerabilities by analyzing the structure and flow of the code. | ||
|
||
## Features | ||
|
||
- **Graph-based Code Analysis**: Leverages graph theory to analyze code relationships and interactions. | ||
- **Neo4j Integration**: Stores and queries code structure and data flow in a Neo4j graph database. | ||
- **Security Review**: Helps identify potential security vulnerabilities based on the code's structure and relationships. | ||
|
||
## Installation | ||
|
||
### Prerequisites | ||
|
||
Ensure you have Python 3.6 or higher installed. You will also need a Neo4j instance running to store and query code-related data. | ||
|
||
### Installation Steps | ||
|
||
Clone the repository and install the required dependencies: | ||
|
||
```bash | ||
git clone https://github.com/tcosolutions/aigraphcodescan.git | ||
cd aigraphcodescan | ||
pip install -e . | ||
``` | ||
|
||
### Requirements | ||
|
||
- Python 3.6+ | ||
- `neo4j >= 4.0.0` | ||
- `fast_graphrag >= 0.1.0` | ||
- `argparse`, `logging`, `json` | ||
|
||
## Usage | ||
|
||
Once installed, you can use the `aigraphcodescan` command to run the security review. | ||
|
||
```bash | ||
aigraphcodescan --debug | ||
``` | ||
|
||
The command will start the graph-based security review process. The `--debug` option enables more detailed logging output. | ||
|
||
## Example Workflow | ||
|
||
1. **Run the security scan**: Use the `aigraphcodescan` command to analyze your codebase. | ||
2. **Review findings**: Based on the graph analysis, the tool will provide insights into potential security vulnerabilities, such as unexpected interactions between modules, exposed endpoints, or insecure data flows. | ||
3. **Improve your code**: Use the output to guide security improvements in your codebase. | ||
|
||
## Contributing | ||
|
||
We welcome contributions to **AIGraphCodeScan**. If you find a bug or have a suggestion, please open an issue or submit a pull request. | ||
|
||
## License | ||
|
||
This project is licensed under the AGPL 3.0 License - see the [LICENSE](LICENSE) file for details. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
LICENSE | ||
MANIFEST.in | ||
README.md | ||
pyproject.toml | ||
setup.cfg | ||
aigraphcodescan/src/aigraphcodescan/__main__.py | ||
aigraphcodescan/src/aigraphcodescan/app.py | ||
aigraphcodescan/src/aigraphcodescan.egg-info/PKG-INFO | ||
aigraphcodescan/src/aigraphcodescan.egg-info/SOURCES.txt | ||
aigraphcodescan/src/aigraphcodescan.egg-info/dependency_links.txt | ||
aigraphcodescan/src/aigraphcodescan.egg-info/entry_points.txt | ||
aigraphcodescan/src/aigraphcodescan.egg-info/top_level.txt |
1 change: 1 addition & 0 deletions
1
aigraphcodescan/src/aigraphcodescan.egg-info/dependency_links.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
2 changes: 2 additions & 0 deletions
2
aigraphcodescan/src/aigraphcodescan.egg-info/entry_points.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[console_scripts] | ||
aigraphcodescan = aigraphcodescan.__main__:main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
# src/aigraphcodescan/__main__.py | ||
from .app import main | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
|
||
# src/aigraphcodescan/app.py | ||
import json | ||
import os | ||
import uuid | ||
import logging | ||
import argparse | ||
from neo4j import GraphDatabase | ||
from fast_graphrag import GraphRAG | ||
|
||
def get_logger(): | ||
parser = argparse.ArgumentParser(description="Run graph extraction.") | ||
parser.add_argument('--debug', action='store_true', help='Enable debug logging') | ||
args, unknown = parser.parse_known_args() | ||
|
||
# Default level is ERROR, no normal logs or debug logs unless --debug is used | ||
logging_level = logging.DEBUG if args.debug else logging.ERROR | ||
logging.basicConfig(level=logging_level) | ||
|
||
# Main logic that could be executed by __main__.py | ||
def main(): | ||
get_logger() | ||
print("Running graph extraction logic...") | ||
|
||
# Placeholder for your actual logic |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
[metadata] | ||
name = aigraphcodescan | ||
version = 1.1.5 | ||
author = Marcin Kozlowski | ||
author_email = [email protected] | ||
description = A tool for security review of code using graph-based analysis | ||
long_description = file: README.md | ||
long_description_content_type = text/markdown | ||
license = AGPL 3.0 | ||
url = https://github.com/tcosolutions/aigraphcodescan | ||
classifiers = | ||
Programming Language :: Python :: 3 | ||
License :: OSI Approved :: MIT License | ||
Operating System :: OS Independent | ||
|
||
[options] | ||
packages = find: | ||
package_dir = | ||
= aigraphcodescan/src | ||
[options.packages.find] | ||
where = src | ||
|
||
|
||
|
||
|
||
python_requires = >=3.6 | ||
install_requires = | ||
neo4j >= 4.0.0 | ||
fast_graphrag >= 0.0.4 | ||
logging | ||
argparse | ||
|
||
[options.entry_points] | ||
console_scripts = | ||
aigraphcodescan = aigraphcodescan.__main__:main |
Oops, something went wrong.