Before You Start
Bitwarden has comprehensive contributing documentation available at: contributing.bitwarden.com This official documentation includes:- Detailed contribution guidelines
- Code style requirements
- Architecture documentation
- Database migration guides
- PR review process
Bitwarden Server is licensed under the AGPL 3.0 license (see
LICENSE_AGPL.txt). By contributing, you agree that your contributions will be licensed under the same terms.Quick Start for Contributors
1
Fork and clone the repository
2
Set up your development environment
Follow the Local Development Setup guide to configure your environment.
3
Create a feature branch
feature/description- New featuresbugfix/description- Bug fixesrefactor/description- Code refactoringdocs/description- Documentation updates
4
Make your changes
Ensure your code follows the project’s:
5
Test your changes
6
Commit your changes
Use clear, descriptive commit messages:Commit message format:
- First line: Brief summary (50 chars or less)
- Blank line
- Detailed description of changes
- Reference issue numbers
7
Push and create a pull request
main branch.Pull Request Guidelines
PR Title
Use a clear, descriptive title:PR Description Template
Provide a comprehensive description:PR Size
Keep PRs focused and manageable: Ideal PR:- Single feature or bug fix
- 200-400 lines changed
- Easy to review
- Multiple features
- 1000+ lines changed
- Difficult to review
- Breaking it into smaller PRs
- Creating a tracking issue for the overall feature
- Linking PRs together
Code Review Process
What to Expect
- Automated Checks: CI/CD runs tests and linting
- Initial Review: Maintainer reviews within 1-2 weeks
- Feedback: You may receive change requests
- Updates: Address feedback and push updates
- Approval: Once approved, maintainers will merge
Responding to Feedback
CI/CD Checks
Your PR must pass:- Build - Code compiles successfully
- Tests - All unit and integration tests pass
- Linting - Code style checks pass
- Security Scan - No security vulnerabilities
Common Contribution Types
Bug Fixes
1
Verify the bug
Reproduce the issue locally and understand the root cause.
2
Write a failing test
Create a test that demonstrates the bug:
3
Fix the bug
Implement the fix and ensure the test passes.
4
Submit PR
Reference the issue number in your PR description.
New Features
1
Discuss first
For significant features, open an issue to discuss the approach before implementing.
2
Design the feature
- Identify affected entities
- Plan database changes
- Consider backward compatibility
3
Implement incrementally
- Database migration
- Repository layer
- Service layer
- API endpoints
- Tests
4
Document the feature
Update relevant documentation and add code comments.
Database Changes
See Database Migrations for detailed guidance. Checklist:- Migration script is idempotent
- Migration tested locally
- Backward compatible (if possible)
- Rollback plan documented
- All database providers supported (SQL Server, PostgreSQL, MySQL)
Documentation Updates
Documentation improvements are always welcome:- Fix typos and grammar
- Clarify confusing sections
- Add examples
- Update outdated information
Coding Standards
See the Code Style Guide for detailed guidelines.Key Points
C# Style:Git Workflow
Keeping Your Fork Updated
Handling Conflicts
Squashing Commits
Maintainers may ask you to squash commits:Pre-Commit Hooks
Enable automatic code formatting:dotnet format before each commit.
Testing Your Changes
Local Testing
Manual Testing
-
Start required services:
-
Run the API:
- Test your changes with a client application
Security Considerations
See Security Guidelines for detailed information. Never commit:- Passwords or API keys
.envfiles with real credentials- Secrets or private keys
- Personal information
- Authentication/authorization
- Encryption/decryption
- Password handling
- API key management
Reporting Security Vulnerabilities
DO NOT open public issues for security vulnerabilities. Instead:- Report via HackerOne
- Or email security concerns privately (see
SECURITY.md)
Community Guidelines
Code of Conduct
Be respectful, constructive, and professional:- Welcome newcomers
- Provide constructive feedback
- Be patient with questions
- Respect different opinions
Getting Help
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and general discussion
- Contributing Docs - https://contributing.bitwarden.com/
Recognition
Contributors are recognized in:- GitHub contributor graphs
- Release notes (for significant contributions)
- Community forums
License
By contributing to Bitwarden Server, you agree that your contributions will be licensed under the AGPL 3.0 License. Some components use the Bitwarden License - check the license header in files.Resources
- Official Contributing Docs: https://contributing.bitwarden.com/
- Community Forums: https://community.bitwarden.com/
- GitHub Issues: https://github.com/bitwarden/server/issues
- Trademark Guidelines:
TRADEMARK_GUIDELINES.md
Next Steps
- Local Development Setup - Set up your environment
- Code Style Guide - Learn the code standards
- Testing Guide - Write effective tests
- Security Guidelines - Understand security requirements