rapid7 / recog

Pattern recognition for hosts, services, and content
Other
671 stars 199 forks source link

Add GitHub verify workflow #373

Closed mkienow-r7 closed 3 years ago

mkienow-r7 commented 3 years ago

Description

Adds a GitHub workflow to run bin/recog_standardize on any modified XML fingerprint files similar to #371. This will help contributors and pull request reviewers verify that each fingerprint asserts known identifiers.

Motivation and Context

Help contributors and pull request reviewers catch concerns.

How Has This Been Tested?

Patched xml/http_servers.xml use for testing

diff --git a/xml/http_servers.xml b/xml/http_servers.xml
index 1fe068b..212f3f7 100644
--- a/xml/http_servers.xml
+++ b/xml/http_servers.xml
@@ -4552,7 +4552,8 @@
     <param pos="0" name="os.product" value="FortiOS"/>
     <param pos="0" name="os.device" value="Firewall"/>
     <param pos="0" name="os.cpe23" value="cpe:/o:fortinet:fortios:-"/>
-    <param pos="0" name="hw.vendor" value="Fortinet"/>
+    <param pos="0" name="hw.vendor" value="DNE1"/>
+    <param pos="0" name="hw.dne" value="DNE2"/>
   </fingerprint>

 </fingerprints>
\ No newline at end of file
  1. Opened PR against my recog fork
  2. Applied the xml/http_servers.xml patch from above
  3. Committed and pushed changes
  4. Confirmed Verify / Standardize workflow job failed
  5. Committed and pushed changes to undo the changes applied by the patch
  6. Confirmed Verify workflow was not run since xml files under xml/ were no longer different
  7. Committed and pushed change to hw.vendor using another existing vendor name
  8. Confirmed Verify / Standardize workflow job ran and passed successfully

Types of changes

Checklist: