Example: Filtering and excluding a directory

In this example, a filter is created that only shows findings that contain Microsoft include files. This filter is then used to narrow down the list of findings (we will exclude all findings that match the filter).

Procedure

  1. In the Directory section of the Filter Editor view, add the path to the Microsoft include files (for example, C:\Program Files\Microsoft Visual Studio 8\VC\include).
  2. Select Restrict to to make this an inclusive rule.
  3. On the Findings view toolbar, click Show findings that do not match the filter to see only findings for Microsoft header files. This allows you to see what the scan results will look like after applying the filter's inverse globally and scanning again.
  4. Save the filter with a name, such as MS Includes.
  5. Return to the Configuration perspective and, in the Explorer view, select the C/C++ application or project.
  6. If an application is selected, open the open the Exclusions and Filters tab of the Properties view. If a project is selected, open the Filters tab of the Properties view. Click Add. Select MS Includes and then select Invert filter.
  7. Save the changes in the Properties view and then scan the application or project again.
  8. Return to Triage. The findings in the exclusion appear in the Excluded Findings view.