Contributing to Cyber-Zero
August 5, 2025 ยท View on GitHub
Thank you for your interest in contributing to Cyber-Zero! This document provides guidelines and information for contributors.
Table of Contents
- Getting Started
- Development Setup
- Code Style
- Testing
- Submitting Changes
- Reporting Issues
- Code of Conduct
Getting Started
- Fork the repository
- Clone your fork locally
- Create a new branch for your feature or fix
- Make your changes
- Test your changes
- Submit a pull request
Development Setup
Prerequisites
- Python 3.8+
- pip
- git
Installation
# Clone your fork
git clone https://github.com/YOUR_USERNAME/cyber-zero.git
cd cyber-zero
# Install dependencies
pip install -r requirements.txt
# Install the package in development mode
pip install -e .
Code Style
We follow PEP 8 style guidelines for Python code. Please ensure your code:
- Uses 4 spaces for indentation
- Has a maximum line length of 88 characters
- Includes proper docstrings for functions and classes
- Uses type hints where appropriate
Pre-commit Hooks
We recommend using pre-commit hooks to ensure code quality:
pip install pre-commit
pre-commit install
Testing
Before submitting changes, please ensure:
- All existing tests pass
- New tests are added for new functionality
- Code coverage is maintained or improved
Run tests with:
python -m pytest tests/
Submitting Changes
- Create a feature branch:
git checkout -b feature/your-feature-name - Make your changes: Write your code and tests
- Commit your changes: Use clear, descriptive commit messages
- Push to your fork:
git push origin feature/your-feature-name - Create a pull request: Provide a clear description of your changes
Commit Message Format
Use conventional commit format:
type(scope): description
[optional body]
[optional footer]
Examples:
feat(trajectory): add support for new CTF challenge typesfix(evaluation): resolve quality scoring bugdocs(readme): update installation instructions
Reporting Issues
When reporting issues, please include:
- Description: Clear description of the problem
- Steps to reproduce: Detailed steps to reproduce the issue
- Expected behavior: What you expected to happen
- Actual behavior: What actually happened
- Environment: OS, Python version, package versions
- Additional context: Any other relevant information
Code of Conduct
This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
Questions?
If you have questions about contributing, please:
- Check the documentation
- Search existing issues
- Create a new issue if your question isn't answered
Thank you for contributing to Cyber-Zero!