At least one host should be defined

Description

You have not defined any hosts in your API definition.

According to the Open API Specification (OAS), the top-level property host is optional and if not present, the host and the port serving the API documentation are used. However, there is no host serving the documentation for the APIs in 42Crunch Platform, so Security Audit cannot infer the host.

For more details, see the OpenAPI Specification.

Example

The following is an example of how this issue could look in your API definition:

1swagger: "2.0"
2info:
3  description: My example API
4  version: 1.0.0
5  title: My API
6paths:
7  {}
8  # ...
9

Remediation

Make sure that you have defined at least one host for your API.

1swagger: "2.0"
2info:
3  description: My example API
4  version: 1.0.0
5  title: My API
6host: my.api.com:8090
7paths:
8  {}
9  # ...
10

Copyright 42Crunch 2021