> ## 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.

# Environment logging and scanning

Environment logging gives you visibility into the security posture of your local conda environments (A self-contained, isolated space for installing and running software packages.). With environment logging enabled, you can view the packages (Software files and information about the software, such as its name, version, and description, bundled into a file that can be installed and managed by a package manager.) installed in your environments, identify Common Vulnerabilities and Exposures (CVEs (A public identifier for a known security flaw in software, used to track and assess vulnerabilities.)) associated with them, and proactively address security issues before administrator intervention.

## Enabling environments

If an administrator has enabled environments for your organization, running `anaconda login` prompts you to install the `anaconda-env-manager` metapackage and register your machine with your organization.

After setup, conda automatically logs any environment you create or update.

> [accordion] Plugins provided by the anaconda-env-manager metapackage
>
> <dl>
>   <dt>`anaconda-env-log`</dt>
>
>   <dd>Automatically logs the current state of an environment whenever you perform a `create`, `install`, `remove`, `rename`, or `update` action with conda. Manual logging of existing environments is also supported.</dd>
>
>   <dt>`anaconda-activate-check`</dt>
>
>   <dd>Validates environments against administrator-defined security controls before activation and notifies you of warnings or access restrictions with guidance for resolution.</dd>
>
>   <dt>`anaconda-audit`</dt>
>
>   <dd>Scans local environments to assess the security impact of actions like installing or updating packages, so you can proactively address potential issues without requiring administrator intervention.</dd>
> </dl>

```text wrap theme={null}
(base) ➜  ~ anaconda login
Anaconda Environment Manager is required by your organization. It is recommended to install. Proceed? [y/n] (y): y
Installing anaconda-env-manager...
✔︎ anaconda-env-manager installed successfully.
Only one organization found, automatically selecting: my-organization
Linking this machine to organization my-organization...
✔ This machine is now registered with my-organization. Conda environments will be logged to this organization.
```

> [!NOTE]
>
> If you belong to multiple organizations, you are prompted to select one from the list before registration completes.

## Logging environments

Environments that you created prior to setup can be manually logged with your organization:

```sh theme={null}
anaconda env-log log --name <ENV_NAME>
```

Comments

Replace \<ENV\_NAME> with the name of the environment you want to log to your organization.

## Viewing your environments

To view environments you've logged to your organization, select  **Environments** under Org Management.

![View logged environments](https://mintcdn.com/anaconda-29683c67/ghAcs1Rv_eiLtpni/images/anaconda-platform/ap_view_org_environments.png?fit=max\&auto=format\&n=ghAcs1Rv_eiLtpni\&q=85\&s=fb15e842cdac8cab182cc7421405446f)

> [!NOTE]
>
> You can only view environments that you've logged to your organization.

### Searching and filtering

Search for environments by name or path using the search box at the top of the table. You can also filter by platform.

![Environment search and filters](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-platform/ap_env_search_filter.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=ea855db99e76acf15406999b8e0aea55)

## Scanning environments

Scanning checks the most recently saved environment log for CVEs associated with its packages.

> [!NOTE]
>
> Environments are automatically scanned when created but not when updated. Perform a scan before investigating an environment to ensure its data is current.

> [tab] Scanning locally
>
> ```sh theme={null}
> anaconda audit scan [OPTIONS]
> ```
>
> Option
>
> Description
>
> `--name, -n`
>
> Scan an environment by name (uses default conda environment path prefix)
>
> `--prefix, -p`
>
> Scan an environment at a specific path
>
> `--affected-only`
>
> Only display packages that have CVE matches
>
> `--json`
>
> Output results in JSON format (disables summary table)
>
> `--no-include-cleared`
>
> Exclude cleared CVEs from results
>
> `--no-include-mitigated`
>
> Exclude mitigated CVEs from results
>
> **Reading scan results:**
>
> Scan output includes a package table and a summary matrix of CVE counts by severity level.
>
> * Color indicates [CVE severity](https://anaconda.com/docs/anaconda-platform/admin/cve#common-vulnerability-scoring-system-cvss)
> * ✓ indicates the CVE has undergone [Anaconda curation](https://anaconda.com/docs/anaconda-platform/admin/cve#cve-statuses)
> * ~~Strikethrough~~ indicates a cleared CVE that is safe to use
>
> ![Scan results summary](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-platform/anaconda_audit_scan_summary.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=c180d358a19cad040a63fd611f94dcab)

> [tab] Scanning from your organization
>
> Scan an environment that has been logged with your organization to get an updated list of CVEs:
>
> 1. Select  **Environments** from the left-hand navigation.
> 2. Select the environment you want to scan.
> 3. Click  **Update Scan**.
>
>    ![Update scan button](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-platform/ap_env_scan_in_cloud.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=d6c345b2cd22163d3eb6a10271067a6e)

## Investigating environments

### Viewing packages

Click the package count under the **PACKAGES** column to see which packages are installed in an environment and what channels (A location (URL or file path) in a repository where conda looks for packages.) they were sourced from.

![Viewing a logged environment's packages](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-platform/ap_env_pkgs.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=bcc8596e16ceae195e3bf268e273c54b)

> [!NOTE]
>
> Use the navigation controls at the bottom to browse the environment's packages.

### Viewing CVEs

> [tab] Environment CVEs
>
> Click the CVE count in the **CVES** column to view all CVEs associated with an environment. Each entry includes the CVE name, CVSS score, Anaconda curation date, a description, and its current status.
>
> Use the filters at the top of the page to locate critical CVEs. Select a CVE from the list to view its details.
>
> ![Viewing a logged environment's CVEs](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-platform/ap_env_cves.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=025f3fe9b54ba0857a24431fa46c5c62)

> [tab] Package CVEs
>
> To view CVEs associated with a specific package:
>
> 1. Click the package count in the **PACKAGES** column.
> 2. Locate the package.
> 3. Click the CVE count beside the package.
>
>    Each entry includes the CVE name, CVSS score, Anaconda curation date, a description, and its current status. Select a CVE from the panel to view its details.
>
>    ![CVEs associated with a specific package in a logged environment](https://mintcdn.com/anaconda-29683c67/XTSpR8a-Sn-FW1SQ/images/anaconda-platform/ap_env_pkg_cves.png?fit=max\&auto=format\&n=XTSpR8a-Sn-FW1SQ\&q=85\&s=ccced75551d6f8a0229c92c799d8cbe2)

> [!NOTE]
>
> The **active** filter is applied to CVE results by default.

### Checking environments for vulnerabilities

To check if any of your environments are affected by a specific vulnerability, search by CVE ID using the [unified search](https://anaconda.com/docs/anaconda-platform/user/unified-search.md) bar at the top of the page. Results include environments you've logged that contain packages associated with the CVE you're searching for.

![The unified search bar at the top of anaconda.com/app](https://mintcdn.com/anaconda-29683c67/ghAcs1Rv_eiLtpni/images/anaconda-platform/ap_unified_search.png?fit=max\&auto=format\&n=ghAcs1Rv_eiLtpni\&q=85\&s=328d3a861548a4e12847687bbcf1d3af)
