-
Notifications
You must be signed in to change notification settings - Fork 31
Updates to fod sast-scan setup to keep existing settings #887
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 OSS (Open Source Analysis) and Aviator settings when not explicitly specified, improving the command's behavior to avoid overwriting previously configured settings.
Key changes:
- Made
--ossand--use-aviatoroptions negatable (auto-generating--no-ossand--no-aviatorflags) - Added logic to fallback to existing setup values when these options are not provided
- Added
@JsonInclude(NON_NULL)to the request class to exclude null fields from API calls
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| FoDScanConfigSastSetupRequest.java | Added @JsonInclude(NON_NULL) annotation to prevent null values from being sent in API requests |
| FoDScanConfigSastDescriptor.java | Added includeFortifyAviator field to capture existing Aviator setting from API responses |
| FoDSastScanSetupCommand.java | Updated option declarations to be negatable; added fallback logic to preserve existing OSS and Aviator settings; improved technology stack ID parsing with better error handling |
...re/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanSetupCommand.java
Outdated
Show resolved
Hide resolved
...re/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanSetupCommand.java
Outdated
Show resolved
Hide resolved
...re/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanSetupCommand.java
Outdated
Show resolved
Hide resolved
...re/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanSetupCommand.java
Outdated
Show resolved
Hide resolved
...re/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanSetupCommand.java
Show resolved
Hide resolved
...re/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanSetupCommand.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanSetupCommand.java:169
- Potential uncaught 'java.lang.NumberFormatException'.
return Integer.valueOf(lookupDescriptor.getValue());
Minor updates the
fod sast-scan setupcommand so that "aviator" and "oss" settings are not overwritten when they are not supplied. In order to remain backwards compatible existing-use-aviatorand--osshave been kept and been made "negatable" so that--no-use-aviatorand--no-ossare also available.Tidied up and hardened technology stack/language level based on Copilot suggestions.