> ## Documentation Index
> Fetch the complete documentation index at: https://anaconda.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CVEs and SBOMs

You can view CVE (Common Vulnerabilities and Exposures) information and download SBOMs (Software Bills of Materials) for packages in your Package Security Manager repository from the command line. For general information about CVEs, see [CVEs](https://anaconda.com/docs/psm-on-prem/6.8.0/admin/cve.md).

## Listing CVEs

To list the CVEs associated with packages in your repository:

```sh theme={null}
conda repo cves --list
```

This returns the CVE ID, score, type, curation status, the number of affected packages, and a brief description of the vulnerability.

## Viewing files associated with a CVE

To view the specific files associated with a CVE:

```sh theme={null}
conda repo cves --show-files <CVE_ID>
```

Comments

Replace \<CVE\_ID> with the CVE identifier (for example, `CVE-2023-12345`).

## Viewing CVE details

To view the full details of a specific CVE, including CVSS2 and CVSS3 score metrics:

```sh theme={null}
conda repo cves --show <CVE_ID>
```

Comments

Replace \<CVE\_ID> with the CVE identifier.

## Downloading an SBOM

To download an SBOM for an artifact in your Package Security Manager:

```sh theme={null}
conda repo sbom --channel <CHANNEL> --ckey <CKEY>
```

Comments

Replace \<CHANNEL> with the channel containing the package.\\

Replace \<CKEY> with the artifact's CKEY string, including its platform prefix (for example, `osx-arm64/mypackage-1.0.0-py312_0.conda`).

The SBOM is saved as an `.spdx.json` file in your current directory.

> [!NOTE]
>
> An artifact's CKEY string can be found by [viewing package details](https://anaconda.com/docs/psm-on-prem/6.8.0/cli/packages.md#viewing-package-details).

## Downloading an artifact report

If you need to know which users are downloading which packages from a given channel:

```sh theme={null}
conda repo report --date_from <START_DATE> --date_to <END_DATE> --file-type <TYPE> --user_names <USERS> --channels <CHANNELS> --filename <REPORT>
```

Comments

Replace \<START\_DATE> with the beginning of a date range (format: `YYYY-MM-DD`).\\

Replace \<END\_DATE> with the end of a date range (format: `YYYY-MM-DD`).\\

Replace \<TYPE> with an output file type (`json` or `csv`).\\

Replace \<USERS> with a comma-separated list of users to report on.\\

Replace \<CHANNELS> with a comma-separated list of channels to report on.\\

Replace \<REPORT> with a name for your report download file.

For example:

```sh theme={null}
conda repo report --date_from 2023-01-01 --date_to 2023-03-30 --file-type json --user_names user1,user2,user3 --channels anaconda,snakes --filename anaconda_server_usage_report_Q1_2023
```

> [!TIP]
>
> You can specify a location for your report with a file path, such as `/User/tmp/SBOM_report.json`. If no location is specified, the report is placed in your current working directory.

> [!NOTE]
>
> A maximum span of one year is allowed between the start and end of the date range.

## Related

* [CVEs](https://anaconda.com/docs/psm-on-prem/6.8.0/admin/cve.md): Managing CVEs through the GUI
* [SBOMs](https://anaconda.com/docs/psm-on-prem/6.8.0/user/sbom.md): Downloading SBOMs through the GUI
* [`cves` command reference](https://anaconda.com/docs/psm-on-prem/6.8.0/cli/commands/cves): Full options and flags
* [`sbom` command reference](https://anaconda.com/docs/psm-on-prem/6.8.0/cli/commands/sbom): Full options and flags
* [`report` command reference](https://anaconda.com/docs/psm-on-prem/6.8.0/cli/commands/report): Full options and flags
