Numeric IDs

owasp:api1:2019-no-numeric-ids

Rule Severity:

High

Ensure endpoints do not use numeric parameters for identifying resources.
This rule applies at the API Specification level (OAS/Swagger).
Numeric parameters should not be used to identify objects or resources. Numeric patterns can be predicted and are as such at risk of enumeration exploits. UUIDs should be used wherever possible.

1. How to Identify with Example Scenario

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

paths: '/root/{myObjectID}': # abitrary path parameters: - schema: type: integer

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

paths: '/root/{myObjectID}': # abitrary path parameters: - schema: type: string format: uuid

2. How to Resolve with Example Scenario

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