fod sast-scan start: Add --in-progress-action and --entitlement-preference options#1015
Open
gilseara wants to merge 2 commits into
Open
fod sast-scan start: Add --in-progress-action and --entitlement-preference options#1015gilseara wants to merge 2 commits into
fod sast-scan start: Add --in-progress-action and --entitlement-preference options#1015gilseara wants to merge 2 commits into
Conversation
added 2 commits
May 20, 2026 13:44
…ntitlement-preference` options Routes the scan start through the FoD `start-scan-advanced` endpoint when either option is specified, allowing control over the in-progress scan action and entitlement preference. Existing callers that pass neither option continue to use `start-scan-with-defaults`, preserving previous behavior. When the advanced path is used and `--in-progress-action` is not explicitly set, fcli defaults it to `Queue` rather than FoD's `DoNotStartScan`.
…PI for cancel action FoD's `start-scan-advanced` endpoint expects `CancelInProgressScan` rather than the value used by the shared `InProgressScanActionType` enum (`CancelScanInProgress`). Translate at the SAST command boundary; the helper now forwards the request's string value directly so a wire-specific value can be supplied. DAST behavior is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--in-progress-actionand--entitlement-preferenceoptions tofcli fod sast-scan start, exposing thestart-scan-advancedendpoint'sinProgressScanActionTypeparameter (DoNotStartScan|CancelScanInProgress|Queue) andentitlementPreferenceTypeparameter.start-scan-with-defaults(no behavior change for existing callers, including the bundledfod ciaction).--in-progress-actionis not explicitly set, fcli defaults it toQueueinstead of FoD'sDoNotStartScan.CancelInProgressScanover the wire (FoD'sstart-scan-advancedrejectsCancelScanInProgress); the existing sharedInProgressScanActionTypeenum keeps its current name so DAST behavior is unaffected — translation happens only at the SAST command boundary.Test plan
fcli fod sast-scan start --rel <app:rel> -f <pkg.zip>— verify it still hitsstart-scan-with-defaults(no regression).fcli fod sast-scan start --rel <app:rel> -f <pkg.zip> --in-progress-action=Queue— verify request goes tostart-scan-advancedwithinProgressScanActionType=Queue.fcli fod sast-scan start ... --in-progress-action=CancelScanInProgress— verify the API receivesCancelInProgressScanand the scan-in-progress is cancelled.fcli fod sast-scan start ... --in-progress-action=DoNotStartScan— verify FoD rejects/skips when a scan is already running.fcli fod sast-scan start ... --entitlement-preference=SubscriptionOnly— verify the entitlement preference is honored and--in-progress-actionsilently defaults toQueue.fcli fod sast-scan start --help— verify both new options show with the correct help text and completion candidates.fcli fod dast-scan start --help— confirm DAST still showsCancelScanInProgressas a valid value (unchanged).