Page tree
Skip to end of metadata
Go to start of metadata

When analyzing an application using HTML5/Javascript extension, some Javascript files are analyzed and present in Knowledge Base whereas they should not.

As explained in  HTML5 and JavaScript - 1.7 files from third-party frameworks or tools should not be analyzed, as they are not part of user application.

But CAST AIP cannot know every tool or every framework on the market, and some might have been forgotten in the exclusion filters located in file filters.json

Observed in CAST AIP
8.0.x (tick) 


Observed on RDBMS
Oracle Server(tick)
Microsoft SQL Server(tick)
Step by Step Scenario
  1. ServMan → Manage Extensions → install HTML5/Javascript extension on the triplet
  2. Create a user defined Universal Analysis Unit for HTML5/Javascript
  3. Run the analysis on javascript source code.
Action Plan
  1. Edit file filters.json located in the root folder of the extension (see  Obtain Extension), in order to add a new filter for the files you want to exclude
  2. Add a filter for the files you want to exclude :
    1. If the files you want to exclude contain a header with some copyright information, you might use a filter based on file content, like the following :

      File Content based filter
      { "type" : "FileContent", "value" : "Google Maps" }
    2. If all the files you want to exclude contain the name of the framework they belong, then use a filter based on file path, like the following :

      File Path based filter
      { "type" : "FilePath", "value" : "**/angular-*/**" }
    3. If not, then put them all in the same folder, and add a filter based on file path using the folder name. Most developers put their third-party files into a folder called vendor :

      Folder based filter
       { "type" : "FilePath", "value" : "**/vendor/**" }
  3. If the HTML and JavaScript objects are not from third party framework but from application and same objects are appearing more than once then you can use the attached KBUpdatetool_removeduplicateobjects.sql script to remove the duplicated objects.
  4. Re-run analysis
Impact on analysis

Wrong values for most metrics


Ticket # 10839

  • No labels