Thank you for your interest in contributing to the Filigran XTM Browser Extension! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to abide by our Code of Conduct. Please be respectful and constructive in all interactions.
- Check existing issues first to avoid duplicates
- Use the bug report template when creating a new issue
- Include:
- Browser name and version
- Extension version
- Steps to reproduce
- Expected vs actual behavior
- Error messages from browser console (F12 → Console)
- Screenshots if applicable
- Check existing issues for similar suggestions
- Describe the use case - What problem does it solve?
- Provide examples of how the feature would work
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/xtm-browser-extension.git cd xtm-browser-extension - Install dependencies:
npm install
- Create a feature branch:
git checkout -b feature/my-feature
- Make your changes
- Write/update tests as needed
- Run tests:
npm test - Run linter:
npm run lint
- Build and test in browser:
npm run build:chrome
Use clear, descriptive commit messages:
<type>: <short description>
<optional longer description>
Types:
feat: New featurefix: Bug fixdocs: Documentation onlystyle: Code style (formatting, no logic change)refactor: Code refactoringtest: Adding/updating testschore: Maintenance tasks
Examples:
feat: Add support for MITRE ATT&CK sub-technique detection
fix: Prevent partial IP address matching in asset detection
docs: Update README with testing instructions
test: Add unit tests for MAC address pattern matching
- Update documentation if needed
- Ensure all tests pass
- Push to your fork:
git push origin feature/my-feature
- Create a Pull Request with:
- Clear title describing the change
- Description of what and why
- Reference to related issues (e.g., "Fixes #123")
- Screenshots for UI changes
- Use TypeScript for all new code
- Follow existing code patterns and naming conventions
- Use meaningful variable and function names
- Add JSDoc comments for public functions
- Keep functions focused and small
- Write unit tests for new utilities and patterns
- Write integration tests for API client changes
- Test in multiple browsers (Chrome, Firefox, Edge)
- Test with both OpenCTI and OpenAEV connections
src/
├── background/ # Background service worker only
├── content/ # Content script only
├── popup/ # Popup UI components
├── panel/ # Side panel components
├── options/ # Settings page components
└── shared/ # Shared code (API, types, utils)
- Keep component-specific code in component folders
- Put shared code in
shared/ - Don't import from other component folders (use messaging)
When modifying API clients:
- Update TypeScript interfaces in
shared/types/ - Update relevant tests in
tests/integration/ - Test against a running platform instance
- Document any new message types
When adding new observable patterns:
- Add pattern to
shared/detection/patterns.ts - Add unit tests in
tests/unit/patterns.test.ts - Test with real-world examples
- Consider false positives
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.