JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.

If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.

If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.

CodeSonar® 9.2p0 CONFIDENTIAL CodeSecure Inc
General

GUI Reference: Auto-Deletion for Analyses, Analysis Logs, and Project Analysis Directories

Users can configure the CodeSonar hub to automatically delete analyses that are no longer of interest: older than a fixed threshold, superseded by some number of more-recent analyses, or a combination of the two.

Using a similar process, users can configure the hub to automatically delete analysis logs only: other analysis information such as analysis results and user-provided descriptions are retained, but the analysis logs are deleted from the hub database.

You can also configure the hub to automatically delete the project analysis directory (pfilesname.prjfiles). This is primarily useful for CodeSonar SaaS, where analyses are managed remotely on machines provided as part of the CodeSonar SaaS deployment and so it is not possible to manage project analysis directories using your regular system tools.

The conditions for automatic deletion can be specified on a hub-wide or per-project basis, and individual analyses can be exempted from automatic deletion.

Analysis auto-deletion is available for all analyses, regardless of the language or languages involved.



Defaults and Behavior

The auto-deletion functionality behaves as follows.

Auto-Deletion Criteria

At both hub-wide and project-wide scope, auto-deletion settings are specified as multiple rules that can be independently configured and enabled.

In particular, you may wish to auto-delete analysis logs fairly soon after the analysis, then keep the analysis results and other analysis information for a longer period before eventually auto-deleting the analysis.

Analysis Auto-Deletion Settings

At both hub-wide and project-wide scope, auto-deletion settings are specified as two rules that can be independently configured and enabled.

An age threshold rule Delete analyses older than N days.

When this rule is enabled, analyses that are older than the specified limit will be scheduled for deletion (unless they are protected). The "age" of an analysis is measured from its Started timestamp

An analysis limit rule Delete analyses outside the most recent M analyses {per project, on the hub}.

For hub-wide auto-deletion settings, the analysis limit can be applied either "per project" or "on the hub". Project-wide auto-deletion settings are always "per project".

  • per project: an analysis will be scheduled for deletion (unless protected) if there are M more recent analyses of the same project present on the hub.
  • on the hub: an analysis will be scheduled for deletion (unless protected) if there are M more recent analyses present on the hub, regardless of which project they belong to.

The "age" of an analysis is measured from its Started timestamp. Analyses in every Analysis State count against the analysis limit M: note that this includes "Stalled" analyses and those that are stuck in a "Building over; ... " phase.

The rules can be enabled separately or in any combination.

Analysis Log Auto-Deletion

The rules governing analysis log auto-deletion are extremely similar to those for analysis auto-deletion, and the analyses of interest are identified in the same way:

The only difference is that only the logs are deleted from analyses that match the specified constraints.

Age threshold rules Delete logs older than N days.
An analysis limit rule Delete logs outside the most recent M analyses {per project, on the hub}.

Project Analysis Directory (.prj_files) Auto-Deletion

The rules governing project analysis directory auto-deletion are similar to those for analysis auto-deletion, and the analyses of interest are identified in the same way:

Age threshold rules Delete .prj_files older than N days.
An analysis limit rule Delete .prj_files outside the most recent M analyses {per project, on the hub}.
A size limit rule Delete .prj_files larger than P megabytes.
When this rule is enabled, project analysis directories that are larger than the specified size will be scheduled for deletion (unless they are protected).

Setting Up Auto-Deletion

Hub-Wide

Hub-wide auto-deletion settings are provided in the Settings page.
The required permissions are listed below.

  1. Navigate to the Analysis tab of the Settings page.
    The hub-wide auto-deletion settings are displayed in the lower part of the tab.

    screenshot: Settings/Analysis Settings, with autodeletion controls highlighted

  2. Edit the auto-deletion criteria according to your requirements.
  3. Click Update.
    CodeSonar will analyze and apply your changes, then display a feedback message at the top of the page. The message will notify you if any analyses or logs on the hub match the deletion criteria. For example:

    screenshot: feedback message

    The message structure and button text will vary depending on whether you are changing auto-deletion settings for analyses, logs, or both.

  4. If there are analyses, logs, or project analysis directories that match the deletion criteria, you can click the button to schedule them for immediate deletion. Otherwise, CodeSonar will automatically delete them the next time an analysis starts on the hub.

Project-Wide

Project auto-deletion settings are provided in the Analysis Settings section of the Project page.
The required permissions are listed below.

screenshot fragment: analysis settings expansion

  1. Decide whether the project will use the hub-wide auto-deletion settings or its own, project-wide settings.
  2. Click Update.
    CodeSonar will analyze and apply your changes, then display a feedback message at the top of the page. The message will notify you if any existing analysis, logs, or project analysis directories match the deletion criteria. For example:

    screenshot: feedback message

  3. If there are analyses, logs, or project analysis directories that match the deletion criteria, you can click the button to schedule them for immediate deletion. Otherwise, CodeSonar will automatically delete them next time an analysis starts on the hub.

Viewing Auto-Deletion Settings

Hub

To view hub-wide auto-deletion settings:

  1. Navigate to the Analysis tab of the Settings page.

Project

To view the auto-deletion settings for a particular project:

  1. Navigate to the corresponding Project page.
  2. Expand the Analysis Settings section.

Analysis

To check whether a particular analysis is protected from auto-deletion:

  1. Navigate to the corresponding Analysis page.
  2. Expand the Analysis Details section.

Protecting An Analysis From Auto-Deletion

An analysis is protected from auto-deletion if and only if the Protect analysis from auto-deletion checkbox is selected on the corresponding Analysis page.

To protect an analysis from auto-deletion, proceed as follows.
(The required permissions are listed below.)

  1. Navigate to the corresponding Analysis page.
  2. Expand the Analysis Details section.

    screenshot fragment: show Analysis Details expansion

  3. Select the checkbox next to Protect analysis from auto-deletion.
    Protection is active from the time you select the checkbox.

To remove protection, follow the same steps but deselect the checkbox.

Permissions

CodeSonar permissions apply to auto-deletion settings as follows.

Auto-deletion setting Permissions required for modification
Project-wide ANALYSIS_DELETE and PROJECT_WRITE for the project in question.
Hub-wide ANALYSIS_DELETE for the root project tree.
Protecting an analysis ANALYSIS_DELETE and ANALYSIS_WRITE for the analysis in question.
 

To report problems with this documentation, please visit https://support.codesecure.com/.