# rapid7/recog architecture

> Architecture diagram of the GitHub repository rapid7/recog, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rapid7/recog
- Repository: https://github.com/rapid7/recog

## Overview

This repository is primarily Recog’s fingerprint content: XML patterns identify products, services, operating systems, and hardware from probe responses. The documented user workflow is to provide response data to the match tool, which uses the fingerprint corpus to produce identification results. The repository also includes fingerprint-management commands and a CPE-update utility. Source excerpts are limited, so links for those utilities are not inferred from filenames; the documented matching relationship is shown explicitly.

Main entry points: [`bin/recog_match`](https://github.com/rapid7/recog/blob/main/bin/recog_match) (Match CLI), [`update_cpes.py`](https://github.com/rapid7/recog/blob/main/update_cpes.py) (CPE updater), [`xml`](https://github.com/rapid7/recog/tree/main/xml) (Web fingerprints), [`cpe-remap.yaml`](https://github.com/rapid7/recog/blob/main/cpe-remap.yaml) (CPE remappings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_matching["Fingerprint matching"]
  node_match_cli["Match CLI"]
end

subgraph group_content["Fingerprint content"]
  node_web_fingerprints["Web fingerprints"]
  node_network_fingerprints["Network fingerprints"]
  node_platform_fingerprints["Platform fingerprints"]
  node_device_fingerprints["Device fingerprints"]
  node_identifier_vocab["Identifier vocabularies"]
end

subgraph group_management["Content management"]
  node_verify_cli["Verify CLI"]
  node_standardize_cli["Standardize CLI"]
  node_export_cli["Export CLI"]
  node_cleanup_cli["Cleanup CLI"]
end

subgraph group_cpe["CPE enrichment"]
  node_cpe_update["CPE updater<br/>[update_cpes.py]"]
  node_cpe_remap["CPE remappings<br/>[cpe-remap.yaml]"]
  node_cpe_dictionary["CPE dictionary"]
end

node_probe_user(("Probe data user"))

node_probe_user -->|"provides responses"| node_match_cli
node_match_cli -->|"matches against"| node_web_fingerprints
node_match_cli -->|"matches against"| node_network_fingerprints
node_match_cli -->|"matches against"| node_platform_fingerprints
node_match_cli -->|"matches against"| node_device_fingerprints
node_cpe_update -->|"loads mappings"| node_cpe_remap
node_cpe_update -->|"parses dictionary"| node_cpe_dictionary

click node_match_cli "https://github.com/rapid7/recog/blob/main/bin/recog_match"
click node_web_fingerprints "https://github.com/rapid7/recog/tree/main/xml"
click node_network_fingerprints "https://github.com/rapid7/recog/tree/main/xml"
click node_platform_fingerprints "https://github.com/rapid7/recog/tree/main/xml"
click node_device_fingerprints "https://github.com/rapid7/recog/tree/main/xml"
click node_identifier_vocab "https://github.com/rapid7/recog/tree/main/identifiers"
click node_verify_cli "https://github.com/rapid7/recog/blob/main/bin/recog_verify"
click node_standardize_cli "https://github.com/rapid7/recog/blob/main/bin/recog_standardize"
click node_export_cli "https://github.com/rapid7/recog/blob/main/bin/recog_export"
click node_cleanup_cli "https://github.com/rapid7/recog/blob/main/bin/recog_cleanup"
click node_cpe_update "https://github.com/rapid7/recog/blob/main/update_cpes.py"
click node_cpe_remap "https://github.com/rapid7/recog/blob/main/cpe-remap.yaml"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_match_cli,node_probe_user toneBlue
class node_web_fingerprints,node_network_fingerprints,node_platform_fingerprints,node_device_fingerprints,node_identifier_vocab toneAmber
class node_verify_cli,node_standardize_cli,node_export_cli,node_cleanup_cli toneMint
class node_cpe_update,node_cpe_remap,node_cpe_dictionary toneRose
```

## Components

### Fingerprint matching

- [Match CLI](https://github.com/rapid7/recog/blob/main/bin/recog_match): `bin/recog_match`

### Fingerprint content

- [Web fingerprints](https://github.com/rapid7/recog/tree/main/xml): `xml`
- [Network fingerprints](https://github.com/rapid7/recog/tree/main/xml): `xml`
- [Platform fingerprints](https://github.com/rapid7/recog/tree/main/xml): `xml`
- [Device fingerprints](https://github.com/rapid7/recog/tree/main/xml): `xml`
- [Identifier vocabularies](https://github.com/rapid7/recog/tree/main/identifiers): `identifiers`

### Content management

- [Verify CLI](https://github.com/rapid7/recog/blob/main/bin/recog_verify): `bin/recog_verify`
- [Standardize CLI](https://github.com/rapid7/recog/blob/main/bin/recog_standardize): `bin/recog_standardize`
- [Export CLI](https://github.com/rapid7/recog/blob/main/bin/recog_export): `bin/recog_export`
- [Cleanup CLI](https://github.com/rapid7/recog/blob/main/bin/recog_cleanup): `bin/recog_cleanup`

### CPE enrichment

- [CPE updater](https://github.com/rapid7/recog/blob/main/update_cpes.py): `update_cpes.py`
- [CPE remappings](https://github.com/rapid7/recog/blob/main/cpe-remap.yaml): `cpe-remap.yaml`
- **CPE dictionary**

### Other components

- **Probe data user**

## Connections

- Probe data user → Match CLI: provides responses (evidence: `README.md`)
- Match CLI → Web fingerprints: matches against (evidence: `README.md`)
- Match CLI → Network fingerprints: matches against (evidence: `README.md`)
- Match CLI → Platform fingerprints: matches against (evidence: `README.md`)
- Match CLI → Device fingerprints: matches against (evidence: `README.md`)
- CPE updater → CPE remappings: loads mappings (evidence: `update_cpes.py`)
- CPE updater → CPE dictionary: parses dictionary (evidence: `update_cpes.py`)
