Cybersecurity
DevOps Cloud (ADM)
IT Operations Cloud
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
URL Name
KM000014881