Thank you for your interest in contributing to the Risk Assessment Tool! We welcome contributions from the community.
- Code of Conduct
- Getting Started
- Development Setup
- How to Contribute
- Coding Standards
- Testing
- Pull Request Process
- Reporting Bugs
- Suggesting Enhancements
This project is maintained by Blacksmith InfoSec and we expect all contributors to be respectful and professional. Please be kind and constructive in all interactions.
- Fork the repository on GitHub
- Clone your fork locally
- Create a new branch for your feature or bugfix
- Make your changes
- Submit a pull request
- Node.js (LTS version recommended)
- npm (comes with Node.js)
# Clone your fork
git clone https://github.com/YOUR_USERNAME/risk-assessments.git
cd risk-assessments
# Install dependencies
npm install
# Start the development server
npm run devnpm run build- Build for productionnpm run start- Preview production build locallynpm run test- Run test suitenpm run test:watch- Run tests and reload with file changesnpm run lint- Run ESLint
We welcome various types of contributions:
- Bug fixes - Fix issues reported in GitHub Issues
- New features - Add new security checks or scanners
- Documentation - Improve README, comments, or add examples
- Tests - Add or improve test coverage
- Security improvements - Enhance security features
- UI/UX improvements - Make the tool more user-friendly
- Performance optimizations - Make the tool faster or more efficient
- Check if there's an existing issue for what you want to work on
- If not, create an issue describing your proposed changes
- Wait for feedback before investing significant time
- For major changes, discuss the approach first
- Use TypeScript for all new code
- Follow the existing code style (enforced by ESLint)
- Use meaningful variable and function names
- Prefer functional programming patterns
- Use React hooks appropriately
- Use functional components with hooks
- Keep components small and focused
- Extract reusable logic into custom hooks
- Use proper TypeScript types for props
- Follow accessibility best practices (ARIA labels, semantic HTML)
src/
├── components/ # React components
├── context/ # React context providers
├── data/ # Static data (questions, etc.)
├── types/ # TypeScript type definitions
├── utils/ # Utility functions
└── test-utils/ # Testing utilities
- Components: PascalCase (e.g.,
DomainScanner.tsx) - Utilities: camelCase (e.g.,
domainValidation.ts) - Types: PascalCase (e.g.,
DomainScanResult) - Constants: UPPER_SNAKE_CASE (e.g.,
MAX_REQUESTS_PER_WINDOW)
- Write tests for all new features and bug fixes
- Aim for high test coverage (we use Vitest)
- Test files should be co-located with the code:
component.test.tsx - Use descriptive test names that explain what's being tested
describe('ComponentName', () => {
beforeEach(() => {
// Setup
});
it('should do something specific', () => {
// Arrange
// Act
// Assert
});
});# Run all tests
npm test
# Run tests in watch mode
npm test -- --watch
# Run specific test file
npm test -- path/to/file.test.ts
# Generate coverage report
npm run test:watch-
Create a branch from
main:git checkout -b feature/your-feature-name # or git checkout -b fix/bug-description -
Make your changes:
- Write clean, well-documented code
- Add tests for new functionality
- Update documentation as needed
-
Ensure all checks pass:
npm run lint # Code style npm test # All tests npm run build # Production build
-
Commit your changes:
- Use clear, descriptive commit messages
- Reference issue numbers when applicable
git commit -m "feat: add domain validation for scanner input (#123)" -
Push to your fork:
git push origin feature/your-feature-name
-
Submit a Pull Request:
- Fill out the PR template completely
- Link related issues
- Provide clear description of changes
- Include screenshots for UI changes
- Maintainers will review your PR
- Address any requested changes
- Once approved, a maintainer will merge your PR
- Your contribution will be included in the next release!
- Check existing issues to avoid duplicates
- Verify you're using the latest version
- Test in a clean browser environment
Include:
- Clear title describing the issue
- Steps to reproduce the behavior
- Expected behavior vs actual behavior
- Screenshots if applicable
- Environment details:
- Browser and version
- Operating system
- Any relevant console errors
Example:
**Bug**: Domain scanner fails on internationalized domain names
**Steps to Reproduce**:
1. Navigate to Domain Scan page
2. Enter domain: münchen.de
3. Click "Run Scanners"
**Expected**: Scanner should process the domain
**Actual**: Error message "Invalid domain format"
**Environment**: Chrome 119, macOS 14.1We love new ideas! When suggesting enhancements:
- Check existing issues for similar suggestions
- Provide clear use case - explain the problem you're solving
- Describe the solution - what should the feature do?
- Consider alternatives - are there other approaches?
- Think about implementation - is it feasible?
**Feature Request**: Add HTTPS enforcement check
**Problem**: Users can't easily check if their site enforces HTTPS
**Proposed Solution**:
Add a new scanner that checks:
- HTTP to HTTPS redirect
- HSTS header presence
- HSTS preload status
**Alternatives Considered**:
- Could be part of existing security headers check
- Could use external API vs custom implementation
**Additional Context**:
This would help users identify mixed content issuesSince this is a security assessment tool, please:
- Validate all inputs - especially user-provided domains and JSON
- Sanitize outputs - prevent XSS in displayed results
- Consider privacy - all data should stay local to the browser
- Review dependencies - check for known vulnerabilities
- Follow secure coding practices - avoid common pitfalls
Do not open public issues for security vulnerabilities. Instead, please see our SECURITY.md for responsible disclosure.
- Open an issue for general questions
- Check existing issues and documentation first
- Be patient - this is a community-driven project
By contributing, you agree that your contributions will be licensed under the MIT License.
Your contributions make this tool better for everyone. We appreciate your time and effort! 🙏
Built with ❤️ by Blacksmith InfoSec