Creating a Custom Detection Rule from Inventory of “Component” Type
Code Insight 2021 R1
During codebase analysis in the Analysis Workbench for a project, you might find one or more codebase files that are associated with a specific third-party component but are not associated with current inventory. You can manually update the existing inventory item associated with the component to include the files or, if inventory does not exist, create an inventory item based on the component and associate the files. (The inventory item type must be defined as Component.) You then have the option to create a global custom detection rule based on the details of the updated or created inventory item, as described in the following procedure. This method pre-populates much of the information needed to create the rule, including the MD5 value for each file associated with the inventory item.
To create a custom detection rule using the context of a manually created inventory item, do the following:
1. | In the Analysis Workbench for the desired project (see Opening the Analysis Workbench), navigate to the Inventory Items pane and select the inventory item with which you have manually associated the codebase files. The Inventory Details tab for inventory item is opened. |
2. | Click the Create Custom Rule button to open the Custom Detection Rule dialog. For a description of the fields on this dialog, refer to Custom Detection Rule Dialog. |
Note that the Component, License, Description, and URL values are pre-populated from the inventory item on which you are basing the rule and are not editable.
3. | Add or edit As-Found License Text, Notices Text, and Audit Notes content as needed for the rule. (These fields are pre-populated with any content currently defined in the inventory item on which you are basing the rule.) This information is displayed for inventory items automatically created or updated by the rule in the future. |
4. | Scroll down to the File MD5 pane, which is pre-populated with the list of codebase files associated with the inventory item you created. The MD5 value for each file is provided. |
5. | Select one or more files to add to the rule. |
6. | Click Save to create the rule and add it to the Code Insight data library. You will be asked for confirmation to proceed the creation. |