Skip to content

Adds FoD SAST scan policy support to setup and start commands. - #1098

Open
kadraman wants to merge 1 commit into
fortify:dev/v3.xfrom
kadraman:dev/v3.x
Open

kadraman wants to merge 1 commit into
fortify:dev/v3.xfrom
kadraman:dev/v3.x

Conversation

@kadraman

Copy link
Copy Markdown
Contributor

Changes

  • Adds --scan-policy to fod sast-scan setup and fod sast-scan start.
  • Preserves the configured release policy when starting scans without an override.
  • Supports case-insensitive values:
    • Security
    • DevOps
    • Legacy
  • Maps policy values to endpoint-specific FoD representations:
    • Setup legacy: FoD_Legacy
    • Start legacy: FoD_Legacy_
  • Prevents the GET-only policy representation from being incorrectly sent back in setup requests.

Validation

  • FoD module tests pass.
  • Spotless checks pass.
  • Lowercase policy values verified against a live FoD tenant.
  • Verified transition between values with and without scan-policy applied to a live FoD tenant.

feat: `fod sast-scan start` add support for `--scan-policy`

fix: `fod sast-scan start` no longer overrides existing Scan Policy if no `--scan-policy` is not supplied  (fixes fortify#1095)
Copilot AI lite review requested due to automatic review settings September 18, 2026 13:41

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are focused, consistent with existing request handling, and include relevant automated coverage.

Pull request overview

Adds FoD SAST scan-policy support across setup and start commands, including endpoint-specific legacy mappings and preservation of configured policies.

Changes:

  • Adds --scan-policy options and localized help text.
  • Normalizes case-insensitive policy values and legacy representations.
  • Adds unit and functional coverage for policy fields and CLI help.
File summaries
File Description
FoDScanSastHelper.java Normalizes policies and adds them to start requests.
FoDSastScanSetupCommand.java Sends normalized setup policy.
FoDSastScanStartCommand.java Applies explicit or configured release policy.
Request/descriptor classes Adds scan-policy fields.
FoDMessages.properties Documents the new options.
Test files Covers normalization and CLI help/output.
Review details
  • Files reviewed: 9/9 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

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.

2 participants