Introduction
When you want to perform an Advanced rescan, this means that you would like to be able to control the required steps and make changes to the configuration that was used in the previous version analysis/snapshot.
Run analysis should be disabled
In an advanced rescan scenario, we do not want to run an analysis or generate a snapshot as part of the new version creation process, therefore we must ensure that the Run analysis option is disabled (this also hides the Take a snapshot option) when uploading the source code (this option can be enabled in a Standard rescan scenario where you simply want results quickly) - this option is explained fully below:
Click to enlarge
Add a new Version
To access AIP Console, use the following URL (ensure you specify the correct server and port number): http://<server>:8081/ui/index.html.
Then move to the AIP Console screen if you are not already there:
Find your existing Application - in this example it is called "MEUDON" - and click Add version:
Deliver source code
Click to enlarge
To deliver source code:
- Drag and drop one .zip or .tar.gz file containing your source code - or click the upload cloud icon to add a file using a traditional "open file" method.
- If you have configured a source code folder (see Administration Center - Settings - Source Folder Location) you can click the yellow folder to add code directly from this folder - only one folder in the designated path can be selected:
If you want to deliver source code containing:
- .NET source code: you should ensure that you define the location of the .NET Assemblies which is required for a successful analysis. See Configuring source code delivery for .NET.
- Maven based source code: you should ensure that you define the location of the Maven repositories so that any associated JAR files can be automatically discovered and that POM dependencies can also be located - which is required for a successful analysis. See Configuring source code delivery for Maven.
In a rescan scenario, CAST highly recommends setting the following options as follows:
Option | Option position | Description |
---|---|---|
Backup Application | ENABLED or DISABLED | Unticked by default. Selecting the option will cause the Application to be backed up as part of the actions you choose. This may cause some additional processing time while the backup completes. Backups are stored in the following location on the relevant AIP Node and can be managed in Administration Center - Applications - Application Details: %PROGRAMDATA%\CAST\AipConsole\AipNode\backup\<application_name>\YYYYMMDDHHMM.zip |
Same configuration as previous version | ENABLED | This will ensure that your configuration (Modules, Exclusion Rules and Objectives) are identical to the settings used in the previous version, therefore retaining result continuity, although you are free to make changes to Exclusion Rules and Optimizations if you require by clicking the Next button as highlighted below - note that changing other settings in the wizard may impact the stability of your results. In addition, the option Enable Automatic discovery (see below) will be available (and will be enabled). Click to enlarge When disabled, AIP Console will create a version ignoring any previous Version settings and options - i.e. as if it was a brand new Version. |
Enable Automatic discovery | ENABLED | Only available when adding a new version when a version already exists and when the option Same configuration as previous version (see above) is enabled.
|
Run Analysis | ENABLED or DISABLED | Choose whether you want to run an analysis immediately after the source code is delivered. Technically the Run analysis option also includes an internal step called "Prepare analysis data" step, which allows:
For a Standard rescan scenario, you should enable this option. Enabling this option includes the following steps that would otherwise need to be manually actioned:
Enabling the option will also automatically expose the following options: For an Advanced rescan scenario, you should disable this option. This will allow you to work through the process of validating/accepting the version, running an analysis and generating a snapshot as separate steps. |
Take a snapshot | ENABLED or DISABLED | If you do not see this option, you must enable the Run analysis option. Choose whether you want to generate a snapshot immediately after the source code is delivered: For a Standard rescan scenario, you should enable this option. It includes the following steps that would otherwise need to be manually actioned:
For an Advanced rescan scenario, you should disable this option. This will allow you to work through the process of validating/accepting the version, running an analysis and generating a snapshot as separate steps. |
Publish to Health Dashboard | ENABLED or DISABLED | If you do not see this option, you must enable the Run analysis option. Choose whether you want to publish the snapshot in the Health Dashboard immediately after the source code is delivered. This option is enabled by default: For a Standard rescan scenario, you should enable this option. For an Advanced rescan scenario, you should disable this option. This will allow you to work through the process of validating/accepting the version, running an analysis and generating a snapshot as separate steps. |
Publish to CAST Imaging | ENABLED or DISABLED |
Choose whether you want to publish the snapshot in your CAST Imaging instance immediately after the source code is delivered. This option is enabled by default: For a Standard rescan scenario, you should enable this option. For an Advanced rescan scenario, you should disable this option. This will allow you to work through the process of validating/accepting the version, running an analysis and generating a snapshot as separate steps. |
Start code delivery
When you have made your option choices, click FINISH, any subsequent steps will be skipped and if the Run analysis option is disabled (as recommended), the version will be added and will appear in the Application - Versions screen:
Click to enlarge
Optionally click NEXT
Optionally, you can click NEXT to change Manage Exclusions/Objectives:
Manage exclusions
Click to enlarge
Manage Exclusions is an optional step in the source code upload process - it allows you to use to exclude specific files and/or folders in the uploaded archive file and manage project exclusion rules (available in AIP Console ≥ 1.26).
Ignore Patterns
In this section, any excluded items will be ignored during the source code analysis. A set of exclusion rules will be predefined via the "default" Exclusion Template which contains the most common items that should be excluded (see Administration Center - Settings - Exclusion templates for more information):
You are free to set whatever exclusion rules you require:
- You can remove existing exclusions using the trash icon
- You can add new existing exclusions using the Add Expression option (see below)
When you have made your option choices, click:
- PROCEED, any subsequent steps will be skipped and:
- if the Run Analysis option is disabled, the version will be added and will appear in the Application - Versions screen.
- if the Run Analysis AND Take a snapshot options are enabled, the analysis/snapshot will be actioned immediately.
- NEXT, see Choose Objectives.
Options available
Overwrite existing exclusion rules | This option is only visible in rescan mode in AIP Console ≥ 1.25, when the Same configuration as previous version option is enabled. When the option is:
Note that this option should be typically left in the disabled position if you have imported an application from CAST Management Studio (see Import an Application managed with CAST Management Studio into AIP Console) and are re-analyzing the source code with AIP Console: exclusion rules are different in CAST Management Studio/Delivery Manager Tool and in AIP Console, and if you use the AIP Console interface to add the exclusion rules, these will overwrite the exclusion rules managed in CAST Management Studio/Delivery Manager Tool. |
---|---|
Retain source code zip in the application upload folder | This option is only visible:
When ticked, the selected source code folder will be zipped before the delivery/analysis begins, primarily so that any files that are excluded from the analysis can be retrieved if necessary. The ZIP file will be stored in the shared data location, in the Upload folder. |
Expression: Add a new pattern using a glob pattern expression | The pattern matching system uses glob patterns (see https://docs.oracle.com/javase/tutorial/essential/io/fileOps.html#glob for examples of how this system works). Enter an expression to match the folders you want to exclude and then click ADD to add the expression to the list of excluded items: For example:
You can add multiple expressions. |
Preview (Available in AIP Console ≥ 2.1) | This option enables you to preview which files/folders will be excluded from the source code analysis. In the example below, an ignore pattern called "sql/" has been added (ignoring any folder named "sql" or "SQL"): |
Use exclusion template | This option enables you to choose from a template that has been predefined in the Administration Center - Settings - Exclusion templates panel under Exclusion Templates: When a template is selected, the list of exclusions will be populated with those defined in the template. You can delete items if you prefer: |
Using the GUI to select items | Click to access a screen where you can select the files and folder from the uploaded archive file you want to exclude (the archive will be unpacked by AIP Console) - place a check mark in the items that must be excluded, then click SAVE to add them to the list of exclusions: |
Project Exclusion Rules
This section enables you to configure the "exclusion" rules for specific projects identified during the source code delivery. When an exclusion rule is matched, then the project in question will be ignored. The aim of these rules is to avoid a situation where multiple projects (and therefore Analysis Units) are generated for a given piece of source code when more than one is not needed. If you are unsure, you should leave the default settings as they are and review them before accepting delivery.
- for an Application's first version, all options are selected except Exclude Maven Java projects when an Eclipse project also exists
- for an Application's subsequent versions, exclusion rules are pre-selected according to the options chosen in the previous version delivery.
- the option Exclude all empty projects refers to projects that do not have associated source code.
- the option Exclude Test code will exclude all folders named "test" that are discovered during the source code delivery
Choose Objectives
Objectives is an optional feature that is designed to pre-configure an analysis (install specific extensions, set specific settings etc.) based on the results you require:
When you have made your option choices (see below), click PROCEED:
- if the Run Analysis option is disabled, the version will be added and will appear in the Application - Versions screen.
- if the Run Analysis AND Take a snapshot options are enabled, the analysis/snapshot will be actioned immediately.
- When enabling any of the Objectives, it is recommended to allow Alpha and Beta extensions to be installed via the Extension Strategy option (Administration Center - Extensions Strategy / Administration Center - Settings - Extensions Strategy), because some of the extensions that are installed automatically via the Objectives feature are currently only in Alpha/Beta release. If Alpha/Beta extensions are not permitted to be installed, the results of the selected objectives will not be produced.
- When an extension whitelist is in use via the Extension Strategy option (Administration Center - Settings - Extensions Strategy), any extensions that are automatically installed by a selected Objective and which are not present in the white list will cause the analysis to stop.
- If you do not wish to use any of the objectives offered, untick all options. This will ensure that no additional extensions (over and above what you have defined and what has been automatically discovered) will be installed and no additional options will be enabled automatically.
- If you are adding a version N+1 (i.e. you have already created a version and generated a snapshot and are now working on the next version) and you tick the option Same as previous configuration in Step 1, the same objectives will be applied as in the previous version.
- If you have generated a snapshot and enabled various objectives, and you then edit the version and generate a new snapshot, the same objectives will be applied.
Options available
Option | Default settings | Description |
---|---|---|
Global risk assessment | Active | This option focuses on risk assessments by adding additional structural rules to the analysis. Selecting this option will currently install the following extensions (in addition to any that are discovered, set to force install or those that are automatically active / shipped extensions): |
Security assessment | Inactive | This option focuses on user input security assessments for JEE/NET technologies. Selecting this option will currently:
|
Functional points measurement | Active | This option focuses on function points measurement. Selecting this option will currently install the following extensions (in addition to any that are discovered, set to force install or those that are automatically active / shipped extensions): If you are using a CAST global license that does not include EFP, then this option will not produce any results. |
Blueprint design | Active | This option focuses on architecture identification and links between layers. Selecting this option will currently install the following extensions (in addition to any that are discovered, set to force install or those that are automatically active / shipped extensions): |
Data safety investigation | Inactive | This option focuses on flow of data identification and will deliver associated results. Selecting this option will currently install the following extensions (in addition to any that are discovered, set to force install or those that are automatically active / shipped extensions):
GDPR / PCI DSS
Two additional options are available (in AIP Console ≥ 1.26) specifically enabling a check of a set of predefined sensitive key words related to GDPR (General Data Protection Regulation) and/or PCI-DSS (Payment Card Industry Data Security Standards) data:
Each option corresponds to one .datasensitive file located in the following location on the AIP Node: %PROGRAMDATA%/CAST/AipConsole/AipNode/datasafetychecks In other words, enabling the GDPR option (for example) will force the check using the keywords defined in GDPR_Keywords.datasensitive. When the analysis runs, the predefined .datasensitive file corresponding to the chosen option is sent to the LISA folder (LISA/{appGuid}/DataSafety) and any key words defined in them will be checked. If any key words are found in the source code a flag will be added in the analysis results on the object in question. This can be seen as below: Click to enlarge Click to enlarge |