Skip to content

Added fod xxx-scan update commands#1024

Open
kadraman wants to merge 1 commit into
fortify:dev/v3.xfrom
kadraman:fod-scan-update-command
Open

Added fod xxx-scan update commands#1024
kadraman wants to merge 1 commit into
fortify:dev/v3.xfrom
kadraman:fod-scan-update-command

Conversation

@kadraman
Copy link
Copy Markdown
Contributor

@kadraman kadraman commented Jun 2, 2026

As per #913

Copilot AI review requested due to automatic review settings June 2, 2026 14:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support in the FoD module for updating scan attributes via new xxx-scan update subcommands, leveraging the new FoD API PUT /api/v3scans/{scanId} capability requested in #913.

Changes:

  • Introduce update commands for SAST/DAST/MAST/OSS scan command groups, backed by a shared AbstractFoDScanUpdateCommand.
  • Add a request DTO (FoDScanPutRequest) and helper method (FoDScanHelper.updateScan) to perform the PUT /api/v3scans/{scanId} call.
  • Extend CLI attribute options with a required --attrs/--attributes variant and add i18n entries for the new commands/options.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
fcli-core/fcli-fod/src/main/resources/com/fortify/cli/fod/i18n/FoDMessages.properties Adds usage/option text for new *-scan update commands.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanUpdateCommand.java Adds fod sast-scan update command implementation.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanCommands.java Registers SAST update subcommand.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/oss_scan/cli/cmd/FoDOssScanUpdateCommand.java Adds fod oss-scan update command implementation.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/oss_scan/cli/cmd/FoDOssScanCommands.java Registers OSS update subcommand.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/mast_scan/cli/cmd/FoDMastScanUpdateCommand.java Adds fod mast-scan update command implementation.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/mast_scan/cli/cmd/FoDMastScanCommands.java Registers MAST update subcommand.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/dast_scan/cli/cmd/FoDDastScanUpdateCommand.java Adds fod dast-scan update command implementation (currently hidden).
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/dast_scan/cli/cmd/FoDDastScanCommands.java Registers DAST update subcommand.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/attribute/cli/mixin/FoDAttributeUpdateOptions.java Adds required --attrs/--attributes option variant.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/scan/helper/FoDScanPutRequest.java Introduces PUT request body model for scan updates.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/scan/helper/FoDScanHelper.java Adds updateScan() helper method invoking the new API.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/scan/cli/cmd/AbstractFoDScanUpdateCommand.java Implements shared CLI logic for resolving scan + building merged attributes payload + calling update.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/rest/FoDUrls.java Adds V3_SCAN URL constant for /api/v3scans/{scanId}.

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