Fortinet white logo
Fortinet white logo

Configuring the Scanner (fdevsec.yaml)

Configuring the Scanner (fdevsec.yaml)

Create the fdevsec.yaml file (or you may have downloaded it in Adding a New Application. Check-in or add this file into the root folder of the application source code.

Note: Do NOT modify the name and format of this file.

FortiDevSec automatically detects your application languages and runs the relevant scans, SAST, SCA, and Secret. However, to run DAST scans additional parameters are required in fdevsec.yaml, these are described later on in this section. You can also optionally add advanced settings to fdevsec.yaml file as per your requirements.

The following is a sample fdevsec.yaml file, the contents of this file vary based on different application scanning requirements.

version: v1

id:
org: 6a4d32db-6751-441a-88fe-9b4793717cde
app: aa8a393b-afc6-47d7-84d2-b7011f1d0012


# Optional parameters.
scanners:
- sast
- dast
- secret
- sca


languages:
- python
- javascript


dast:
url: https://your.url.com
fortipentest_scanner: true #true|false
full_scan: true #true|false


resource:
serial_scan: false #true|false

The following are the mandatory and optional parameters for fdevsec.yaml.

Parameter

Description

Mandatory parameters

org A unique ID associated with your organization.
app A unique ID that identifies the applications within the organization.

Optional Parameters

scanners

This identifies the type of scanner to test the applications. The supported values are sast, dast, sca, and secrets.

Notes:

  • If this parameter is unspecified, FortiDevSec runs only static scans.
  • If a DAST URL is specified then a DAST scan runs along with SAST. Else, only the static scans are run.
languages

This identifies the language of the source code. The supported values are java, javascript, python, golang, php, ruby, C++, and C.

FortiDevSec automatically detects the language if this parameter is not specified.

dast

Specify these parameters if you intend running a DAST scan on your application.

  • url - The URL where your application is hosted.
  • full_scan - The supported values are true and false (default). When set to true, a full DAST scan is run and when set to false, a basic scan is run.
  • fortipentest_scanner - The supported values are true and false (default). When set to true, FortiPenTest scanner is used. Else, the default DAST scanner is run.
    Note: You can configure the FortiPenTest scanner with specific parameters for testing your asset (URL). For details on scanner configuration see the FortiPenTest documentation.

resource

When serial_scan is set to true, the scans run consecutively and when set to false, multiple scans run parallel.

Note: To scan language files less than 10% of the coverage/threshold in the source code repository, you are required to explicitly specify the languages parameter and all languages under it in fdevsec.yaml file as a part of the SAST.

Configuring the Scanner (fdevsec.yaml)

Configuring the Scanner (fdevsec.yaml)

Create the fdevsec.yaml file (or you may have downloaded it in Adding a New Application. Check-in or add this file into the root folder of the application source code.

Note: Do NOT modify the name and format of this file.

FortiDevSec automatically detects your application languages and runs the relevant scans, SAST, SCA, and Secret. However, to run DAST scans additional parameters are required in fdevsec.yaml, these are described later on in this section. You can also optionally add advanced settings to fdevsec.yaml file as per your requirements.

The following is a sample fdevsec.yaml file, the contents of this file vary based on different application scanning requirements.

version: v1

id:
org: 6a4d32db-6751-441a-88fe-9b4793717cde
app: aa8a393b-afc6-47d7-84d2-b7011f1d0012


# Optional parameters.
scanners:
- sast
- dast
- secret
- sca


languages:
- python
- javascript


dast:
url: https://your.url.com
fortipentest_scanner: true #true|false
full_scan: true #true|false


resource:
serial_scan: false #true|false

The following are the mandatory and optional parameters for fdevsec.yaml.

Parameter

Description

Mandatory parameters

org A unique ID associated with your organization.
app A unique ID that identifies the applications within the organization.

Optional Parameters

scanners

This identifies the type of scanner to test the applications. The supported values are sast, dast, sca, and secrets.

Notes:

  • If this parameter is unspecified, FortiDevSec runs only static scans.
  • If a DAST URL is specified then a DAST scan runs along with SAST. Else, only the static scans are run.
languages

This identifies the language of the source code. The supported values are java, javascript, python, golang, php, ruby, C++, and C.

FortiDevSec automatically detects the language if this parameter is not specified.

dast

Specify these parameters if you intend running a DAST scan on your application.

  • url - The URL where your application is hosted.
  • full_scan - The supported values are true and false (default). When set to true, a full DAST scan is run and when set to false, a basic scan is run.
  • fortipentest_scanner - The supported values are true and false (default). When set to true, FortiPenTest scanner is used. Else, the default DAST scanner is run.
    Note: You can configure the FortiPenTest scanner with specific parameters for testing your asset (URL). For details on scanner configuration see the FortiPenTest documentation.

resource

When serial_scan is set to true, the scans run consecutively and when set to false, multiple scans run parallel.

Note: To scan language files less than 10% of the coverage/threshold in the source code repository, you are required to explicitly specify the languages parameter and all languages under it in fdevsec.yaml file as a part of the SAST.