FAQ

  • GitHub GitHub Repo stars
  • Discord Discord Server
  • ✨ New! Try the OpenAPI Doctor ✨ The OpenAPI Doctor
    Recommended

    owasp-integer-limit


    Formats: Severity:

    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.