Thanks for your interest in contributing to SploitGPT! This document provides guidelines for contributing.
- Fork the repository and clone your fork
- Set up the development environment:
git clone https://github.com/YOUR_USERNAME/SploitGPT.git cd SploitGPT python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
- Run tests to make sure everything works:
python -m pytest tests/ -v
-
Create a feature branch from
main:git checkout -b feature/your-feature-name
-
Make your changes and write tests
-
Run the test suite:
python -m pytest tests/ -v
-
Run the linter:
python -m ruff check sploitgpt/
-
Commit your changes with a descriptive message
-
Push and open a Pull Request
- We use Ruff for linting
- Follow PEP 8 guidelines
- Add type hints to function signatures
- Write docstrings for public functions and classes
sploitgpt/
βββ agent/ # AI agent logic and response handling
βββ core/ # Configuration, boot, audit, scope
βββ knowledge/ # RAG, MITRE ATT&CK, GTFOBins integration
βββ msf/ # Metasploit RPC client
βββ tools/ # Tool implementations (nuclei, shodan, etc.)
βββ training/ # Model training utilities
βββ tui/ # Terminal UI
To add a new security tool integration:
- Create a new file in
sploitgpt/tools/ - Implement the tool following the existing patterns
- Register it in
sploitgpt/tools/__init__.py - Add tests in
tests/test_tools_*.py - Update documentation if needed
- Write tests for new functionality
- Ensure existing tests pass
- Use pytest fixtures for common setup
- Mock external services (Ollama, Metasploit) in tests
When reporting issues, please include:
- OS and version
- Python version
- GPU info (if relevant)
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs or error messages
- Keep PRs focused on a single feature/fix
- Update tests and documentation
- Ensure CI passes
- Respond to review feedback promptly
If you discover a security vulnerability, please do not open a public issue. Instead, contact the maintainers directly.
By contributing, you agree that your contributions will be licensed under the MIT License.