Closed rsenden closed 1 year ago
Instead of 'upload', we should consider 'publish' instead as this is more consistent with SC DAST terminology, and also more clear that this refers to publishing the scan results to SSC, as opposed to referring to uploading the scan payload from client to controller.
Some additional considerations for option 1 above:
--upload
or --publish
; if --publish
is specified, then --appversion
and --ssc-ci-token
(if not available from login) would be required, whereas those two options may not be specified if --publish
hasn't been specified (or we silently drop the corresponding controller parameters, like ScanCentral Client).--ssc-ci-token
and --appversion
options; it would be more consistent to have the ssc
prefix on both options, i.e. rename --appversion
to --ssc-appversion
(alternatively we could drop ssc
from --ssc-ci-token
, but that would be inconsistent with the login
command).Taking all of the above into account, the two options for fixing this issue become as follows:
--no-upload
to --publish
(alter option behavior as described above), rename --appversion
to --ssc-appversion
--appversion
option to --publish-to <appversion>
, and remove the --no-upload
flag
The fcli
--no-upload
option will drop theuploadToken
parameter from the scan request to ScanCentral SAST Controller. The--no-upload
option doesn't change the behavior of the--appversion
option; if--appversion
is specified, fcli will always send thepvId
parameter to the controller, regardless of whether--no-upload
was specified.However, apparently SC-SAST Controller 23.1 (and likely other versions) requires
uploadToken
to be provided whenpvId
is included in the scan request, resulting in the controller returning an error if both--no-upload
and--appversion
options have been specified on thefcli sc-sast scan start
command.After some discussion we came up with 2 approaches to fix this:
--no-upload
flag is set--appversion
parameter to--upload-to <appversion>
and remove the--no-upload
flagOption 1 is more in line with current ScanCentral Client behavior, and would allow for potential future situations where the controller does expect
pvId
to be present for functionality other than uploading the results, for example to allow users to run a scan without uploading the results ifpool_mapping_mode
is set toENFORCED
.However, until such use cases would be actually supported by the controller, keeping both
--appversion
and--no-upload
options could be confusing for users, as to why fcli allows for specifying an application version if upload is disabled.Option 2 avoids such potential confusion and therefore seems more intuitive from a user perspective.
This issue is related to #393.