Getting Started
Before contributing:- Review the documentation
- Search existing issues for similar problems or suggestions
- Set up your development environment
- Familiarize yourself with the codebase structure
Ways to Contribute
Contributions are valued in many forms:- Bug reports - Report issues you encounter
- Feature suggestions - Propose new functionality
- Code contributions - Submit bug fixes or new features
- Documentation - Improve guides and references
- Testing - Validate releases and report results
- Community support - Help other users
Legal Notice
Reporting Bugs
Before Submitting a Bug Report
Complete these steps before reporting a bug:- Use the latest version - Verify the bug exists in the most recent release
- Check documentation - Ensure it’s not a configuration issue
- Search existing issues - Check if the bug is already reported in the issue tracker
- Collect information:
- Stack trace or error messages
- Operating system and version
- Node.js, npm, and yarn versions
- Plugin version and OpenSearch Dashboards version
- Steps to reproduce
- Expected vs actual behavior
Submitting a Bug Report
Never report security vulnerabilities publicly. Send security-related bugs via email to the security team. See SECURITY.md.
- Clear title - Briefly describe the issue
- Reproduction steps - Detailed steps to reproduce the bug
- Expected behavior - What should happen
- Actual behavior - What actually happens
- Environment details - OS, versions, configuration
- Additional context - Screenshots, logs, code samples
After Submission
The project team will:- Label the issue appropriately
- Attempt to reproduce the issue
- Request additional information if needed (labeled
needs-repro) - Mark as
needs-fixif reproducible - Assign to a milestone for implementation
Suggesting Enhancements
Before Submitting an Enhancement
- Use the latest version - Feature may already exist
- Read documentation - Functionality might be available through configuration
- Search existing issues - Enhancement may already be suggested
- Consider scope - Ensure feature benefits majority of users
Submitting an Enhancement Suggestion
Create a new issue with:- Clear title - Describe the enhancement concisely
- Detailed description - Step-by-step explanation of the proposed feature
- Current behavior - What exists today
- Proposed behavior - What should exist and why
- Use cases - Real-world scenarios where this helps
- Alternatives considered - Other approaches you evaluated
- Additional context - Mockups, diagrams, examples from other projects
Code Contributions
Development Workflow
- Fork the repository on GitHub
- Clone your fork locally:
- Create a feature branch:
- Set up development environment (see Setup Guide)
-
Make your changes:
- Write code following the Style Guide
- Add tests for new functionality
- Update documentation as needed
- Test your changes:
- Commit your changes (see Commit Guidelines)
- Push to your fork:
- Open a pull request on GitHub
Docker Development Environments
The project provides Docker-based development environments in thedocker/ directory. These environments include:
- OpenSearch indexer
- Wazuh manager
- OpenSearch Dashboards development environment
- Optional Wazuh agents
- Supporting services (Imposter mock server, metrics exporters)
Style Guide
Follow the JavaScript style guide defined in STYLEGUIDE.md.Key Style Rules
Code Formatting
- Indentation: 2 spaces (never tabs)
- Line length: 100 characters maximum
- Newlines: UNIX-style (
\n) - Semicolons: Always use semicolons
- Quotes: Single quotes for strings (unless interpolating)
- Template literals: Use for string interpolation and multi-line strings
Variables
- Use
constby default - Use
letonly when reassignment is necessary - Never use
var
Functions
Naming Conventions
- Variables/functions:
lowerCamelCase - Classes:
UpperCamelCase - Constants:
lowerCamelCase(not UPPER_CASE) - Private methods: Prefix with underscore
_privateMethod
Destructuring
Modern JavaScript
- Use ES2015+ features (arrow functions, destructuring, spread operator)
- Avoid
forloops - use.map(),.filter(),.reduce() - Use async/await over Promise chains
- Use object/array spread over
Object.assign()or.slice()
Code Quality Tools
The project uses:- ESLint - JavaScript/TypeScript linting
- Prettier - Code formatting
- TypeScript - Type checking
Commit Messages
Follow these commit message guidelines:Format
Rules
- Separate subject from body with a blank line
- Limit subject line to 50 characters
- Capitalize the subject line
- No period at end of subject line
- Use imperative mood - “Add feature” not “Added feature”
- Wrap body at 72 characters
- Sign commits when possible
Examples
Commit Types
- Add: New feature or functionality
- Update: Enhancement to existing feature
- Fix: Bug fix
- Refactor: Code restructuring without behavior change
- Test: Adding or updating tests
- Docs: Documentation changes
- Style: Code style changes (formatting, etc.)
- Chore: Maintenance tasks (dependencies, build, etc.)
Pull Request Process
Before Opening a Pull Request
- Code follows the style guide
- Tests pass:
yarn test:jest - Linting passes:
yarn lint - Commits follow commit guidelines
- Branch is up to date with base branch
- Documentation is updated if needed
Pull Request Template
Provide this information in your PR:Review Process
After submission:- Automated checks run (CI/CD pipeline)
- Code review by maintainers
- Feedback provided through PR comments
- Revisions made based on feedback
- Approval by required reviewers
- Merge by maintainers
Testing Contributions
Ensure contributions include appropriate tests:- Unit tests for new functions and components
- Integration tests for component interactions
- Snapshot updates for UI changes
Documentation Contributions
Documentation improvements are highly valued:- Fix typos and grammatical errors
- Clarify confusing sections
- Add examples and use cases
- Improve code comments
- Update outdated information
README.md- Project overviewCONTRIBUTING.md- This guideSTYLEGUIDE.md- Code style referencedocs/- Detailed documentation
Community Guidelines
Be Respectful
- Use welcoming and inclusive language
- Respect differing viewpoints and experiences
- Accept constructive criticism gracefully
- Focus on what’s best for the community
Get Help
If you need assistance:- Join the Slack community
- Ask questions in GitHub Discussions
- Review existing documentation
Recognition
Contributors are recognized:- Listed in release notes for their contributions
- Mentioned in the project’s contributor list
- Acknowledged in relevant issue/PR discussions
Additional Resources
License
By contributing, you agree that your contributions will be licensed under the GNU General Public License v2.0.Thank you for contributing to Wazuh Dashboard Plugins!