Skip to content

Conversation

@kadraman
Copy link
Collaborator

@kadraman kadraman commented Dec 9, 2025

Minor updates the fod sast-scan setup command so that "aviator" and "oss" settings are not overwritten when they are not supplied. In order to remain backwards compatible existing --use-aviator and --oss have been kept and new options --no-aviator and -no-oss added to explicitly remove these settings.

Copilot AI review requested due to automatic review settings December 9, 2025 08:24
Copy link

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 updates the fod sast-scan setup command to preserve existing "aviator" and "oss" scan settings when they are not explicitly provided by the user. To support this, new --no-aviator and --no-oss options have been added to allow explicit removal of these settings while maintaining backward compatibility with the existing --use-aviator and --oss options.

Key changes:

  • Added conditional logic to preserve existing OSS and Aviator settings from current scan configuration when not explicitly specified
  • Introduced mutual exclusivity validation to prevent conflicting option combinations (e.g., --oss and --no-oss together)
  • Applied @JsonInclude(JsonInclude.Include.NON_NULL) to request objects to omit null fields from API requests

Reviewed changes

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

File Description
FoDMessages.properties Added descriptive messages for new --no-oss and --no-aviator command options
FoDScanConfigSastSetupRequest.java Added @JsonInclude annotation to exclude null fields from JSON serialization, enabling preservation of unspecified settings
FoDScanConfigSastDescriptor.java Added includeFortifyAviator field to descriptor to capture existing Aviator setting from API responses
FoDSastScanSetupCommand.java Implemented main logic: removed default values from option fields, added new negative options, implemented mutual exclusivity checks, and added priority-based logic to preserve or override OSS/Aviator settings based on user input

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@kadraman kadraman marked this pull request as draft December 9, 2025 11:40
@kadraman kadraman closed this Dec 9, 2025
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