fcli * action
: Session management & non-product-specific actions
#547
Labels
effort:high
Lot of effort needed to implement/fix
enhancement
New feature or request
fcli-actions
prio:high
High priority; important new feature or bug fix
Current action framework requires an active product session when running an action. Especially if we ever want to implement pipeline-style actions, it would be good if we can automatically start a session upon action initialization, and terminate the session upon action termination, to avoid users/integrations from having to explicitly run
login
andlogout
commands. Two generic approaches come to mind:action run
command accept session options like URL & credentials:login
andlogout
commandsFirst option is more generic and works the same for all actions. Second option allows for more flexibility, for example if an action needs to establish multiple sessions (multiple SSC instances, multiple products like SSC & SC-SAST or SSC & FOD, ..., for example for data migration actions).
Closely related to this is with pipeline-style actions that may need access to multiple product modules, in particular SC-SAST & SSC or SC-DAST & SSC, i.e., for starting a scan (using
sc-sast scan
commands) and then exporting scan results (usingssc action
commands). Those actions would either need to be able manage multiple sessions, or we need to implement some approach where ansc-sast
session can also be used for accessingssc
commands.We may even want to consider having all products consolidated into a single module, i.e., move
sc-sast
andsc-dast
commands into thessc
module, as this is more like how things are organized in thefod
module. From a user perspective, this would make session management much easier, as they only need a single session to work with those 3 products (although selecting a proper SSC token type and managing SC SAST client-auth-token would require some thought).Apart from the above, there may be use cases where actions are not (directly) related to any particular product module, for example if we'd want to provide a pipeline-style action that can start a scan on either FoD or SC-SAST/DAST based on input parameters. It wouldn't make much sense to provide this action in either SSC or FoD modules (as users would see FoD-specific options in SSC module and vice versa), to we may also want to support product-agnostic actions. Primary question is where this should live;
fcli action *
,fcli util action *
, ...?The text was updated successfully, but these errors were encountered: