On this page:

Summary: how to update a Model's properties.

Introduction

Each model (whether Architecture or Quality Rule) that is created in the CAST Architecture Checker will be visible in the results as a distinct Quality Rule. A Quality Rule has various accompanying values that determine how its results are viewed in the CAST dashboards. These values can be configured for the rules that result from your models created in the CAST Architecture Checker as follows:

  • For Architecture Models the following can be configured:
    • ID, name and short description to identify the rule
    • Documentation to help end users understand what the rule is checking for
    • Weight of the rule
    • Whether the rule is critical or not
  • For Quality Rule Models the following can be configured:
    • ID, name and short description to identify the rule
    • Weight of the rule
    • Whether the rule is critical or not
    • Which Technical Criteria the rule is a member of
    • Technology scope for which the rule will be triggered
    • Grade thresholds to generate compliance percentages

Note that for Architecture Models the corresponding rule will always be visible in the "Security" Health Factor and "Architecture Models Automated Checks" Technical Criterion:

Note that by default Architecture Models materialized as rules will have the following compliance thresholds (these cannot be changed):

  • Minimum rule compliance percentage required to get a 4.00 grade = 99.0%
  • Minimum rule compliance percentage required to get a 3.00 grade = 90.0%
  • Minimum rule compliance percentage required to get a 2.00 grade = 70.0%
  • Minimum rule compliance percentage required to get a 1.00 grade = 10.0%

Configuring model properties

To configure the current model's properties:

A dialog box containing various tabs will then be displayed enabling you to configure the properties:

Click to enlarge

GeneralID

MANDATORY

A unique identifier for your model must be defined in the CAST Architecture Checker GUI for all models. This ID is used to identify the Architecture Model throughout the CAST Management Studio and the CAST dashboards (the ID will be saved to a table in the CAST Management Service schema).

  • A positive and even number above 2,000,000 can be assigned as an ID (values less than this are already reserved for use by CAST). CAST recommends using CAST Extend to reserve a range of IDs for your use (if you have not done so already). To do so, sign in to CAST Extend and select ID Ranges > Quality Range Reservation > Reserve Rule ID Range:
    • The Extension ID field is of the form: com.castsoftware.uc.<free-form text>. Where <free-form text> can be any string that describes your initiative or your project.
    • For the Range amount field, choose a number between 1 and 10. 1 corresponds to a range of 1000 IDs, therefore if you enter 3, you will be granted 3000 IDs.
    • After you have clicked on Reserve, a range of rule IDs are defined and ready for your use.
    • See Managing ID ranges for custom extensions for more information about this.
  • If an existing model from CAST AIP ≤ 8.3.1 (where IDs were not available) is opened, then the ID will be set to the default value (0).
  • If an model has already been assigned to an Application in the CAST Management Studio or has been installed as an extension with ID = X, then even if the model is subsequently edited in the CAST Architecture Checker and the ID changed (to ID = Y, for example), the model will retain the same ID in the CAST Management Service schema.
  • The ID must be unique in the CAST Management Service schema. For Architeture Models, if two models with the same ID are associated to an Application, only the first model will be used and the second will be ignored.
  • If the ID is set to 0 (default) or blank, then the model (and resulting rule) will be ignored when the snapshot is generated.
  • When saving the model, the following is checked. If any of the below checks fail, an error will be displayed:
CheckError
That an even number has been used
That a number above 2,000,000 has been used
That an invalid number has not been used (for example a very large number, or a negative number)
NameThe name of the corresponding rule as it will appear in the CAST dashboards
Description

MANDATORY

A description of the model/rule - only displayed in CAST Architecture Checker.

Documentation

MANDATORY

Documentation fields for the rule resulting from the model must be filled in:

  • Name: the name of the rule associated to the model
  • Rationale: Reason why the violation pattern is a risk.
  • Description: Description of the violation pattern that is tracked down.
  • Remediation: How to remove the violation pattern.
  • Reference: Source reference of this violation pattern.
  • Sample: Sample of source code showing the violation pattern.
  • Remediation sample: Sample of source code showing the proposed remediation.
  • Output: Description of available information for the violations.
  • Scope: Description of the scope of tested objects.
Technical CriteriaFor Architecture Models

For Architecture Models the following can be configured:

  • Rule weight: This option enables you to change the Weight applied to the corresponding rule. This value defines how "important" the rule is in the parent Technical Criterion "Architecture Models Automated Checks". You can select a value between 0 and 9 (both included); a value equal to 0 has the same effect as ignoring the corresponding rule; the default value is 1.
  • Quality Rule criticality: This option enables you to choose whether the corresponding rule is set as critical or not, i.e. it allows you to threshold the grade of the parent metric using the grade of the child metric. The default value is "not Critical".

For Quality Rule Models

MANDATORY

For Quality Rule Models the following can be configured:

  • Technical Criterion: choose one or multiple Technical Criteria to which the corresponding rule will belong to - tick the criteria you require.
  • Rule weight: This option enables you to change the Weight applied to the corresponding rule. This value defines how "important" the rule is in the parent Technical Criterion. You can select a value between 0 and 9 (both included); a value equal to 0 has the same effect as ignoring the corresponding rule; the default value is 1.
  • Quality Rule criticality: This option enables you to choose whether the corresponding rule is set as critical or not, i.e. it allows you to threshold the grade of the parent metric using the grade of the child metric. The default value is "not Critical".

Technologies
Only available when working with a Quality Rule Model.

This option allows you to select a target Technology for your rule. This choice dictates when the rule is triggered during an analysis:

  • if you select a technology or technologies, the rule will only be triggered when the selected technologies are present in the source code.
  • if you do not select specific technologies, the rule will be triggered regardless of the technologies that are being analyzed, therefore impacting performance. The following message will also be displayed when you export the model as an extension:

Grade Thresholds
Only available when working with a Quality Rule Model.

This option allows you to set specific Grade thresholds (grades are visible in the Health Dashboard) to generate compliance percentages for the corresponding rule:

Note that thresholds should be descending (from grade 4 to 1) and cannot be set to negative values. Errors will be displayed if these configurations are attempted:

Saving updated properties

When you have completed the properties updates, ensure you save the model (see Toolbar).

When can I see the updated properties in the CAST dashboard?

Results will be available in the CAST dashboards when a snapshot is generated that contains the rules that correspond to the models you have creatd, for example for an Architecture Model rule:

Click to enlarge

What happens if I open an Architecture Model that was created with a previous release of CAST AIP?

If you open an Architecture Model created and saved with a previous release of CAST AIP (≤ 8.3.0), then you may be warned as follows:

This means that the Architecture Model was created with an older release of CAST AIP that did not include the ability to set Properties on the model. As such, the CAST Architecture Checker has initialized these Properties in the Architecture Model with default values. These default values may not correspond to the values you may have set in the CAST Management Studio and therefore may impact results when the Architecture Model is used in an analysis.