Integrate SC-SAST/SC-DAST functionality into SSC module #551
Labels
effort:high
Lot of effort needed to implement/fix
enhancement
New feature or request
fcli-sc-dast
Issue related to 'fcli sc-dast' commands
fcli-sc-sast
Issue related to 'fcli sc-sast' commands
fcli-ssc
Issue related to 'fcli ssc' commands
prio:high
High priority; important new feature or bug fix
Enhancement Request
With the current command structure, users and CI/CD integrations potentially need to run three
session login
(andlogout
) commands; they need to create an SC-SAST/SC-DAST session to be able to submit scan requests and wait for scan completion, and then create an SSC session to access the results of those scans.Also, current structure is not ideal if we implement pipeline-style actions (#549) that cover packaging, submitting scan requests, and exporting results. As described above, such a pipeline-style action would need to manage both SC-SAST (or SC-DAST) and SSC sessions, and we'd need to decide where such actions should live;
fcli sc-sast action run scan
orfcli ssc action run sast-scan
(or both).We can easily create an SSC command structure that's similar to FoD command structure, for example having commands like:
fcli ssc sast-scan list/start/wait-for/...
fcli ssc sast-sensor list/shutdown/...
fcli ssc dast-scan list/start/wait-for/...
fcli ssc dast-sensor list/...
To avoid this resulting in a major fcli release, we could potentially just leave the existing
sc-sast
andsc-dast
modules in place (just adding a deprecation notice), and only remove those modules upon the next major fcli release.Primary difficulty is session management:
--client-auth-token
option onfcli ssc session login
; of course SC-SAST commands would throw an error if no client auth token was specified upon loginfcli ssc config
orfcli config
commands--client-auth-token
option on every command that needs to interact with SC-SAST Controllerfcli ssc session login
command, we can simply use that. If the user supplies user credentials:UnifiedLoginToken
, which gets revoked upon session logout; this is not suitable for submitting SAST scan requests as the token may expire or be revoked before the scan has been published to SSC.UnifiedLoginToken
(for general fcli usage) and aCIToken
upon session login, and cache this outside of the session (i.e., shouldn't be revoked on session logout, and to avoid exceeding SSC token limits, we don't want to generate a new token on every login if a previously generated token hasn't expired yet)scan start
command, store token somewhere in SSC, ...CIToken
when user logs in using username/password, to allow for slightly longer-lived session, but such aCIToken
will not provided access to all SSC functionality. We could choose to simply use theUnifiedLoginToken
that's used for other SSC commands, or utilizeAutomationToken
to allow for longer-lived sessions. With the latter, we need to keep in mind thatAutomationToken
is not available on older SSC versions.The text was updated successfully, but these errors were encountered: