owasp-integer-limit
Integers should be limited to mitigate resource exhaustion attacks. Ensure that minimum
and maximum
or exclusiveMinimum
and exclusiveMaximum
have been specified.
(or a combination of them)
Bad example
openapi: "3.1.0"
info:
version: "1.0"
components:
schemas:
Foo:
type: integer
Good Example
openapi: "3.1.0"
info:
version: "1.0"
components:
schemas:
Foo:
type: integer
exclusiveMinimum: 1
maximum: 99
How do I fix this violation?
Ensure that minimum
and maximum
or exclusiveMinimum
and exclusiveMaximum
(or used in a combination between them)
have been specified on integer values.