Contributing Guidelines
Thank you for your interest in contributing to the BugBounty KSP platform! This document provides guidelines and instructions for contributing.
π― Ways to Contribute
There are many ways to contribute to this project:
- π Report bugs - Help us identify and fix issues
- π‘ Suggest features - Share ideas for new functionality
- π Improve documentation - Fix typos, add examples, clarify concepts
- π§ Submit code - Fix bugs, implement features, improve performance
- π§ͺ Write tests - Increase test coverage
- π¨ Design improvements - UI/UX enhancements
- π Translations - Help make the platform multilingual
π Getting Started
1. Fork the Repository
Click the βForkβ button at the top right of the repository page to create your own copy.
2. Clone Your Fork
git clone https://github.com/YOUR_USERNAME/YOUR_REPOSITORY.git
cd YOUR_REPOSITORY
3. Set Up Development Environment
Follow the Getting Started Guide to set up your development environment.
4. Create a Branch
Create a new branch for your contribution:
git checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix
Branch naming conventions:
feature/- New featuresfix/- Bug fixesdocs/- Documentation changesrefactor/- Code refactoringtest/- Test additions or changeschore/- Maintenance tasks
π» Development Workflow
Code Style
We use ESLint and Prettier to maintain consistent code style.
# Run linter
npm run lint
# Auto-fix issues
npm run lint:fix
# Format code
npm run format
Style Guidelines
TypeScript/JavaScript:
// β
Good
export function calculateReward(severity: Severity): number {
const rewardMap = {
critical: 5000,
high: 2000,
medium: 500,
low: 100,
};
return rewardMap[severity];
}
// β Bad
export function calc_reward(s) {
if (s === 'critical') return 5000;
if (s === 'high') return 2000;
if (s === 'medium') return 500;
return 100;
}
React Components:
// β
Good
interface ButtonProps {
label: string;
onClick: () => void;
variant?: 'primary' | 'secondary';
disabled?: boolean;
}
export const Button: React.FC<ButtonProps> = ({
label,
onClick,
variant = 'primary',
disabled = false,
}) => {
return (
<button
className={`btn btn-${variant}`}
onClick={onClick}
disabled={disabled}
>
{label}
</button>
);
};
Writing Tests
All new features and bug fixes should include tests.
// Example unit test
describe('calculateReward', () => {
it('should return correct reward for critical severity', () => {
expect(calculateReward('critical')).toBe(5000);
});
it('should return correct reward for high severity', () => {
expect(calculateReward('high')).toBe(2000);
});
it('should handle invalid severity gracefully', () => {
expect(() => calculateReward('invalid')).toThrow();
});
});
// Example integration test
describe('POST /api/reports', () => {
it('should create a new report', async () => {
const response = await request(app)
.post('/api/reports')
.set('Authorization', `Bearer ${token}`)
.send({
title: 'SQL Injection',
severity: 'critical',
description: 'Found SQL injection vulnerability',
});
expect(response.status).toBe(201);
expect(response.body.data).toHaveProperty('id');
});
it('should require authentication', async () => {
const response = await request(app)
.post('/api/reports')
.send({});
expect(response.status).toBe(401);
});
});
Run Tests
# Run all tests
npm test
# Run with coverage
npm run test:coverage
# Run specific test file
npm test -- path/to/test.spec.ts
# Run in watch mode
npm run test:watch
Commit Messages
We follow the Conventional Commits specification.
Format: <type>(<scope>): <subject>
Types:
feat- New featurefix- Bug fixdocs- Documentation changesstyle- Code style changes (formatting, etc.)refactor- Code refactoringtest- Test additions or changeschore- Maintenance tasksperf- Performance improvements
Examples:
git commit -m "feat(api): add report filtering by severity"
git commit -m "fix(auth): resolve JWT token expiration issue"
git commit -m "docs(readme): update installation instructions"
git commit -m "test(reports): add unit tests for report service"
π Pull Request Process
1. Update Your Branch
Before submitting, ensure your branch is up to date:
git checkout main
git pull upstream main
git checkout your-branch
git rebase main
2. Push Your Changes
git push origin your-branch
3. Create Pull Request
- Go to the original repository on GitHub
- Click βNew Pull Requestβ
- Select your branch
- Fill out the PR template
Pull Request Template
## Description
Brief description of the changes
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Changes Made
- Change 1
- Change 2
- Change 3
## Testing
Describe the tests you ran to verify your changes
## Screenshots (if applicable)
Add screenshots for UI changes
## Checklist
- [ ] My code follows the project's style guidelines
- [ ] I have performed a self-review of my code
- [ ] I have commented my code where necessary
- [ ] I have updated the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix/feature works
- [ ] New and existing unit tests pass locally
- [ ] Any dependent changes have been merged
Code Review Process
- Automated Checks - CI/CD pipeline runs tests and linters
- Peer Review - At least one maintainer reviews your code
- Address Feedback - Make requested changes
- Approval - Once approved, your PR will be merged
Review Criteria
Reviewers will check for:
- β Code quality and style
- β Test coverage
- β Documentation
- β Performance implications
- β Security considerations
- β Breaking changes
π Bug Reports
Before Submitting
- Search existing issues - Your bug might already be reported
- Test on latest version - Ensure the bug exists in the latest release
- Check documentation - Make sure itβs actually a bug
Bug Report Template
## Bug Description
Clear and concise description of the bug
## Steps to Reproduce
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
## Expected Behavior
What you expected to happen
## Actual Behavior
What actually happened
## Screenshots
If applicable, add screenshots
## Environment
- OS: [e.g. Ubuntu 22.04]
- Browser: [e.g. Chrome 120]
- Node version: [e.g. 18.19.0]
- Application version: [e.g. 1.2.3]
## Additional Context
Any other relevant information
π‘ Feature Requests
Feature Request Template
## Feature Description
Clear and concise description of the feature
## Problem Statement
What problem does this solve?
## Proposed Solution
Describe how you envision this working
## Alternatives Considered
What other solutions did you consider?
## Additional Context
Mockups, examples, or references
## Priority
- [ ] Critical
- [ ] High
- [ ] Medium
- [ ] Low
π Documentation Contributions
Documentation is as important as code! Hereβs how to contribute:
Types of Documentation
- Code Comments - Explain complex logic
- API Documentation - Document endpoints and parameters
- User Guides - Help users understand features
- Developer Guides - Help developers contribute
Documentation Style Guide
- Use clear, concise language
- Include code examples
- Add screenshots for UI features
- Keep it up to date
- Use proper markdown formatting
Updating Documentation
# Clone the documentation repository
git clone https://github.com/BugBounty-MockingBird/Documentation.git
cd Documentation
# Make changes in docs/ folder
# Submit PR following the same process as code contributions
π Security Issues
DO NOT open public issues for security vulnerabilities.
Instead, please email: security@bugbounty-ksp.com
Include:
- Description of the vulnerability
- Steps to reproduce
- Potential impact
- Suggested fix (if any)
We will respond within 48 hours and work with you to address the issue.
π€ Code of Conduct
Our Pledge
We are committed to providing a welcoming and inclusive environment for all contributors.
Expected Behavior
- β Be respectful and considerate
- β Welcome newcomers
- β Be collaborative
- β Accept constructive criticism gracefully
- β Focus on whatβs best for the community
Unacceptable Behavior
- β Harassment or discriminatory language
- β Personal attacks
- β Trolling or inflammatory comments
- β Publishing othersβ private information
- β Other unprofessional conduct
Enforcement
Violations may result in:
- Warning
- Temporary ban
- Permanent ban
Report violations to: conduct@bugbounty-ksp.com
π Learning Resources
For New Contributors
Project Resources
π Recognition
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in documentation
- Featured in community highlights
π Getting Help
If you need help:
- Documentation - Check our docs first
- Discord - Join our community server
- Discussions - Use GitHub Discussions
- Issues - Create an issue with the βquestionβ label
π Contributor License Agreement
By contributing, you agree that:
- Your contributions are your original work
- You have the right to submit your contributions
- Your contributions are licensed under the projectβs MIT License
- You grant the project maintainers the right to use your contributions
π Thank You!
Every contribution, no matter how small, makes a difference. Thank you for helping make BugBounty KSP better!
| β Deployment | Home |