Currently, when a request comes in with an X-FHIR-TENANT-ID header value, we:
- validate the value to ensure it doesn't contain unexpected characters (e.g.
/ or .); then
- lookup the tenant configuration for the passed tenantId (filesystem read)
Despite the input validation, CodeQL is flagging that as a potential vulnerability.
We think we can make that warning go away by flipping our processing.
- read all the tenant config directory names during startup and store them in a map
- when a request comes in for a particular tenant, look it up in the map (vs looking for a directory of that name from filesystem)
Currently, when a request comes in with an X-FHIR-TENANT-ID header value, we:
/or.); thenDespite the input validation, CodeQL is flagging that as a potential vulnerability.
We think we can make that warning go away by flipping our processing.