Beginner's Guide to Contributing

Welcome to the Regex Intelligence Exchange by Infopercept! This guide will help you get started contributing to our open-source project, even if you're new to security research or open-source development.

What is this project?

The Regex Intelligence Exchange by Infopercept is a collection of regex patterns used to identify software versions from various sources like HTTP headers, file contents, network responses, and more. These patterns are used by security tools to:

How to Contribute

Step 1: Fork the Repository

Start by forking our repository on GitHub. This creates your own copy where you can make changes without affecting the main project.

  1. Visit our GitHub repository
  2. Click the "Fork" button in the top right corner
  3. Choose your GitHub account as the destination for the fork

Step 2: Clone Your Fork

Clone your forked repository to your local machine:

git clone https://github.com/YOUR-USERNAME/Regex-Intelligence-Exchange-by-Infopercept.git
cd regex-intelligence-exchange

Step 3: Create a New Branch

Create a new branch for your work to keep changes organized:

git checkout -b add-my-new-pattern

Step 4: Research Your Pattern

Before creating a pattern, conduct thorough research:

  • Identify the software you want to detect
  • Find examples of how it reports its version
  • Look for official documentation about version reporting
  • Consider different deployment scenarios (cloud, on-premise, containers)

Step 5: Create Your Pattern File

Create a new pattern file in the appropriate vendor directory:

  1. Navigate to the patterns/by-vendor/ directory
  2. Find or create the appropriate vendor directory
  3. Create a new JSON file using the product name (e.g., nginx.json)
  4. Use our pattern template as a starting point

Step 6: Add Test Cases

Every pattern must include test cases to validate its accuracy:

  • Add positive test cases with expected version matches
  • Include negative test cases that should not match
  • Cover various version formats for the product
  • Test edge cases and unusual version strings

Step 7: Validate Your Pattern

Use our validation tool to check your pattern:

python tools/validate-new-pattern.py patterns/by-vendor/vendor-name/product-name.json

Fix any issues that the validation tool reports.

Step 8: Commit and Push Your Changes

git add patterns/by-vendor/vendor-name/product-name.json
git commit -m "feat: Add pattern for PRODUCT version detection"
git push origin add-my-new-pattern

Step 9: Create a Pull Request

Go to your fork on GitHub and create a pull request to merge your changes into the main repository.

Best Practices

Research Thoroughly

Spend time understanding how the software reports its version in different contexts. Look at official documentation, community forums, and real-world examples.

Be Specific

Make your patterns specific enough to avoid false positives, but flexible enough to catch variations in version formatting.

Test Extensively

Include comprehensive test cases that cover various version formats and edge cases. The more test cases you include, the more confident we can be in the pattern's accuracy.

Need Help?

If you get stuck or have questions: