fortify / fcli

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

`fcli fod release create`: Improve handling of application attributes in `--attrs` option #604

Closed rsenden closed 2 months ago

rsenden commented 2 months ago

Current Behavior

Given a command like the following:

fcli fod release create ... --attrs AppAttribute=val1,RelAttr=val2

Fcli will update AppAttribute on the application, which is likely unexpected and unintended behavior. It is unlikely that anyone is explicitly passing application attributes on release creation, so probably not much of an issue right now.

However, at some point we may want to have the setup-release action also support automatically creating the application if it doesn't yet exist. We'd likely re-use the existing --attrs action parameter, allowing this parameter to be used to configure both application and release attributes. We'd then simply pass the value of the --attrs option to both fcli fod app create and fcli fod release create commands.

If the app doesn't exist yet, the fcli fod app create command would create both app and release with the given attributes. However, if the app exists but version doesn't, we wouldn't want the fcli fod release create command to update any existing application attributes.

Expected Behavior

On the fcli fod release create command, we should filter out any application attributes, including only release attributes in the release creation request.

Steps To Reproduce

No response

Environment

No response

Anything else?

No response