Note that when there are many violations to display, a "Show More" button will be available:
By default, only 10 violations are displayed to improve performance. You can choose to display more using the various options (+10, +100 etc.). By default an upper maximum of 5000 violations is set when the "All" option is clicked. You can change the upper maximum if required (see the violationsCount option in Dashboard wide configuration options in json from the CAST AIP documentation).
Finally, depending on the item (Rule, Distribution, Measure), you can do as follows:
Select an object in the list of violations to view its source code. In order to focus investigation, source code displayed presents either:
Whenever a piece of code is made available, the View File button (seen in the example below) provides the ability to open the entire source code file to get the entire context. The file is opened in a separate browser window. The entire source code is presented plus some context (application name, snapshot reference, file name).
The Rule name is also highlighted using colour (yellow for a standard Rule (as shown below), and red for critical):
Please note that in the current release of CAST AIP, the display of source code is limited in functionality:
If a "copy/pasted" Rule has been selected (for example Avoid Too Many Copy/Pasted Artifacts), a list of objects that have a high level of similarity with the selected objects will be listed:
This indicates that a "violations index" (on which the feature relies) has not yet been generated. To generate the index the following methods are available:
|Using the "Diagnostic" GUI|
Use the following URL to access the Diagnostic page:
This provides an indication of the violations index status based on the "domain":
In the following example the index has never been generated since the status is set to "toCreate":
Click to enlarge
To generate the index, click the Create/Update Index button. During generation the status "Indexing" will be displayed and on completion, the status will change to "upToDate":
Click to enlarge
|Using the RestAPI|
Use the RestAPI client:
Using the following URI with a PUT will generate the index (where <domain> is more than likely set to AED, unless you have custom domains):
Then use the same URI with a GET will show the index status:
|Generating the index when the web application starts|
This method will force the violations index to be generated if its status is toUpdate (i.e. the index exists but is out-of-date because a new snapshot has been computed since the index creation) every time the web application is started, i.e.:
Edit the following file with a text editor:
Set the following configuration to true:
Save the file. Next time the web application is started the index will be generated.
|Using a custom batch file|
This method is to be used when you have a configuration in the domains.properties file - i.e. multiple "domains". The custom batch will generate the violations index for all the domains configured in the domains.properties file.
Create the following batch files in the %CATALINA_HOME%\webapps\<dashboard>\WEB-INF folder an then run the launch.bat file to start the index generation:
In the following file (titi.bat), you need to modify the line starting curl to match your environment:
|Note that following the generation of a new snapshot, the violations index status will change to toUpdate, therefore CAST recommends regenerating the index to take into account the data available in the new snapshot.|
When the feature is accessed and the violations index has been generated, the following will be displayed:
|Left hand panel||The left hand panel provides a set of filters that can be used to narrow down the search cope. Filters are explained in XXXX.|
|Right hand panel|
The right hand panel list the results of the search. Key points:
Using filters for the Advanced Search
The filters available in the left hand panel enable the search scope to be limited. The following filters can be enabled by expanding the section and selecting with a tick:
Criteria or Rules
Restrict the scope via a Health Measure, Technical Criterion or Rule (or a combination).
Displayed results are union of selected Criteria results, with duplicate violations omitted. Sorting is disabled on this section.
Restrict the scope via the weight of the rule in its parent Technical Criterion.
|Restrict the scope via the criticality of the rule (Critical or Non Critical).|
Restrict the scope to the violation status in the current snapshot: Added, Updated, Unchanged.
Displayed results are an OR of selected violation status results and AND of other filters selected values (eg : Criteria or rules, Technologies ,Transactions , Critical ,Module) with duplicate violations omitted. Violation status remains selected even after navigating to other views and coming back to Advanced search.
|Restrict the scope to objects that are classed as transactions.|
Restrict the scope to the technologies that are present in the current snapshot.
Displayed results are an OR of selected technologies results and AND of other filters selected values (eg : Criteria or rules, Modules ,Transactions , Critical ,Violation status) with duplicate violations omitted.
Restrict the scope to a module in the current snapshot.
Displayed results are an OR of selected module results and AND of other filters selected values (eg : Criteria or rules, Technologies ,Transactions , Critical ,Violation status) with duplicate violations omitted. Module remains selected even after navigating to other views and coming back to Advanced search.
Note that an indicator will show how many filters have been selected: