Overview

This guide demonstrates how to integrate OpenText Core Application Security (Fortify on Demand) Application Security Testing (AST) into your Azure DevOps pipelines using a script-based approach, leveraging the @fortify/setup npm package to bootstrap fcli. Once bootstrapped, you can execute the fcli ci action to run scans, providing a unified yet customizable experience across your AST scan workflows on Azure DevOps and other CI systems. In the future, we may provide native fcli-based Azure DevOps tasks for an even easier integration.

Quick Start Example

Minimal configuration for running OpenText Fortify AST scans in Azure DevOps.

trigger:
  branches:
    include:
      - main
pr:
  branches:
    include:
      - main

variables:
  - group: fortify  # Variable group containing FOD_URL, FOD_CLIENT_ID, FOD_CLIENT_SECRET

jobs:
  - job: fortify
    pool:
      vmImage: 'ubuntu-latest'
    steps:
      - checkout: self                       # Check out source code
      - task: # ... setup build tool(s)      # Set up build tool(s) required to build your project
      - task: Bash@3 # Or PowerShell@2, using the PowerShell variant of the script below
        displayName: 'Run Fortify AST scan'
        inputs:
          targetType: 'inline'
          # Bash variant
          script: |
            # Bootstrap fcli
            npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env init --tools=fcli:bootstrapped
            # Add fcli to PATH and set related environment variables for subsequent steps in current script
            source <(npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env shell)
            # Alternatively, to make fcli ALSO available for subsequent tasks:
            # source <(npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env ado --output-as=shell)
            # Alternatively, to make fcli ONLY available for subsequent tasks:
            # npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env ado
            "${FCLI_CMD:-fcli}" action run ci  # Or any other fcli-based custom workflow
          # PowerShell variant
          # script: |
          #   # Bootstrap fcli
          #   npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env init --tools=fcli:bootstrapped
          #   # Add fcli to PATH and set related environment variables for subsequent steps in current script
          #   npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env pwsh | Out-String | Invoke-Expression
          #   # Alternatively, to make fcli ALSO available for subsequent tasks:
          #   # npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env ado --output-as=pwsh | Out-String | Invoke-Expression
          #   # Alternatively, to make fcli ONLY available for subsequent tasks:
          #   # npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env ado
          #   & "${env:FCLI_CMD:-fcli}" action run ci  # Or any other fcli-based custom workflow
        env:
          FOD_URL: $(FOD_URL)
          FOD_CLIENT_ID: $(FOD_CLIENT_ID)
          FOD_CLIENT_SECRET: $(FOD_CLIENT_SECRET)
          # FOD_RELEASE: MyApp:main        # Optional: defaults to repo:branch
          # FCLI_BOOTSTRAP_VERSION: v3.15  # Optional if you prefer stability over latest
          FORTIFY_SETUP_VERSION: v2.1      # Or v2 for latest features, v2.1.2 for stability

Platform Notes

To keep scripts portable across Linux/macOS and Windows agents, use the command path exported by @fortify/setup:

  • Bash: ${FCLI_CMD:-fcli} action run ci

  • PowerShell: & $env:FCLI_CMD action run ci

This is particularly important for Bash tasks on Windows agents, where invoking fcli without the full executable path may fail.

Tips & Recommendations

Centralized Configuration Management

For enterprise environments with multiple repositories, consider creating pipeline templates to wrap the Fortify integration. This approach provides:

  • Version stability: Pin specific @fortify/setup and fcli versions (e.g., FCLI_BOOTSTRAP_VERSION: v3.15.0) across all pipelines

  • Consistent configuration: Centrally manage common settings like tool versions and scan parameters

  • Controlled upgrades: Test new versions centrally before rolling out to all repositories

Example template structure:

# fortify-scan-template.yml (in your organization's shared template repository)
parameters:
  - name: fodRelease
    displayName: 'Optional FoD release, defaults to <repo>:<branch>'
    type: string
    default: ''
steps:
  - task: Bash@3
    displayName: 'Run Fortify AST scan'
    inputs:
      targetType: 'inline'
      script: |
        npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env init --tools=fcli:bootstrapped
        source <(npx @fortify/setup@$(FORTIFY_SETUP_VERSION) env shell)
        "${FCLI_CMD:-fcli}" action run ci
    env:
      FOD_URL: $(FOD_URL)
      FOD_CLIENT_ID: $(FOD_CLIENT_ID)
      FOD_CLIENT_SECRET: $(FOD_CLIENT_SECRET)
      FOD_RELEASE: $
      FCLI_BOOTSTRAP_VERSION: v3.15.0  # Centrally managed version
      FORTIFY_SETUP_VERSION: v2.1.2    # Centrally managed version

Air-Gapped Environments

For air-gapped or restricted network environments, host custom tool definitions and tool bundles in an internal SCM repository or artifact registry. Configure the integration to use these internal resources:

  • Set TOOL_DEFINITIONS to point to your internally hosted tool definitions file

  • Set FCLI_BOOTSTRAP_URL to download fcli from your internal mirror

This ensures all required tools are accessible without external internet access.

Configuration

Configuration is accomplished through environment variables set in your Azure DevOps pipeline YAML file. Secrets and variables should be configured in Azure DevOps Library or pipeline variables. The following sections document all available configuration options organized by their purpose.

Setup & Bootstrap

The script-based Azure DevOps integration leverages the @fortify/setup npm package to bootstrap fcli and supporting tools like ScanCentral Client. The environment variables in this section are provided by @fortify/setup v2.1.x (configured via FORTIFY_SETUP_VERSION=v2.1.x). If you configure a different @fortify/setup version, please refer to the @fortify/setup documentation for that version’s supported variables.

Note
@fortify/setup is automatically configured through the FCLI_BOOTSTRAP_* environment variables documented in this section. For simplicity and to avoid pipelines from interfering with each other, it is recommended to not use the @fortify/setup bootstrap-config command in CI pipelines.
Note
This integration requires @fortify/setup v2.1.2 or later, and fcli v3.15.0 or later.
Note
Environment variables listed in the subsequent sections are for fcli 3.15.0; if your bootstrap settings install another fcli version, please refer to to the fcli ci action documentation for that version.

Environment Variable

Description

FCLI_BOOTSTRAP_VERSION

By default, the latest fcli v3.x.y release is used for running the fcli-provided ci workflow, allowing you to always benefit from the latest features and fixes. If you prefer stability over automatic updates, you can pin to a specific minor or patch release like v3.15 or v3.15.0 by setting this environment variable to the desired version. Likewise, you can set this variable to an fcli pre-release tag like dev_v3.x to experiment with upcoming changes provided by an fcli development version.

FCLI_BOOTSTRAP_PATH

Path to a pre-installed fcli executable. When set, fcli bootstrapping will use this binary instead of downloading fcli.

FCLI_BOOTSTRAP_URL

By default, fcli is downloaded from the official GitHub releases page. This environment variable allows you to specify a custom URL, for example pointing to an internal mirror in air-gapped environments. In those cases, you’ll likely also want to set TOOL_DEFINITIONS to point to a custom tool definitions file to allow for downloading supporting tools like ScanCentral Client from the internal mirror.

FCLI_BOOTSTRAP_RSA_SHA256_URL

Custom URL for the fcli RSA SHA256 signature file. Defaults to <FCLI_BOOTSTRAP_URL>.rsa_sha256.

FCLI_BOOTSTRAP_VERIFY_SIGNATURE

Set to false to skip verification (not recommended) of the fcli download.

TOOL_DEFINITIONS

Supporting tools like ScanCentral Client or Debricked CLI are by default downloaded from the URLs defined in the default Fortify tool definitions. For airgapped environments, point this environment variable to an internally hosted custom tool definitions zip file to download these tools from an internal mirror.

PREINSTALLED

Set to true to require that all supporting tools (e.g., ScanCentral Client, Debricked CLI) invoked by the fcli ci action are already installed, preventing tool definitions from being updated or tools from being automatically installed. This is useful for environments where pre-installed tools must be used, or where automatic tool installation is not permitted.

Authentication & Connection

Configure credentials and connection details for OpenText Core Application Security (Fortify on Demand).

Environment Variable

Description

FOD_URL

OpenText Core Application Security (Fortify on Demand) URL, for example https://ams.fortify.com. This must be rendered by the CI/CD system as plain text, not as a masked secret/variable.

FOD_CLIENT_ID
FOD_CLIENT_SECRET

Required when authenticating with an API key: OpenText Core Application Security (Fortify on Demand) Client ID (API key) and Secret (API secret).

FOD_TENANT
FOD_USER
FOD_PASSWORD

Required when authenticating with user credentials: OpenText Core Application Security (Fortify on Demand) tenant, user and password. It is recommended to use a Personal Access Token instead of an actual user password.

FOD_LOGIN_EXTRA_OPTS

Extra login options, for example for disabling SSL checks or changing connection time-outs; see fcli fod session login documentation.

Release Management

Configure OpenText Core Application Security (Fortify on Demand) release settings, including automatic creation and setup of applications and releases if they don’t exist.

Environment Variable

Description

FOD_RELEASE

OpenText Core Application Security (Fortify on Demand) release to use with this action. This should be specified as <app-name>:<release-name> (for non-microservices applications) or <app-name>:<microservice-name>:<release-name> (for microservices applications). Default value is based on repository and branch name, for example myOrg/myRepo:myBranch. Note that you’ll need to explicitly configure FOD_RELEASE for microservices applications, as the default value lacks a microservice name.

DO_SETUP
SETUP_ACTION
SETUP_EXTRA_OPTS
OVERRIDE_SAST_SETTINGS

If DO_SETUP is set not set to false, the application and/or release will be created if they do not yet exist, and static scan settings will be configured if necessary. By default, static scan settings will only be configured if no settings have been previously configured for the release; set OVERRIDE_SAST_SETTINGS to true to override existing static scan settings. The setup will be performed using the fcli-provided fcli-provided setup-release action, or, the custom fcli action specified through SETUP_ACTION. Extra options for the fcli action can be passed through the SETUP_EXTRA_OPTS environment variable, but also see below for some convenience environment variables.

COPY_FROM_RELEASE

Depending on your Git workflow, when a new release is created, it is recommended to copy state from the release representing your default branch by either setting this environment variable or by passing the --copy-from option through SETUP_EXTRA_OPTS.

SAST_ASSESSMENT_TYPE

By default, when setting up a release for SAST scanning, the SAST scan will be configured with the Static Assessment assessment type. You can choose a different assement type by either setting this environment variable or by passing the --assessment-type option through SETUP_EXTRA_OPTS. Note that this won’t update the assessment type if SAST scan settings have already been configured for the release, unless you set OVERRIDE_SAST_SETTINGS to true.

DO_AVIATOR_AUDIT

To enable Aviator audits, set this environment variable to true or pass --use-aviator through SETUP_EXTRA_OPTS. Note that Aviator avaliablility depends on tenant and scan policy configuration, and may consume additional entitlement units. Also note that this setting will be ignored if SAST scan settings have already been configured for the release, unless you set OVERRIDE_SAST_SETTINGS to true.

DO_SCA_SCAN

To enable Software Composition Analysis in your SAST scans, set this environment variable to true or pass --oss through SETUP_EXTRA_OPTS. Note that Debricked or Sonatype availability depends on tenant and scan policy configuration, and may consume additional entitlement units. Also note that this option will be ignored if SAST scan settings have already been configured for the release, unless you set OVERRIDE_SAST_SETTINGS to true.

Package Configuration

Configure source code packaging behavior for SAST scans. Control whether to use custom packaging actions, specify pre-built packages, or customize ScanCentral Client usage.

Environment Variable

Description

PACKAGE_ACTION
PACKAGE_ACTION_EXTRA_OPTS

By default, when running a SAST scan, the fcli package action is used to (optionally) package the source code to be scanned; see next entry for information on how to configure the default package action. If the standard fcli package action doesn’t meet your needs, for example if you want to perform a local translation using Fortify Static Code Analyzer, you can use PACKAGE_ACTION to use a custom action for packaging, optionally providing extra options to this custom action through the PACKAGE_ACTION_EXTRA_OPTS environment variable. Note that any custom action must set the global.package.output action variable, pointing to the package or MBS file to be scanned.

USE_PACKAGE
PACKAGE_EXTRA_OPTS
SC_CLIENT_VERSION
SC_CLIENT_HOME
SOURCE_DIR

These environment variables define packaging behavior. If USE_PACKAGE is specified, packaging will be skipped and the given package or MBS file (which must already exist) will be used. To pass additional options to the scancentral package command like -bt or -bf, use PACKAGE_EXTRA_OPTS. Note that the -oss option will be automatically added if Software Composition Analysis in enabled in FoD SAST scan settings.

By default:
* If SC_CLIENT_HOME is specified, the pre-installed ScanCentral Client at that location will be registered and used, skipping automatic installation. The path should point to the installation directory or binary.
* SC_CLIENT_VERSION may be specified to request a specific ScanCentral Client version to be used. Allowed values:
* An explicit version number (e.g. 25.2 or 25.2.0)
* Path to a specific ScanCentral Client installation
* latest to use the latest available ScanCentral Client version
* auto (default) to use a pre-installed version if available, otherwise installs latest
* If neither SC_CLIENT_VERSION nor SC_CLIENT_HOME are set, defaults to auto behavior.
* Current working directory will be packaged; use SOURCE_DIR to package a different directory.
* Debug logging for Scancentral Client is disabled; pass --debug on the fcli invocation to enable debug logging.

Scan Execution

Configure SAST scan execution and waiting behavior for OpenText Core Application Security (Fortify on Demand).

Environment Variable

Description

DO_SAST_SCAN
SAST_SCAN_EXTRA_OPTS

The fcli ci action currently only supports running a SAST scan, which is enabled by default. The SAST_SCAN_EXTRA_OPTS environment variable can be used to provide additional options to the fcli fod sast-scan start command, for example to specify scan notes. Note that these environment variables only control the submission of the scan request; see the information below for details on waiting for the scan to complete.

DO_WAIT
DO_SAST_WAIT
SAST_WAIT_EXTRA_OPTS

By default, the fcli ci action will wait for all started scans to complete; set DO_WAIT to false to just kick off any configured scans without waiting for completion. Note that doing so will skip any post-scan tasks. The SAST_WAIT_EXTRA_OPTS environment variable can be used to pass extra options to the fcli fod sast-scan wait-for command.

Post-Scan Actions

Configure post-scan tasks including release summaries, policy checks, pull request comments, and vulnerability data exports for OpenText Core Application Security (Fortify on Demand). NOTE: Availability and behavior of post-scan tasks may vary across CI/CD systems and fcli versions.

Environment Variable

Description

DO_RELEASE_SUMMARY
RELEASE_SUMMARY_ACTION
RELEASE_SUMMARY_EXTRA_OPTS

If DO_RELEASE_SUMMARY is not set to false, a release summary will be generated using the fcli-provided release-summary action or, if specified, the custom fcli action specified through RELEASE_SUMMARY_ACTION. Extra options for the fcli action can be specified through the RELEASE_SUMMARY_EXTRA_OPTS environment variable, which may include fcli options to allow unsigned custom actions to be used.

DO_CHECK_POLICY
CHECK_POLICY_ACTION
CHECK_POLICY_EXTRA_OPTS

If DO_CHECK_POLICY is set to true (implied if any of the other two CHECK_POLICY_* variables are set), a policy check will be run after scan completion using the fcli-provided check-policy action or, if specified, the custom fcli action specified through CHECK_POLICY_ACTION. Extra options for a custom fcli action can be passed through the CHECK_POLICY_EXTRA_OPTS environment variable, which may include fcli options to allow unsigned custom actions to be used.

DO_PR_COMMENT
PR_COMMENT_ACTION
PR_COMMENT_EXTRA_OPTS

(PREVIEW) If DO_PR_COMMENT is set to true (implied if any of the other two PR_COMMENT_* variables are set), a Pull Request or Merge Request comment will be generated using an fcli-provided action matching the current CI system like github-pr-comment or, if specified, the custom fcli action specified through PR_COMMENT_ACTION. Extra options for the fcli action can be specified through the PR_COMMENT_EXTRA_OPTS environment variable, which may include fcli options to allow unsigned custom actions to be used.

DO_SAST_EXPORT
SAST_EXPORT_ACTION
SAST_EXPORT_EXTRA_OPTS

If DO_SAST_EXPORT is not set to false and a SAST scan was completed, the SAST vulnerability data will be exported into a CI-specific format using an fcli-provided action matching the current CI system like github-sast-report or gitlab-sast-report, or, if specified, the custom fcli action specified through SAST_EXPORT_ACTION. Extra options for the fcli action can be specified through the SAST_EXPORT_EXTRA_OPTS environment variable, which may include fcli options to allow unsigned custom actions to be used.

Additional Resources