CyberGuard is an agent designed to enhance the security of your Python code. Leveraging the power of E2B, Fireworks and Qdrant, CyberGuard identifies potential security vulnerabilities, automatically fixes them, and verifies the fixes through comprehensive testing. T
- Vulnerability Detection: Automatically scans your Python code to identify potential security = vulnerabilities.
- Automated Fixes: Suggests and applies fixes to the detected vulnerabilities, ensuring your code adheres to best security practices.
- Testing & Verification: Runs automated tests to verify that the fixes are effective and that the code remains functional.
- Install dependencies
uv sync --frozen
- Create a .env file in the project root with the following content:
FIREWORK_API_KEY=
E2B_API_KEY=
QDRANT_API_KEY=
QDRANT_URL=
- Run the application
uv run streamlit run main.py
- Open your browser and navigate to http://localhost:8501 to access the CyberGuard interface.
-
Access the Interface Upon running the application, you'll be presented with the CyberGuard UI.
-
Input Code: Paste your Python code into the chat input.
-
Analyze: The agent will analyze the code for vulnerabilities, suggest fixes, and run tests.
-
View Results: Review the vulnerabilities detected, the fixes applied, and the results of the tests to ensure your code is secure and functional.
-
Buffer overflow
void vulnerable_function(char *input) { char buffer[10]; strcpy(buffer, input); // Unsafe copy }
-
Race condition
import threading
shared_resource = 0
def increment(): global shared_resource for _ in range(100000): shared_resource += 1
thread1 = threading.Thread(target=increment) thread2 = threading.Thread(target=increment)
thread1.start() thread2.start() thread1.join() thread2.join()
print(shared_resource) # May not be as expected due to race conditions