# Reachability analysis

{% hint style="info" %}
**Release status**

Reachability is now in General Availability (GA) status for certain [integrations and programming languages](#supported-languages-and-integrations).

&#x20;Snyk is expanding its reachability capabilities by adding more integrations and languages, which are available in Early Access and can be enabled through [Snyk Preview](../../snyk-admin/snyk-preview).
{% endhint %}

Snyk reachability analysis allows you to analyze risk by identifying whether your application is calling a code element (e.g. functions, classes, modules, annotations, etc.) related to the vulnerability, thus raising the chances of that vulnerability being exploited in the context of your application.

Reachability analysis can be used as a standalone signal to make decisions, or as part of a broader risk-based prioritization approach using the Snyk Risk Score.&#x20;

Snyk uses a combination of program analysis and various AI techniques to determine the reachability of a given vulnerability, with validation conducted by security research experts.

The following instructions explain how to set up and use reachability analysis and provide more information on how the underlying analysis works at Snyk.&#x20;

## Set up Reachability analysis

Follow these steps to enable Reachability analysis and begin analyzing Projects for reachable vulnerabilities:&#x20;

* In the Organization **Settings**, navigate to the **Snyk Open Source** section.
* In the **General** section, find **Reachability analysis**.
* Activate **Enable reachability analysis**.

<figure><img src="https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2F396Qz9TBHn6mrxerpxjQ%2Fimage.png?alt=media&#x26;token=6f6c1a2e-a92a-4d21-9cf0-85f1384979ab" alt=""><figcaption><p>Enabling Reachability setting</p></figcaption></figure>

After Reachability analysis is enabled, the analysis is done as part of scanning Projects.&#x20;

{% hint style="info" %}
You can apply the reachability analysis to existing Projects by triggering a [manual test](../../../scan-with-snyk/pull-requests/snyk-pull-or-merge-requests#manual-pull-and-merge-requests-for-project-code).
{% endhint %}

## Supported languages and integrations

Reachability analysis is supported for the following languages and package managers:

| Language                                                                                                                                                               | Package manager     | Release status       |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | -------------------- |
| [Java](../../supported-languages-package-managers-and-frameworks/java-and-kotlin)                                                                                      | Maven, Gradle       | General Availability |
| [JavaScript](../../supported-languages-package-managers-and-frameworks/javascript), [TypeScript](../../supported-languages-package-managers-and-frameworks/typescript) | npm, Yarn           | Early Access         |
| [Python](../../supported-languages-package-managers-and-frameworks/python)                                                                                             | pip, poetry, pipenv | Early Access         |

Reachability analysis is supported in the following integrations:

| Integration                                                                                                                                                             | Release status       |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
| [GitHub](../../scm-ide-and-ci-cd-integrations/snyk-scm-integrations/github)                                                                                             | General Availability |
| [GitHub Enterprise](../../snyk-cli/scan-and-maintain-projects-using-the-cli/cli-tools/snyk-scm-contributors-count/scripts-for-scm-contributors-count/github-enterprise) | General Availability |
| [GitHub Cloud App](https://docs.snyk.io/scm-ide-and-ci-cd-integrations/snyk-scm-integrations/github-cloud-app)                                                          | General Availability |
| [Bitbucket Cloud](../../scm-ide-and-ci-cd-integrations/snyk-scm-integrations/bitbucket-cloud-app)                                                                       | General Availability |
| [Bitbucket Server](../../scm-ide-and-ci-cd-integrations/snyk-scm-integrations/bitbucket-data-center-server)                                                             | General Availability |
| [GitLab](../../scm-ide-and-ci-cd-integrations/snyk-scm-integrations/gitlab)                                                                                             | General Availability |
| [Azure Repos](../../scm-ide-and-ci-cd-integrations/snyk-scm-integrations/azure-repositories-tfs)                                                                        | General Availability |
| [Brokered connections](../../enterprise-setup/snyk-broker/connections-with-snyk-broker)                                                                                 | General Availability |

{% hint style="info" %}
Reachability analysis using the Snyk CLI, IDE, or other integrations is not supported.
{% endhint %}

## **Enabling Reachability** analysis **for brokered connections**

If you use a brokered connection to your SCM, configure the Broker to provide access to your source files. See [Git Clone through Broker ](../../enterprise-setup/snyk-broker/git-clone-through-broker)for configuration details for using Broker  with Snyk Code.&#x20;

## Using Reachability analysis

### Reachability status&#x20;

After a vulnerability is identified, it has one of the following reachability statuses:

* `REACHABLE` - A direct or indirect path was found from your application to the vulnerable code.
* `NO PATH FOUND` - No path found from your application to the vulnerable code.

{% hint style="info" %}
If a `NO PATH FOUND` status is given, do not assume that the vulnerability is totally unreachable or unexploitable.
{% endhint %}

Reachability analysis status is available [on the Project page](#on-the-project-page), [as part of the Risk Score](#as-part-of-the-risk-score), in the [Issues Detail report](../../reporting/available-snyk-reports#issues-detail-report), and through the API endpoint  [Get issues by Group ID](../../../snyk-api/reference/issues#groups-group_id-issues).&#x20;

### Reachability analysis as shown on the Project page

After you import  or test a Project using the Snyk UI, the Project is monitored by Snyk, and the results of the reachable vulnerabilities analysis appear on the Project page in the following places:

* Filters - Allow you to focus first on reachable vulnerabilities by filtering results based on reachability.
* Reachability badge - Allows you to quickly see on the issue card when a vulnerability is reachable.
* Call path - Allows you to see the path from your code to the vulnerable code element to validate the result.

<figure><img src="https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2FmbX2sp04kyBCKN9aL7qo%2Fimage.png?alt=media&#x26;token=9e6a03a4-ffa0-4cd4-8acc-e4de0bb7a240" alt="Reachability filters, badge and call path on the Projects UI"><figcaption><p>Reachability filters, badge and call path on the Projects UI</p></figcaption></figure>

### Reachability analysis as part of the Risk Score

[Risk Score](risk-score) helps you apply holistic risk-based prioritization that combines multiple factors,  associated with either the vulnerability or the context of your application. Reachability analysis is such a contextual factor that will significantly increase the overall score.&#x20;

Risk Score is available on the Projects page and through the API and Reports.&#x20;

<div data-full-width="false"><figure><img src="https://2533899886-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MdwVZ6HOZriajCf5nXH%2Fuploads%2FxiZdpOkEt72esqjeMOXt%2Fimage.png?alt=media&#x26;token=b4561db4-e996-4fa6-8987-a3eda2f1f461" alt="Reachability as part of the Risk Score"><figcaption><p>Reachability as part of the Risk Score</p></figcaption></figure></div>

{% hint style="info" %}
[Priority score](priority-score), the legacy model preceding the Risk Score, also takes reachable vulnerabilities into account.&#x20;
{% endhint %}

## How Reachable vulnerability analysis works

Snyk uses a combination of security expert analysis, program analysis, and various AI techniques to determine the reachability of a vulnerability, including these steps of analysis:&#x20;

1. **Enriching vulnerabilities with the patches applied to fix them** - as part of the Snyk vulnerability curation process, Snyk references the fix commit that the maintainer applied.&#x20;
2. **Related elements analysis** - Based on the commit fix, Snyk uses DeepCode AI program analysis to analyze the code elements and other parameters related to the vulnerability.&#x20;
3. **Root Cause analysis** - Snyk uses DeepCode AI and Natural language processing (NLP) techniques to automatically rank the related code elements by their chances of being the root cause of the vulnerability.  &#x20;
4. **Reachability analysis** -  As issues are found in your application by a Snyk scan, the DeepCode program analysis engine is used to analyze the call graph of your application in relation to the call graph between the open-source dependencies used. A path between your application and a code element ranked as a root cause will yield a “Reachable” vulnerability.&#x20;
5. **Security experts supervision** - Snyk security experts will manually verify and mark elements as root causes in order to make the entire analysis more accurate over time

The following considerations related to **false positives and false negatives** apply to Reachable vulnerability analysis.&#x20;

Program analysis requires a trade-off between accurate results, minimizing false positives, and recall rates, by avoiding potentially exploitable vulnerabilities.&#x20;

To facilitate this trade-off, Snyk DeepCode analysis applies real-time decision-making to determine whether to under-approximate the set of reachable elements based on analysis of the likelihood that a reachable path will be found in a specific environment.&#x20;

For example, it is not always possible to give a precise answer when reflection programming is used. In such a case, neither returning a large set of false positives nor returning “Not reachable” will suffice. Snyk Deep Code analysis optimizes in order to retrieve the most accurate and complete result possible for a given code structure.&#x20;

### Understanding the Limits of Reachability in Static Analysis

Snyk aims to identify and demonstrate when a code element is reachable, while also addressing the challenges of indicating that a code element cannot be reached.  &#x20;

Static analysis techniques can show that a vulnerability or code element can be reached through at least one execution path. However, just because there is no evidence of this does not mean that the element cannot be reached.&#x20;

A code element that is not marked as reachable may still be accessible under conditions that were not considered during analysis. This can occur due to incomplete information, control flow issues, potential dynamic behaviors, or overlooked edge cases.

Reachability is an important factor in assessing security risks. When evaluating these risks, consider both reachable issues and those that are not reachable. This helps you evaluate security risks as a whole, making sure you do not overlook any potential threats.
