> For the complete documentation index, see [llms.txt](https://docs.ci.trust-in-soft.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ci.trust-in-soft.com/tutorial/set-up-the-continuous-verification.md).

# Set up the continuous analysis

## Sign up to TrustInSoft CI

**1.** Visit TrustInSoft CI [Sign-in page](https://ci.trust-in-soft.com/signin) and click **Sign in/up with GitHub**.

**2.** If not already signed in, sign in to GitHub.

You'll be redirected to the GitHub authorization page for TrustInSoft CI to be granted access to your GitHub projects:

![](/files/-LzMeDvmXLJHtgxQN7RD)

{% hint style="info" %}
Note: TrustInSoft CI requests both Read & Write access to your **public** **repositories** but TrustInSoft CI will **never** write to them. Requiring Write access on top of Read is a known limitation of the [GitHub API](https://developer.github.com/apps/building-oauth-apps/authorizing-oauth-apps/).
{% endhint %}

**3.** Optionally grant access to any of your [GitHub organizations](/reference/github-organizations.md), that own C and C++ projects, by clicking **Grant**.

**4.** Click **Authorize TrustInSoft**.

You'll be redirected to TrustInSoft CI.

## **Add your first project**

**1.** After sign-in in TrustInSoft CI, you are redirected to your Dashboard that gathers all your recent activity.

![](/files/-MeegS8dHlGz2raNk-r6)

**2.** To add a project, you can directly click on `Create your first project` in the `Last activity` section here, or you can go to the **Projects** page and click on the `Add project` button (on the top-right corner of the screen):

![](/files/-Meeg_I7_dWpsscGEfX5)

**3.** Then, select the project **demo-caesar** and click on `Add and select branch`:

![](/files/-MdprmoPcyiUeq_kmLdu)

{% hint style="info" %}
The `Owner` field is only shown when you own [GitHub organizations](/reference/github-organizations.md).
{% endhint %}

**4.** Now, select the **master** branch.

![](/files/-MeOuKA96QCQvNdRuei3)

**5.** The `status` notifies the branch does not have (yet) a configuration required to run a build in TrustInSoft CI. So click on the `Add and create configuration` button to create this missing configuration.

## Create your first configuration

After clicking on `Add and create configuration`, you will be redirected to the Build configuration page of your project.

![](/files/-MeehAtBWQlFdcX0lecz)

The configuration is split instead two steps:

* The **optional** Build preparation stage (to execute an arbitrary Bash script before the run a build): this stage is not required for this tutorial.
* The **required** Analyses configuration, which describes how to perform analyses.

**1.** Skip the `Build preparation` section, and scroll down to the `Analysis configuration` section.

{% hint style="info" %}
Here we are using the **Global configuration**, allowing us to specify a configuration directly on TrustInSoft CI without modifying the repository. Later, you may want to use a **Committed configuration** by writing this configuration in files committed in your repository.

You can learn more about the advantages of each kind of configuration in the [Configuration files](/configuration-file.md) section.
{% endhint %}

Now, you will have to write an **Analyses configuration**, which is defined as a sort of "light" specification in JSON of your analyses.

{% hint style="info" %}
For each analysis, TrustInSoft CI will emulate a user-defined hardware architecture and propagate the program's input values, statement by statement, from the beginning until the entry point function returns or an undefined behavior has been detected.
{% endhint %}

**2.** Copy the following Analyses configuration:

```javascript
[
    {
        "name": "Test shift values 7 and -3",
        "files": [ "main.c", "caesar.c" ],
        "cpp-extra-args": "-I ."
    }
]
```

{% hint style="info" %}
In the demo-caesar repository, the source files `main.c` and `caesar.c`include a test, which encrypts and decrypts the string "People of Earth, your attention please", using 2 different shift values -3 and 7.

This Analyses configuration provides both the source files in the `"files"` field, and the compilation options (used by TrustInSoft CI to preprocess these source files) in the `"cpp-extra-args"` field.

The `"name"`field is only cosmetic to easily identify the analysis in the results table later.
{% endhint %}

![](/files/-MeehpPJhcsgAZQY51pK)

**3.** Click on `Add reference` to save the changes and add the `master` branch.

If you did not change the project settings, a build will automatically be run for the `master` branch and you will be redirected to the page of this build.

![](/files/-Meej9ZfkuWxZnIW-AfK)

{% hint style="info" %}
After adding a reference, each new group of commits pushed on GitHub on this reference will also trigger a new build. This behavior can be changed in the Project Settings to manually run builds by clicking on the `Run new build` button in the Reference page.
{% endhint %}

## **Observe your first undefined behavior**

**1.** Wait for the analysis to complete, then look at the results in **Build status** (see the capture below).

{% hint style="info" %}
**Build Status** displays the analyses counts according to four categories with a specific color for each, such as red for *Undefined behavior* and green for *No undefined behavior*. In our case, only one analysis has been configured and it is red so an undefined behavior has been found.
{% endhint %}

**2.** Click on the only analysis. The detected undefined behavior corresponds to an invalid memory access:

![](/files/-Meek-MfP2IQbnP9h-4J)

Now that we know that the project demo-caesar contains an undefined behavior, let's understand its root cause!
