Undefined integer format

owasp:api4:2019-integer-format

Rule Severity:

Medium

APIs should specify an integer format type to ensure availability of the service to all users.
This rule applies at the API Specification level (OAS/Swagger).
URL parameters should not include sensitive information such as API keys, passwords, or secrets. Harcoding secrets or passwords in the API spec can lead to their exposure. Passwords, keys, tokens, or any other secret should be stored securely. Appropriate handling of secrets requires, amongst other best practices, implementation of encryption of secrets at rest and in transit, regular secret expiry & rotation, and short availability in application memory.

1. How to Identify with Example Scenario

Find the text in bold to identify issues such as these in API specifications

type: objectproperties: myObj: # arbitrary name for the object type: integer # missing "format:

2. How to Identify with Example Scenario

Find the text in bold to identify issues such as these in API specifications

1. How to Resolve with Example Scenario

Find the text in bold to identify issues such as these in API specifications

type: objectproperties: myObj: # arbitrary name for the object type: integer format: int32

2. How to Resolve with Example Scenario

Modify the text in bold to resolve issues such as these in API specifications

type: objectproperties: myObj: # arbitrary name for the object type: integer format: int32