> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/ox-code/ox-scan-engines/open-source-security.md).

# Open Source Security

## About Open Source Security

Open Source Security helps you identify and remediate known security vulnerabilities in open-source and third-party components used by your applications.

Applications often rely on third-party libraries to simplify development and reduce development time. However, these components can introduce vulnerabilities that affect your application's security.

OX analyzes direct dependencies (components explicitly included in your application) and transitive dependencies (components used by other dependencies). It identifies known vulnerabilities (CVEs) across all dependency levels, including vulnerabilities inherited from components that your application does not use directly.

OX also identifies vulnerable base images referenced in Dockerfiles and provides dependency graphs to help you understand how vulnerable components are introduced into your applications. OX can link vulnerabilities detected in source code to related vulnerabilities in container images, helping you trace security issues across your application.

To provide additional context for vulnerability assessment and prioritization, OX also identifies:

* **Dependency type:** Whether a dependency is used for development or production.
* **Dependency classification:** Whether a dependency is direct or transitive, and whether it is a development dependency (dev dependency).
* **Deployment context:** Whether a dependency is found only in source code, included in a built artifact, or deployed to the cloud.
* **Dependency pinning:** Whether a dependency is pinned to a specific version or allows a range of versions.

## What OX helps you identify

| Finding type                          | Description                                                                                                           |
| ------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| Vulnerable dependencies in code       | Identifies known security vulnerabilities (CVEs) in direct and transitive open-source dependencies used in your code. |
| Vulnerable base images in Dockerfiles | Identifies known vulnerabilities in base images referenced by Dockerfiles in your repositories.                       |

For information about license compliance, malicious dependencies, deprecated components, and other software supply chain risks, see [SBOM](https://docs.ox.security/ox-code/ox-code-inventory/sbom.md).

## How it works

OX continuously helps you identify, assess, and remediate vulnerabilities in open-source components.

1. OX analyzes open-source dependencies in code from connected repositories, including direct and transitive dependencies, development dependencies (dev dependencies), and base images referenced in Dockerfiles.
2. OX correlates detected components and their versions with known vulnerabilities from security advisory databases, including the National Vulnerability Database (NVD) and GitHub Security Advisories (GHSA).
3. OX identifies vulnerable dependencies and base images and aggregates related vulnerabilities by dependency and repository to reduce duplicate findings.
4. OX enriches issues with security context, including reachability, exploitability, and potential damage, and uses this information to prioritize issues according to their potential impact on your organization.
5. Findings are available throughout OX for investigation and remediation. Where supported, OX provides remediation recommendations and enables you to create tickets or pull requests.

For more information, see [Issue prioritization](https://docs.ox.security/issue-prioritization.md).

## Understanding direct and transitive dependencies

Open-source components frequently depend on other libraries. These dependencies can introduce vulnerabilities even when the component your application uses directly has no known vulnerabilities.

OX identifies direct and transitive dependencies and determines whether they are used for development purposes.

A development dependency can be either direct or transitive. OX identifies development dependencies to provide additional context when assessing vulnerabilities.

The following dependency types are available:

| Dependency type                         | Description                                                                                                                                   |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| Direct dependency                       | A component explicitly declared and used by your application.                                                                                 |
| Transitive dependency                   | A component required by another dependency, which may itself depend on additional components.                                                 |
| Development dependency (dev dependency) | A component used during development, testing, or building an application, but not typically required when the application runs in production. |

For example, your application uses Library A, which depends on Library B. If Library B contains a known vulnerability, your application may be affected even if Library A has no known vulnerabilities.

OX identifies vulnerabilities at every dependency level, helping you trace a vulnerable component back to the dependency that introduced it.

### Dependency graph

The dependency graph provides a visual representation of the relationships between direct and transitive dependencies.

<figure><img src="https://884876233-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FdK3XMLdV8zRg847RmGmZ%2Fuploads%2Fgit-blob-60faceccc00429a8718b82bd5067c4ede8bc225f%2FDependency_graph1.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

You can use the dependency graph to:

* Understand how dependencies are connected.
* Identify which direct dependency introduces a vulnerable transitive dependency.
* Trace vulnerabilities through multiple dependency levels.
* Determine which components may need to be updated to remediate an issue.

For example, a direct dependency might have no known vulnerabilities, but one of its transitive dependencies may contain multiple CVEs. The dependency graph helps you identify the vulnerable component and understand its relationship to the application.

## Understanding dependency management

Most applications manage open-source dependencies using manifest files and lock files. Understanding the difference between these files is important because they serve different purposes during vulnerability detection and remediation.

| File type     | Description                                                                                                             | Examples                                           |
| ------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------- |
| Manifest file | Defines the dependencies an application intends to use, including permitted version ranges.                             | `package.json`, `pom.xml`, `requirements.txt`      |
| Lock file     | Records the exact dependency versions resolved and installed by the package manager, including transitive dependencies. | `package-lock.json`, `poetry.lock`, `Gemfile.lock` |

For example, a manifest file might specify a permitted version range for React, while the lock file records the exact version selected during dependency installation.

OX uses lock-file information, where available, to identify the actual dependency versions and detect known vulnerabilities.

When OX recommends remediation, the suggested change may target the manifest file, allowing the package manager to resolve and install an appropriate version.

This distinction is important because the version range declared in the manifest file does not necessarily represent the exact dependency version used by the application.

## Understanding dependency usage

OX distinguishes between dependencies that are declared in a manifest file but never imported into the application code and dependencies that are imported but never used.

| Dependency status       | Description                                                                                                                    | Example                                                                                                                             |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| Dependency not imported | The dependency is declared in the manifest file but is not imported anywhere in the application code.                          | `requirements.txt` includes `requests`, but no Python file contains an import statement for it.                                     |
| Dependency not used     | The dependency is declared in the manifest file and imported into the application code, but none of its functionality is used. | `requirements.txt` includes `requests`, and a Python file contains `import requests`, but the code never uses the imported library. |

For example, consider a Python application with `requests` declared in its `requirements.txt` file:

```
requests==2.32.3
```

* Dependency not imported: No Python file contains `import requests` or `from requests import ...`.
* Dependency not used: A Python file contains `import requests`, but no code uses any functionality provided by the library.

In both cases, the dependency is declared but is not actively used by the application. The difference is whether the dependency is imported into the code.

### Open Source Security policies

OX provides policies to identify security vulnerabilities associated with open-source dependencies and base images referenced in Dockerfiles.

These policies cover:

* Vulnerable dependencies in code, including direct and transitive dependencies.
* Vulnerable base images referenced in Dockerfiles.

You can use policies to define how OX evaluates these findings and manages the associated security risks.

For information about available policies and their configuration, see [Open Source Security Policies](https://docs.ox.security/ox-policies/code-security/open-source-security-policies-1.md).

## Integrations

OX uses connected source code repositories to analyze open-source dependencies and identify vulnerabilities.

Repository integrations enable OX to access dependency information, including manifest files, lock files, and Dockerfiles.

For information about connecting your repositories, see [open source security](https://docs.ox.security/ox-integrations/3rd-party-integrations/open-source-security.md) integrations.

Container image scanning is handled separately by container security. For information about connecting to contacontainer-relatedgrations, see [Registry](https://docs.ox.security/ox-integrations/3rd-party-integrations/registry.md).

## Where to view results

You can review Open Source Security findings in the following locations:

<table data-header-hidden><thead><tr><th width="222.3333740234375"></th><th></th></tr></thead><tbody><tr><td>Location</td><td>Description</td></tr><tr><td><a href="https://docs.ox.security/get-started/onboarding-to-ox/review-scan-results/dashboard.md">Dashboard</a></td><td>Monitor your organization's overall security posture, including open-source vulnerabilities.</td></tr><tr><td><a href="https://docs.ox.security/analyze-with-ox/analyzing-scan-results/issues.md">Active Issues</a></td><td>Investigate individual vulnerabilities, review their context, and take remediation actions.</td></tr><tr><td><a href="https://docs.ox.security/ox-code/ox-code-inventory/applications.md">Applications</a></td><td>Review open-source vulnerabilities associated with a specific application.</td></tr><tr><td><a href="https://docs.ox.security/ox-code/ox-code-inventory/sbom.md">SBOM</a></td><td>Explore the components and dependencies used by your applications, including direct and transitive dependencies and associated CVEs.</td></tr></tbody></table>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ox.security/ox-code/ox-scan-engines/open-source-security.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
