fortify / fcli

fcli is a command-line utility for interacting with various Fortify products
https://fortify.github.io/fcli/
Other
28 stars 16 forks source link

FoD: Use 'equals' instead of 'contains' for matching names #427

Closed rsenden closed 9 months ago

rsenden commented 10 months ago

See for example screenshot below; there is an application named RSTest, but the fcli fod app get RSTest command fails because other apps exist that contain the text RSTest, like RSTest-ms:

image

Problem is that FoD REST API performs case-insensitive contains matching, whereas fcli requires case-sensitive equals matching for operations like these. AFAIK, FoD doesn't allow for doing case-sensitive equals matching; ideally FoD API should be improved to allow for this.

For now, we'll need to filter the results returned by FoD, and we may even need to handle paging. For example, when trying to locate an app named E, FoD will return all apps contain the single letter E or e, which may be more than 50 or whatever page size is in use, so we may need to load multiple pages to find the app named E.

Note that this doesn't affect just the fcli fod app get command, but any command that directly or indirectly uses the FoD filter request parameter. This includes most resolver mixins.