Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pre-commit hook for updated recog_standardize #446

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

mkienow-r7
Copy link
Contributor

@mkienow-r7 mkienow-r7 commented Apr 19, 2022

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?

  • rake tests
  • Temporary fingerprint change to demonstrate the issue
$ git diff
diff --git a/xml/html_title.xml b/xml/html_title.xml
index 58c02c7..435b14c 100644
--- a/xml/html_title.xml
+++ b/xml/html_title.xml
@@ -1455,7 +1455,7 @@
   <fingerprint pattern="^Duo Access Gateway$">
     <description>Duo Access Gateway</description>
     <example>Duo Access Gateway</example>
-    <param pos="0" name="hw.vendor" value="Duo"/>
+    <param pos="0" name="hw.vendor" value="DNE"/>
     <param pos="0" name="hw.device" value="Security Appliance"/>
     <param pos="0" name="hw.product" value="Access Gateway"/>
     <param pos="0" name="os.vendor" value="Duo"/>

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

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have updated the documentation accordingly (or changes are not required).
  • I have added tests to cover my changes (or new tests are not required).
  • All new and existing tests passed.

@TomSellers
Copy link
Contributor

LGTM!

@wbowditch-r7 wbowditch-r7 self-requested a review April 19, 2022 13:52
@mkienow-r7 mkienow-r7 merged commit ad5715b into rapid7:main Apr 19, 2022
@mkienow-r7 mkienow-r7 deleted the bug/fix-pre-commit-hook branch April 19, 2022 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants