Wikis - Page

Knowledge Doc: [ ScanCentral SAST 22.2} Starting ScanCentral SAST in an unactivated virtual environment - exception collecting python dependencies

0 Likes

Summary

How to resolve the following warning message on a Python scan in ScanCentral SAST: 2023-02-21 12:07:24,791 [WARN] com.fortify.cloud.cli.command.packager.PythonProjectConfigurator - Exception collecting python dependencies. com.fortify.cloud.cli.util.PythonHandler$ExecutionException: Virtual environment is deactivated. There is not installation to collect packages from. Please start ScanCentral client from activated virtual environment, or specify path to existing virtual environment, or specify path to requirements file.

Products

Fortify

Environment

ScanCentral SAST 22.2

Situation

Starting a ScanCentral SAST Python scan gets the following warning message:

[WARN] com.fortify.cloud.cli.command.packager.PythonProjectConfigurator - Exception collecting python dependencies.
com.fortify.cloud.cli.util.PythonHandler$ExecutionException: Virtual environment is deactivated. There is not installation to collect packages from.
Please start ScanCentral client from activated virtual environment, or specify path to existing virtual environment, or specify path to requirements file.

Cause

The scan is being started in an unactivated virtual environment which requires specific command line parameters.

Resolution

To start ScanCentral SAST in a virtual environment (with all dependencies installed) without activating that virtual environment:

Open a command line.
Start the Python project scan with one of the following:

scancentral -url <controller_url> start -bt none --python-virtual-env <venv_location>
or
scancentral -url <controller_url> start -bt none --python-virtual-env <venv_location> --python-requirements <path_to_requirements_file>​​​​​​​
ScanCentral SAST goes to the virtual environment, determines the Python version used, packages all required libraries, and then creates the p ackage.

Additional Information
https://www.microfocus.com/documentation/fortify-software-security-center/2220/SC_SAST_Help_22.2.0/index.htm#Submit_Job.htm?Highlight=python


Knowledge Base Article Link


URL Name
KM000014881

Labels:

Support Tips/Knowledge Docs
Comment List
Related
Recommended