Description
An operation’s servers list takes precedence over the path and API defaults. An HTTP entry can send that operation over plaintext even if the default uses HTTPS.
Potential impact
Credentials in the request and data in the response can be read or changed in transit.
Remediation
Use HTTPS in the operation’s server list, or remove the override to inherit an HTTPS address. Verify that the selected server or gateway accepts HTTPS.
Examples
For GET /, the example changes staging to HTTPS and adds a production address.
Before
json
{
"openapi": "3.0.0",
"paths": {
"/": {
"get": {
"servers": [
{
"url": "https://development.gigantic-server.com/v1"
},
{
"url": "http://staging.gigantic-server.com/v1"
}
]
}
}
}
}
After
json
{
"openapi": "3.0.0",
"paths": {
"/": {
"get": {
"servers": [
{
"url": "https://development.gigantic-server.com/v1"
},
{
"url": "https://staging.gigantic-server.com/v1"
},
{
"url": "https://api.gigantic-server.com/v1"
}
]
}
}
}
}