Skip to content

fod sast-scan start: Add --in-progress-action and --entitlement-preference options#1015

Open
gilseara wants to merge 2 commits into
fortify:dev/v3.xfrom
gilseara:feature/fod-sast-in-progress-action
Open

fod sast-scan start: Add --in-progress-action and --entitlement-preference options#1015
gilseara wants to merge 2 commits into
fortify:dev/v3.xfrom
gilseara:feature/fod-sast-in-progress-action

Conversation

@gilseara
Copy link
Copy Markdown
Contributor

Summary

  • Adds --in-progress-action and --entitlement-preference options to fcli fod sast-scan start, exposing the start-scan-advanced endpoint's inProgressScanActionType parameter (DoNotStartScan | CancelScanInProgress | Queue) and entitlementPreferenceType parameter.
  • Backward compatible: when neither new option is passed, the command continues to use start-scan-with-defaults (no behavior change for existing callers, including the bundled fod ci action).
  • When the advanced path is taken and --in-progress-action is not explicitly set, fcli defaults it to Queue instead of FoD's DoNotStartScan.
  • Sends the API-correct value CancelInProgressScan over the wire (FoD's start-scan-advanced rejects CancelScanInProgress); the existing shared InProgressScanActionType enum 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 hits start-scan-with-defaults (no regression).
  • fcli fod sast-scan start --rel <app:rel> -f <pkg.zip> --in-progress-action=Queue — verify request goes to start-scan-advanced with inProgressScanActionType=Queue.
  • fcli fod sast-scan start ... --in-progress-action=CancelScanInProgress — verify the API receives CancelInProgressScan and 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-action silently defaults to Queue.
  • 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 shows CancelScanInProgress as a valid value (unchanged).

gilseara 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant