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

Installing or Upgrading CodeSonar

This is the main section for CodeSonar installation instructions.



Requirements

Where To Install

Install CodeSonar:

Note in particular that you do not need to install CodeSonar on machines that will only be browsing analysis results through the CodeSonar Web GUI.

Kubernetes Note

As an alternative to installing CodeSonar directly, you can use the CodeSonar 64-bit Linux installer to install and run CodeSonar on a Kubernetes cluster. You can run both your hub and your analyses on the cluster, or run your hub on the cluster and perform analyses elsewhere.

If you wish to deploy CodeSonar on Kubernetes, follow the instructions in section Install CodeSonar on a Kubernetes Cluster.

If You Are Upgrading

If you are upgrading an existing CodeSonar installation, follow these steps. $CSONAR refers to the CodeSonar installation directory.
If you are not upgrading, go on to Installing/Upgrading CodeSonar

  1. Are you using CodeSonar SaaS?
  2. Are you responsible for a CodeSonar license key server? (Note that in most cases you will not be running a license key server.)
  3. Do you want to also keep your previous CodeSonar installation on this machine?

    CodeSonar SaaS Note: if you are only using SaaS analyzers managed by CodeSecure, there is no need to keep your previous installation. If you have performed some or all of your analyses locally (that is, without using SaaS analyzers), you may wish to keep the previous installation for convenience as described below.

    If you keep your previous CodeSonar installation, you will retain the ability to view information (in particular, source file listings) that is stored in the analysis directories for analyses performed on this machine with the previous installation. If you do not keep your previous CodeSonar installation, you will only be able to view this information once you have re-analyzed the project with the upgraded installation. Note that this applies only to information stored in the analysis directory. Most information, including warning reports, is stored on the hub and will remain available regardless of whether or not you keep the previous installation.

  4. If you have edited your configuration template file, $CSONAR/codesonar/template.conf, save a copy of it somewhere outside $CSONAR.
  5. If you want to use the same CodeSonar installation directory as previously, you will need to uninstall. Remove $CSONAR and all its subdirectories.
  6. Install CodeSonar as described below.
  7. Follow the instructions in Upgrading Configuration Files to merge your old configuration files with the newly installed ones.
  8. Are you using CodeSonar SaaS?

Installing/Upgrading CodeSonar

You will receive email from CodeSecure with download instructions that include the following.

If you haven't already done so, download the installation file now:

  1. Open the download site in your web browser. If you cannot locate the email with the URL, use https://links.codesonar.com/support/login/.
  2. Authenticate using the download credentials provided in the email from CodeSecure. If you don't recall your password, click the Please remind me link at the bottom of the page and follow the password recovery instructions provided.
  3. Download the installation file for your operating system.
  4. [Optional] You can use the link provided to create a customized CodeSonar setup guide and follow that rather than working through the remainder of these instructions.

Your downloaded file will be a CodeSonar tarball whose name is codesonar-9.2p0.20260428-x86_64-pc-linux.tar.gz (the date stamp part of the name may vary).

  1. Save the tarball to your system.
  2. Untar the tarball to the directory of your choice. The directory name should not contain spaces or special characters.
    gzip -cd /path/to/codesonar-9.2p0.20260428-x86_64-pc-linux.tar.gz | tar xf -

    The contents of the tarball will be extracted into ./codesonar-9.2p0.

  3. Read the license file at ./codesonar-9.2p0/EULA.txt. Note that by using CodeSonar, you are agreeing to these license terms.
  4. Add $CSONAR/codesonar/bin to your PATH environment variable, where $CSONAR is the CodeSonar installation directory.
  5. Run the following command, as the same user who performed the installation.
    codesonar activate
    You will be prompted with two yes/no questions.
    1. First, you will be asked to accept the End User License Agreement (EULA).
      • Enter y at the prompt if you wish to accept the license agreement and proceed.
    2. If you accept the EULA, you will be asked "Send anonymous usage statistics to CodeSecure?".

      CodeSonar collects a range of anonymized statistics about usage and performance. If you opt in to sending these statistics to CodeSecure, they will be uploaded periodically and aggregated with all usage statistics collected from other sources. The statistics do not include any identifying information, and do not include any kind of unique identifier for coordinating multiple submissions from the same site.

      The collection of usage statistics is always active. If you opt out of sending the statistics to CodeSecure, they will be temporarily stored on your local system. You can change this setting at any time.

      • Enter y at the prompt to opt in; n to opt out.

Now go on to Setting Up The Hub.

 

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