1. For understanding EMbold strict mode analysis, refer link https://docs.embold.io/installation-and-backup-guide/#c-strict-mode
  2. In the above repository-configuration.json file, just add path of the compilation command json file generated by your build system under the section additionalOptions as follows
    “additionalOptions” : [“–cdb=<Folder where the compilaton command json file is generated>”]

    OR

    Add the generated compilation_commands.json file under the baseDirectory path

    embold-scanner will pick up the compilation command json file from either the path given with –cdb option or from the base directory.

Running analysis in strict mode

Set up your remote Embold instance. This is where your analysis results will be published. Follow the steps to set up remote analysis here.

  1. On your build machine, navigate to the base directory of your source folder. Generate the compilation database as explained here. You should be able to see a compile_commands.json file in your base directory.
  2. Install corona on your build machine as explained here for UbuntuWindows and RedHat Enterprise Linux/CentOS. For installer versions, refer this section.
  3. Login to Embold. Create a project. Link the repository you want to scan. Select a repository type as “remote“. Read more info creating a project and linking a repository.
  4. Select a repository and “Download repository configuration” from the drop down menu of a repository.
  5. Open and edit the repository-configuration.json file. Provide the URL of your remote machine where the Embold is running and also, set your token based authentication.
    Note: Embold has deprecated the usage of username and password. Read more info. here.
  6. In the sources section, set the value of baseDir as the base directory path of your source folder on your build machine. You can also give exclusions.
    e.g. If you want to exclude folders named “build” and “test”, simply give “.*build.*” , “.*test.*” in the exclusions section.
    For edting ANY settings involving paths, even if you are running Corona on Windows, you must use Unix style path seperator. E.g. forward slash and not backward slash. If you use normal Windows format, it will not work and result into an error message.
  7. Set the dataDir to any desired location on your build machine.
  8. If you wish to create a separate build folder for running trace-utility (intercept-build), you should use the –cdb additional option while running the scan.
    The compile_commands.json will be created inside your build directory and not in the base directory of your source folder. Since, the scanner looks for the compile_commands.json in the base directory by default, use the  –cdb option to specify the directory where your compile_commands.json is located.
  9. In “settings” section, under “additionalOptions” set the directory where compilation database resides.
    Example: --cdb
  10. Go to the bin directory inside the scanboxwrapper.
    e.g. $corona_home/scanboxwrapper/bin.
    Run below command:
    /gammascanner -c
    /home/user/gamma/corona/scanboxwrapper/examples/gammascan_typical.json
  11. If the scan is successful you should see “ANALYSIS SUCCESS”. On your build machine, the last two log messages indicate that the remote analysis was successful.
  12. On your remote Embold instance, you will be able to see published results.