|
| 1 | +# Contributing to LDAPSentinel |
| 2 | + |
| 3 | +Thank you for your interest in contributing to **LDAPSentinel**! We welcome contributions of all kinds, including bug reports, feature requests, code contributions, documentation improvements, and more. Your involvement helps make this project better for everyone. |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +Please note that this project is governed by a [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). By participating, you agree to abide by its terms. Be respectful, considerate, and constructive in all interactions. |
| 8 | + |
| 9 | +## How to Contribute |
| 10 | + |
| 11 | +### Reporting Issues |
| 12 | + |
| 13 | +If you encounter any problems or have suggestions for improvement, please create an issue in the [GitHub Issues](https://github.com/your-username/LDAPSentinel/issues) section. Include as much detail as possible: |
| 14 | + |
| 15 | +- Steps to reproduce the issue |
| 16 | +- Expected behavior |
| 17 | +- Actual behavior |
| 18 | +- Any relevant logs or screenshots |
| 19 | + |
| 20 | +### Contributing Code |
| 21 | + |
| 22 | +We welcome code contributions, whether it’s fixing bugs, adding features, or improving existing functionality. To contribute code: |
| 23 | + |
| 24 | +1. **Fork the repository**: Click the "Fork" button on the repository page to create your own copy. |
| 25 | +2. **Clone your fork**: Use `git clone` to clone your fork to your local machine. |
| 26 | + |
| 27 | + ```bash |
| 28 | + git clone https://github.com/your-username/LDAPSentinel.git |
| 29 | + ``` |
| 30 | +3. **Create a new branch**: Create a branch for your changes. |
| 31 | + |
| 32 | + ```bash |
| 33 | + git checkout -b feature-or-bugfix-description |
| 34 | + ``` |
| 35 | +4. **Make your changes**: Modify the code or documentation as needed. |
| 36 | +5. **Run tests**: Ensure your changes pass all existing tests and add new ones if necessary. |
| 37 | +6. **Commit your changes**: Write a clear and descriptive commit message. |
| 38 | + |
| 39 | + ```bash |
| 40 | + git commit -m "Brief description of your changes" |
| 41 | + ``` |
| 42 | +7. **Push your branch**: Push your branch to your forked repository. |
| 43 | + |
| 44 | + ```bash |
| 45 | + git push origin feature-or-bugfix-description |
| 46 | + ``` |
| 47 | +8. **Submit a pull request**: Go to the original repository and create a pull request. Describe your changes in detail and link to any relevant issues. |
| 48 | + |
| 49 | +### Setting Up the Environment |
| 50 | + |
| 51 | +To set up the development environment for **LDAPSentinel**: |
| 52 | + |
| 53 | +1. Ensure you have [Zeek](https://zeek.org) installed (version 6.0 or earlier). |
| 54 | +2. Install the [spicy-ldap](https://github.com/zeek/spicy-analyzers) package for parsing LDAP traffic. |
| 55 | +3. Clone this repository and navigate to the project directory. |
| 56 | +4. Load the `main.zeek` script into your Zeek instance for testing. |
| 57 | + |
| 58 | +### Testing |
| 59 | + |
| 60 | +Tests are located in the `tests/` directory. To run the tests: |
| 61 | + |
| 62 | +1. Use the provided `.pcap` files to simulate LDAP traffic. |
| 63 | +2. Run Zeek with the test configuration: |
| 64 | + |
| 65 | + ```bash |
| 66 | + zeek -r tests/sample_ldap_traffic.pcap scripts/__load__.zeek |
| 67 | + ``` |
| 68 | +3. Verify the output matches expected results in the `tests/basic.test` file. |
| 69 | + |
| 70 | +### Submitting Contributions |
| 71 | + |
| 72 | +Before submitting your contributions, ensure the following: |
| 73 | + |
| 74 | +- Your code adheres to the project’s style guidelines. |
| 75 | +- Your changes are well-documented. |
| 76 | +- All tests pass, and new tests have been added for new functionality. |
| 77 | + |
| 78 | +### Style Guidelines |
| 79 | + |
| 80 | +- Follow Zeek scripting conventions for clarity and maintainability. |
| 81 | +- Use meaningful variable and function names. |
| 82 | +- Write concise and descriptive comments where necessary. |
| 83 | +- Keep commit messages clear and concise. |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +Thank you for contributing to **LDAPSentinel**! Your support and collaboration are greatly appreciated. |
0 commit comments