com.castsoftware.uc.oneclick 0.2.0
Assessment Generator
Requires Python: >=3.10

CAST OneClick

A set of automation tools designed to analyze applications on a portfolio level. Providing the ability to perform

-   Complete application discovery
-   MRI Analysis
-   Highlight Analysis
-   Portfolio level reporting

# Installation

## OneClick Software Requirements

To take advantage of all oneClick has to offer access to AIP Console, Highlight and the CAST REST API. OneClick also requires the installation and locations to the AIP Console and Highlight automation toolset, available on the CAST Extend website.

## Environment

OneClick is designed to perform a due diligence assessment from beginning to end for one or more applications in a project. This includes:

1.  Code discovery
2.  Run CAST MRI Analysis
3.  Run CAST Highlight Analysis
4.  Generate Action Plan
5.  Generate Due Diligence Assessment Report

To work properly the tool will need access to CAST AIP Console, CAST Highlight Rest API, Highlight Agent, Highlight CLI, and CAST MRI Rest API. The tool expects the working folder structure to be:

![Graphical user interface, application Description automatically generated](media/6b19822d60bebff38eb6236cbc6b572a.png)

-   code is the base folder referred to in the --baseFolder parameter.
-   .oneclick is generated by the tool containing all of the project configuration files.
-   DELIVER holds all the delivered code organized by project and application. The tool is expecting one folder for each application, this name will be used to represent the application going forward.

## Installing the tool

1.  [Download Python \| Python.org](https://www.python.org/downloads/) (if not already installed).
    1.  The tool was tested using python version 3.10
    2.  When installing python be sure to check the “Add Python to Path option”

        ![Graphical user interface, text, application Description automatically generated](media/bc9c224100a437083c551e4bfb2da76d.png)

2.  Download the OneClick extension from the CAST Extend web site.
3.  Expand the nugget file into a folder, using zip.
4.  Open a command prompt, hold down windows key and press r, then type cmd enter.
5.  Go to the folder containing the expanded nugget file.
6.  Type: install \<base folder location\>
    1.  The base folder location will hold all files used and/or created by the OneClick tool.
    2.  For more on this see the Environment section below.

# Running the tool

## Command Line Arguments

OneClick has two types of arguments, the first is used for both project and global configuration. Once the configuration is complete the second argument type is used to run the application analysis and generate the assessment report.

```
oneClick config -b <base location> [-p <project name>] 
		or
oneClick run -b <base location> -p <project name>
```

## Project Configuration Files

Configuration files are stored in the **\<base folder location\>/.oneclick** folder, created during installation. There are two types, global and project. The common configuration file, config.json, contains information common to all applications. When a new project is created the tool incorporates all global configuration items into the project specification configuration.

## Configuration Settings

### AIP Console

Oneclick has been tested using both 1.x and 2.x Enterprise version of AIP Console. The *AIP Console integration tools* is used to access the Console which can be downloaded:

-   [Console Enterprise Edition](https://extend.castsoftware.com/#/extension?id=com.castsoftware.aip.console&version=1.28.2-funcrel)
-   [AIP Console integration tools](https://extend.castsoftware.com/#/extension?id=com.castsoftware.uc.aip.console.tools&version=1.0.1)

Make sure the **integration tools** and **AIP Console** version matches. After both are installed update the common configuration file:

```
oneClick config -b <base location> [-p <project name>] --consoleURL=http:\\<server>\ --consoleKey=<console-key> --consoleCLI=<console-integration-tool-location> --enable-security-assessment <true> --blueprint <true>
```

| Parameter                  | Description                                                                                                                                    |                                                                                                                                |
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------|
| consoleURL                 | The URL of AIP Console                                                                                                                         |                                                                                                                                |
| consoleKEY                 | The console key provides access to the AIP Console and is retrieved from the user profile.                                                     | ![Graphical user interface, text, application Description automatically generated](media/f9d987571d6ba95cc1be2dce08915052.png) |
| consoleCLI                 | The absolute location of the “aip-console-cli.jar” included with *AIP Console integration tools*                                               |                                                                                                                                |
| enable-security-assessment | This is a Boolean parameter, if set to true the analysis will be run with security turned on. The default setting for this parameter is True.  |                                                                                                                                |
| blueprint                  | This is a Boolean parameter, if set to true the analysis will be run in full blueprint mode. The default setting for this parameter is True.   |                                                                                                                                |

### Highlight

To run Highlight scans both the Agent and CLI tool must be installed. The can be downloaded from the **Application Scans** page in the Highlight portal.

![Graphical user interface, text, application, email Description automatically generated](media/655e6bf3ea23051dcde0c76e0df1410b.png)

```
oneClick config -b <base location> [-p <project name>] --hlURL=<portal-url> --hlUser=<username> --hlPassword=<password> --hlInstance=<Instance-ID> --hlCLI=<CLI-location> --HLPerlInstallDir=<agent-location>/strawberry/perl> --HLAnalyzerDir=<agent-location>/perl
```

| Parameter   | Description                                                       |
|-------------|-------------------------------------------------------------------|
| hlURL       | The Highlight portal URL                                          |
| hlUser      | User Id                                                           |
| hlPassword  | Password                                                          |
| hlCLI       | Absolute folder location for the Highlight command line interface |
| HLAgent     | Absolute folder location for the Highlight agent                  |

### Imaging Rest API

The AIP Rest API is part of the Health and Engineering Portal (HDED) installation and is used to generate the assessment report. There are two distinct portal versions Standalone and Integrated and OneClick will work with both. The REST API configuration is as follows:

```
oneClick config -b <code location> [-p <project name>] --aipURL <URL> --aipUser <username> --aipPassword <password>
```

| Parameter    | Description            |
|--------------|------------------------|
| aipURL       | The Imaging portal URL |
| aipUser      | User Id                |
| aipPassword  | Password               |

### Other

```
oneClick config -b <code location> [-p <project name>] [--java_home <java>] --report_template <template> [cloc_version <cloc-1.96.exe>]
```

| Parameter       | Description                                                                                                                                                     |
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| java_home       | Location of the java installation. This parameter can be omitted if the java bin folder is already part the system path.                                        |
| report_template | The absolute location of the assessment report template.                                                                                                        |
| cloc_version    | The cloc executable is located in the scripts folder and is set by default to cloc-1.96.exe. A new executable name can be added here to override this version.  |