Overview
The fortify/github-action/setup@v3 action allows for setting up fcli and various other Fortify tools for use in custom CI/CD workflows.
This allows you to implement fully customized AST scan workflows or other automation workflows that interact with Fortify products.
The Fortify tools to be installed are specified through action inputs, whereas optional bootstrapping behavior for fcli and supporting tools can be controlled through environment variables.
Quick Start Example
Basic setup for custom workflows with fcli version pinning.
name: Custom Fortify Workflow
on: [push]
jobs:
custom-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fortify/github-action/setup@v3
with:
fcli: bootstrapped # Set up bootstrapped fcli version. May also specify specific version, but
# then fcli may be downloaded twice (bootstrap version and requested version).
env:
FCLI_BOOTSTRAP_VERSION: v3.15.0 # Defaults to latest v3.x.y, pin to specific version for stability
- name: Run custom fcli commands
run: |
fcli fod session login ...
# Your custom workflow here
fcli fod session logout ...
Tips & Recommendations
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_DEFINITIONSto point to your internally hosted tool definitions file -
Set
FCLI_BOOTSTRAP_URLto download fcli from your internal mirror
This ensures all required tools are accessible without external internet access.
Configuration
Specifying the tools to be installed is done through action inputs, whereas bootstrapping behavior can be controlled through environment variables as shown in the following sections.
Action Inputs
Action inputs allow you to specify which Fortify tool versions to install, and whether the corresponding binaries
should be added to the system PATH. The following action inputs are supported:
| Input | Description |
|---|---|
|
Whether to add the installed tools to the system PATH variable. Allowed values: |
|
The fcli version to install. Allowed values: |
|
The ScanCentral Client version to install. Allowed values: |
|
The FoDUploader version to install. Allowed values: |
|
The FortifyVulnerabilityExporter version to install. Allowed values: |
|
The FortifyBugTrackerUtility version to install. Allowed values: |
|
The Debricked CLI version to install. Allowed values: |
Setup & Bootstrap
The environment variables in this section allow you to customize bootstrapping behavior of fcli and supporting tools like ScanCentral Client.
|
Note
|
This GitHub Action requires at least fcli v3.15.0 to function correctly. |
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 |
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 |
FCLI_BOOTSTRAP_RSA_SHA256_URL |
Custom URL for the fcli RSA SHA256 signature file. Defaults to |
FCLI_BOOTSTRAP_VERIFY_SIGNATURE |
Set to |
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 |
Migrating from fortify/github-action/setup@v2
The fortify/github-action/setup@v3 action supports the same action inputs as v2.x.y versions, so migrating should be straightforward.
However, bootstrapping behavior for fcli has changed; please review the following table for details:
| fortify/github-action/setup@v2 | fortify/github-action/setup@v3 | Recommended Action |
|---|---|---|
Undocumented |
Documented |
Use |
Uses |
Uses |
If you used custom tool definitions, you’ll need to change from |
Resources
-
Marketplace Listing: https://github.com/marketplace/actions/fortify-ast-scan
-
Action Repository: https://www.github.com/fortify/github-action
-
Starter workflow: https://github.com/actions/starter-workflows/blob/main/code-scanning/fortify.yml