rapid7 / recog

Pattern recognition for hosts, services, and content
Other
662 stars 195 forks source link

Fix pre-commit hook for updated recog_standardize #446

Closed mkienow-r7 closed 2 years ago

mkienow-r7 commented 2 years ago

Description

Fixes the pre-commit hook use of recog_standardize, that was recently updated in #438.

Motivation and Context

To ensure that fingerprint quality is maintained.

How Has This Been Tested?

Pre-commit hook issue

$ git add xml/html_title.xml
$ git commit
VENDORS REMOVED VALUE: 2N Telekomunikace
...(removed 619 lines)...
VENDORS REMOVED VALUE: vsFTPd Project
VENDORS NEW VALUE: DNE
DEVICE REMOVED VALUE: ADSL Modem
...(removed 56 lines)...
DEVICE REMOVED VALUE: Whiteboard
FIELDS REMOVED VALUE: apache.info
...(removed 66 lines)...
FIELDS REMOVED VALUE: zmailer.ident
OS ARCH REMOVED VALUE: ARM
...(removed 8 lines)...
OS ARCH REMOVED VALUE: x86_64
OS PRODUCT REMOVED VALUE: 10Gb Blade Switch
...(removed 294 lines)...
OS PRODUCT REMOVED VALUE: z/OS
OS FAMILY REMOVED VALUE: 3155 Series
...(removed 220 lines)...
OS FAMILY REMOVED VALUE: z/OS
HW PRODUCT REMOVED VALUE: 3PAR
...(removed 336 lines)...
HW PRODUCT REMOVED VALUE: iSTAR Ultra
HW FAMILY REMOVED VALUE: AR Series
...(removed 104 lines)...
HW FAMILY REMOVED VALUE: imageRunner
SERVICE PRODUCT REMOVED VALUE: .NET CLR
...(removed 627 lines)...
SERVICE PRODUCT REMOVED VALUE: zFTPServer
SERVICE FAMILY REMOVED VALUE: .NET
...(removed 233 lines)...
SERVICE FAMILY REMOVED VALUE: vsFTPd
Please review any new additions to the text files under 'identifiers/'.
If any of these names are close to an existing name, update the offending
fingerprint to use the existing name instead. Once the fingerprints are fixed
run the 'bin/recog_standardize' tool again.

Pre-commit hook after patch

$ git add xml/html_title.xml
$ git commit
VENDORS NEW VALUE: DNE
Please review any new additions to the text files under 'identifiers/'.
If any of these names are close to an existing name, update the offending
fingerprint to use the existing name instead. Once the fingerprints are fixed
run the 'bin/recog_standardize' tool again.

Types of changes

Checklist:

TomSellers commented 2 years ago

LGTM!