Thank you for your interest in contributing to the Patterns project! We appreciate your help in making this project better.
If you find a bug or have a suggestion for improvement:
- Check if the issue already exists in the Issues section.
- If not, create a new issue with a clear title and description.
- Include relevant details such as:
- Steps to reproduce (for bugs)
- Expected vs. actual behavior
- Your environment (OS, Python version, web server type)
We welcome pull requests! Here's how to submit one:
-
Fork the Repository
git clone https://github.com/YOUR_USERNAME/patterns.git cd patterns -
Create a Feature Branch
Use descriptive branch names following this convention:
feature/description- For new featuresfix/description- For bug fixesdocs/description- For documentation changesrefactor/description- For code refactoring
Example:
git checkout -b feature/add-caddy-support
-
Make Your Changes
- Write clear, concise commit messages
- Follow the existing code style and conventions
- Add comments where necessary
- Update documentation if you're changing functionality
-
Test Your Changes
Before submitting, ensure your code works correctly:
# Install dependencies pip install -r requirements.txt # Test the OWASP scraper python owasp2json.py # Test the converters python json2nginx.py python json2apache.py python json2traefik.py python json2haproxy.py # Test bad bot generation python badbots.py
For web server specific testing, check the respective workflow files in
.github/workflows/. -
Commit and Push
git add . git commit -m "feat: add support for Caddy web server" git push origin feature/add-caddy-support
-
Open a Pull Request
- Go to the original repository on GitHub
- Click "New Pull Request"
- Select your branch
- Provide a clear title and description of your changes
- Reference any related issues
- Use Python 3.11 or higher
- Follow PEP 8 style guidelines
- Use meaningful variable and function names
- Add docstrings to functions and classes
- Keep functions focused and modular
- Handle errors gracefully with try-except blocks
If you want to add support for a new web server:
- Create a new converter script:
json2WEBSERVER.py - Create output directory:
waf_patterns/WEBSERVER/ - Add README.md with integration instructions
- Update the main README.md to include the new web server
- Update the GitHub Actions workflow to include the new converter
- Add example configurations
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Contact the maintainers
Thank you for contributing!