Python command-line options

The following table describes the Python options.

Python option Description

-python-version <version>

Specifies the Python source code version to scan. The valid values for <version> are 2 and 3. The default value is 3.

Equivalent property name:
com.fortify.sca.PythonVersion

-python-no-auto-root-calculation

Disables the automatic calculation of a common root directory of all project source files to use for importing modules and packages.

Equivalent property name:
com.fortify.sca.PythonNoAutoRootCalculation

-python-path <dirs>

Specifies a semicolon-separated (Windows) or colon-separated (non-Windows) list of additional import directories. You can use the -python-path option to specify all paths used to import packages or modules. Include all paths to namespace package directories with this option. OpenText SAST sequentially searches the specified paths for each imported file and uses the first file encountered.

Equivalent property name:
com.fortify.sca.PythonPath

-django-template-dirs <dirs>

Specifies a semicolon-separated (Windows) or colon-separated (non-Windows) list of directories that contain Django templates. OpenText SAST sequentially searches the specified paths for each Django template file and uses the first template file encountered.

Equivalent property name:
com.fortify.sca.DjangoTemplateDirs

-django-disable-autodiscover

Specifies that OpenText SAST does not automatically discover Django templates.

Equivalent property name:
com.fortify.sca.DjangoDisableAutodiscover

-jinja-template-dirs <dirs>

Specifies a semicolon-separated (Windows) or colon-separated (non-Windows) list of directories that contain Jinja2 templates. OpenText SAST sequentially searches the specified paths for each Jinja2 template file and uses the first template file encountered.

Equivalent property name:
com.fortify.sca.JinjaTemplateDirs

-disable-template-autodiscover

Specifies that OpenText SAST does not automatically discover Django or Jinja2 templates.

Equivalent property name:
com.fortify.sca.DisableTemplateAutodiscover

Python Properties