Command Line Arguments
The FortiDevSec allows you to configure scanner by providing command line arguments. To pass command line arguments to the FortiDevSec scanner, append main s
to the scanner run command, followed by the desired arguments.
Command Format:
<fortidevsec sast/dast run command> main s --arg1 value1 --arg2 value2
Example:
Following is an example command to run a SAST scan with the specified arguments.
docker run --pull always --rm --mount type=bind,source="$PWD",target=/scan registry.fortidevsec.forticloud.com/fdevsec_sast:latest main s --org-id 9df9dc0f-0000-4cf7-8d91-81e194fdd727 --app-id 613a0004-b08f-40e1-a5c8-6702f2b5027b -l python -l java -l c -S=true --scanner sast --scanner sca
where,
-
docker run --pull always --rm --mount type=bind,source="$PWD",target=/scan registry.fortidevsec.forticloud.com/fdevsec_sast:latest
is a command to run a SAST scan from the application root folder. See Running the Security Scan. -
main s
is used to enable arguments. -
--org-id 9df9dc0f-0000-4cf7-8d91-81e194fdd727
specifies the organization for the scan. -
--app-id 613a0004-b08f-40e1-a5c8-6702f2b5027b
specifies the application for the scan. -
-l python -l java -l c
configures the scanner to analyze Python, Java, and C languages. -
-S=true
enables serial scan mode. -
--scanner sast --scanner sca
specifies the use of both the SAST and SCA scanners.
Notes:
-
The command provided is an example and may need adjustments based on your specific environment and requirements.
-
Arguments are case-sensitive.
-
Multiple arguments can be combined in a single command.
-
--org-id
and--app-id
are mandatory arguments.
Available Arguments:
The following are the mandatory and optional arguments. Replace value with actual value based on your environment. Run --help command for a comprehensive list of available arguments and their descriptions.
Argument Format |
Description |
---|---|
Mandatory arguments |
|
--org-id value or -o value | A unique ID associated with your organization. |
--app-id value or -a value | A unique ID that identifies the applications within the organization. |
Optional arguments |
|
--scanner value or -s value |
This identifies the type of scanner to test the applications. The supported values are sast, dast, sca, secrets, iac, and container. Notes:
|
--language value or -l value |
Specify the language that you want to scan. The supported values are java, javascript, python, golang, php, ruby, c++, shell, c# and c. FortiDevSec automatically detects the language if this parameter is not specified. Note: Specifying languages as javascript also scans NodeJS code. |
--exclude_path value or -e value |
Specify the directory path or name that must be excluded from the scan. Exclude path is supported for Golang and Python languages. |
--url value or -u value --fullscan value or -f value
|
Specify these arguments if you intend running a DAST scan on your application.
|
--serial-scan value or -S value |
When |
--risk_rating value or -r value |
Specify the
|