Thank you for your interest in contributing to Guardian! We welcome contributions from the security community.
- Be respectful and professional
- Focus on constructive feedback
- Help us maintain Guardian as an ethical security tool
- Follow responsible disclosure for security issues
- Check if the bug is already reported in Issues
- If not, create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Python version, tool versions)
- Relevant logs or screenshots
- Check Discussions for similar ideas
- Open a new discussion or issue describing:
- The problem you're trying to solve
- Your proposed solution
- Why this would benefit Guardian users
- Any implementation considerations
# Fork and clone
git clone https://github.com/zakirkun/guardian-cli.git
cd guardian-cli
# Create virtual environment
python -m venv venv
source venv/bin/activate # or .\venv\Scripts\activate on Windows
# Install in development mode
pip install -e ".[dev]"
# Install pre-commit hooks
pre-commit install-
Create a Branch
git checkout -b feature/your-feature-name # or git checkout -b fix/issue-number -
Make Changes
- Follow existing code style
- Add docstrings to functions/classes
- Update documentation if needed
- Add tests for new features
-
Test Your Changes
# Run tests pytest tests/ # Check code style black . --check flake8 # Type checking mypy .
-
Commit Changes
git add . git commit -m "feat: Add new feature" # or git commit -m "fix: Fix issue #123"
Commit Message Format:
feat:New featurefix:Bug fixdocs:Documentation changestest:Test additions/changesrefactor:Code refactoringstyle:Code style changeschore:Maintenance tasks
-
Push and Create PR
git push origin feature/your-feature-name
Then create a Pull Request on GitHub.
Add support for new pentesting tools:
- Create tool wrapper in
tools/ - Follow
BaseToolinterface - Add comprehensive parsing
- Include tests
- Update documentation
See TOOLS_DEVELOPMENT_GUIDE.md
Contribute workflow templates:
- Create YAML workflow in
workflows/ - Include clear objectives for each step
- Test on safe targets
- Document use cases
Enhance or create new AI agents:
- Follow
BaseAgentpattern - Add clear prompts
- Include reasoning extraction
- Test with various scenarios
Improve or add documentation:
- Fix typos and unclear sections
- Add usage examples
- Create tutorials
- Translate documentation
Expand test coverage:
- Unit tests for components
- Integration tests for workflows
- Mock external tool dependencies
- Edge case testing
- Follow PEP 8
- Use Black for formatting
- Maximum line length: 100 characters
- Use type hints where possible
def function_name(param1: str, param2: int) -> Dict[str, Any]:
"""
Brief description of function
Args:
param1: Description of param1
param2: Description of param2
Returns:
Description of return value
Raises:
ExceptionType: When this exception occurs
"""
pass- Classes:
PascalCase - Functions/methods:
snake_case - Constants:
UPPER_SNAKE_CASE - Private methods:
_leading_underscore
All new code should include unit tests:
import pytest
from tools.mytool import MyTool
def test_command_generation():
tool = MyTool(config={})
command = tool.get_command("example.com")
assert "mytool" in command
assert "example.com" in command
@pytest.mark.asyncio
async def test_execution():
tool = MyTool(config={})
result = await tool.execute("example.com")
assert result["exit_code"] == 0Mark integration tests appropriately:
@pytest.mark.integration
@pytest.mark.skip(reason="Requires tool installation")
def test_real_execution():
# Test with actual tool
pass- Never include real credentials or API keys
- Don't commit actual scan results
- Sanitize any example outputs
- Follow ethical testing principles
DO NOT open public issues for security vulnerabilities.
Instead:
- Email security@example.com
- Include detailed description
- Provide steps to reproduce
- Allow time for patch before disclosure
- Automated Checks: CI/CD runs tests and linters
- Code Review: Maintainers review your code
- Testing: Verify functionality works
- Documentation: Ensure docs are updated
- Merge: PR merged into main branch
- Questions: Use Discussions
- Bugs: Open an Issue
- Chat: Join our Discord (link TBD)
Contributors will be:
- Listed in CONTRIBUTORS.md
- Credited in release notes
- Thanked in the community
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for helping make Guardian better! 🛡️