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 |
We will build and analyze the project with a codesonar analyze command line.
| Default hub location | CodeSonar SaaS |
codesonar analyze cs-BasicProj -remote
"/saas/*" cs-java-scan -include-artifacts BasicJava.class -include-sources BasicJava.java
|
|---|---|---|
| otherwise |
codesonar analyze cs-BasicProj cs-java-scan -include-artifacts BasicJava.class -include-sources BasicJava.java
|
|
| Explicit hub location | CodeSonar SaaS |
codesonar analyze cs-BasicProj -remote
"/saas/*" hub_address:hub_port
cs-java-scan -include-artifacts BasicJava.class -include-sources BasicJava.java
|
| otherwise |
codesonar analyze cs-BasicProj
hub_address:hub_port cs-java-scan -include-artifacts BasicJava.class -include-sources BasicJava.java
|
|
Note that this command line includes the following elements.
| Command Line Element | Value | Notes |
|---|---|---|
| Project Name | cs-BasicProj | This functions as the unique identifier for the analyzed project when analysis results are sent to the hub. We give the CodeSonar project a different name from the underlying software project (BasicProj) to distinguish them for the purpose of the tutorial. There is, however, no reason you cannot give a CodeSonar project the same name as the analyzed software project, and many users prefer to do so. |
| Project Path | [empty] | We will analyze in the current working directory. File cs-BasicProj.prj and directory cs-BasicProj.prj_files/ will be created here to store analysis information. |
| Analysis Launch Daemon | -remote
"/saas/*" or [empty] |
For CodeSonar SaaS analysis, instruct the hub to choose a
suitable analysis launch daemon from its
saas launchd group so
that the analysis can be started and managed remotely. Otherwise, start and manage the analysis locally. |
| Hub Location | hub_address:hub_port | The location of the hub you are using. If your hub is running at the default location, you do not need to specify it. |
| Observed Build Command |
cs-java-scan -include-artifacts BasicJava.class -include-sources BasicJava.java
cs-java-scan itself is a null function:
its only purpose is to be recognized by CodeSonar so that the
Java bytecode and source files it specifies can be
incorporated into the project.
|
|
Once the command has been authorized, CodeSonar will start building the project. Command-line output will describe the actions that CodeSonar is performing.
| Accept the CodeSonar License |
[Command line prompt] If this is the first time you are building a project and you have not yet accepted the CodeSonar license agreement, CodeSonar will print the text of the agreement and ask whether you want to accept it.
|
|---|---|
| Opt in or out of uploading anonymous usage statistics |
[Command line prompt] If this is the first time you are building a project and you have not yet specified whether you want to upload anonymized usage statistics to CodeSecure, CodeSonar will ask "Send anonymous usage statistics to CodeSecure?" now.
|
| User Account Control |
If User Account Control is enabled, your system may request
permission for cs_uac_daemonize.exe from CodeSecure,
Inc to continue.
|
| Service Authentication |
[Dialog, Windows only] If you are running CodeSonar with services, a services authentication dialog may open at the point where the command-line output looks something like this: ... ok Checking whether I can connect to [::1]:num... ok Creating cshub database... ok
For more information, see section CodeSonar as a Windows Service. |
CodeSonar will continue building, then perform the analysis and print a URL for the analysis results.
... codesonar: Logging to cs-BasicProj.prj_files\log.txt... your_build_command codesonar: Building cs-BasicProj.prj... codesonar: Analysis initialized. codesonar: Live progress and results are visible at: codesonar: http://[::1]:7340/analysis/1.html codesonar: This url is only accessible from http clients on machine_name. codesonar: However, there may be other urls that are more widely accessible.
(If you specified a different hub location, this will be reflected in the result location URL.)
To report problems with this documentation, please visit https://support.codesecure.com/.