Skip to main content

Conda Application Analysis

The Conda coordinate-based matching feature provides the ability to scan and evaluate dependencies for any language (Python, Java, JavaScript, C++) found in the conda.txt file.

What is supported

Files named conda.txt will be analyzed. Only exact requirements i.e. without wildcards will be considered.

Steps to analyze using the Sonatype IQ CLI

Create requirements

Run the conda list command with the flags --explicit and -e (export).

conda list --explicit -e > conda.txt

Example conda.txt file

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: linux-64


Starting from release 130, the following command is deprecated. Please upgrade to release 130 and use the above command which includes the --explicit flag to include more details for more accurate results.

The conda.txt encoding is UTF-8. Special note for Microsoft Windows users, the cmd.exe encoding may need to be changed to UTF-8. Please refer to Microsoft documentation on how to do this.

Run the conda list command with the flag -e (export).

conda list -e > conda.txt

Example conda.txtfile

# platform: linux-64

Scan using Sonatype IQ CLI

Invoke a Sonatype IQ CLI scan of a directory or subdirectories containing a conda.txt file. Instructions on how to do this can be found here: Sonatype IQ CLI.

Steps to analyze using the Jenkins plugin

By default, the Jenkins plugin will not evaluate the conda.txt file. A custom Scan Target is needed.

Example Pipeline Script with Scan Patterns

nexusPolicyEvaluation iqApplication: 'SampApp', iqScanPatterns: [[scanPattern: '**/conda.txt']], iqStage: 'build'

To find more information on how to configure Jenkins please go to Sonatype Platform Plugin for Jenkins

Steps to analyze using the Bamboo plugin

Bamboo Scan Targets control what files are examined. To evaluate Conda, add conda.txt to the scan targets via "**/conda.txt". To find more information on how to configure Bamboo please go to link before this Sonatype IQ for Bamboo.