Scanning an API with wi.exe

You can scan the following API types from the command-line interface (CLI) using wi.exe:

In the command, you can point to a definition file or an endpoint for the service. Optionally, you can create a scan configuration file that includes additional information, such as authentication and proxy settings, and point to the settings file in the command.

Process Overview

The following table describes the process for scanning an API with wi.exe.

Stage Description
1.

Optionally, prepare an API scan configuration file (JSON). For more information, see Understanding the API Scan Configuration File.

Tip: If you do not need any custom configuration, such as authentication, a proxy, or a service path that is different than the URL, then you do not need to create a scan configuration file.

2.

Open the CLI and run a scan using wi.exe with the -api option as shown in the following examples.

wi.exe -xd -api SOAP -u "D:\Development\soapConfig.json"

wi.exe -api GraphQL -u "http://localhost:5013/graphql" -tm -pc "C:\ProgramData\hp\HP WebInspect\Policies\<custom_policy>.policy"

For more information on wi.exe options, see Using wi.exe.

3.

To view the results, open the scan in Fortify WebInspect. The scan name will be API Assessment <API_Type> <Service_URL>.

Note: You cannot view the scan in Fortify WebInspect until the scan has completed.

Important Considerations About Definition Files

Consider the following facts when configuring your scan settings file or constructing your CLI command:

Recommendations

Follow these recommendations when conducting an API scan using wi.exe: