Skip to content

Added support for importing SARIF files and specifying download format for SCA scans#941

Open
kadraman wants to merge 2 commits intofortify:dev/v3.xfrom
kadraman:sarif-import-and-spdx
Open

Added support for importing SARIF files and specifying download format for SCA scans#941
kadraman wants to merge 2 commits intofortify:dev/v3.xfrom
kadraman:sarif-import-and-spdx

Conversation

@kadraman
Copy link
Collaborator

@kadraman kadraman commented Mar 5, 2026

Removed Scan Attributes functionality until implementation is fixed.

…ing SAST scan results in SARIF format

feat: `fcli fod oss-scan download`: Add `--format` option to support selecting CycloneDX or SPDX SBOM formats

feat: `fcli fod oss-scan download-latest`: Add `--format` option to support selecting CycloneDX or SPDX SBOM formats
Copilot AI review requested due to automatic review settings March 5, 2026 15:47
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 extends the FoD module to support importing SAST results from SARIF and to allow selecting an SBOM download format for Open Source scan downloads.

Changes:

  • Added a new fod sast-scan import-sarif command wired to a new FoD endpoint constant.
  • Added --format option support for fod oss-scan download and download-latest (SBOM format query parameter).
  • Updated FoD i18n messages and introduced an SBOMFormat enum plus scan descriptor attribute mapping support.

Reviewed changes

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

Show a summary per file
File Description
fcli-core/fcli-fod/src/main/resources/com/fortify/cli/fod/i18n/FoDMessages.properties Adds help/i18n strings for SARIF import and OSS download format options.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanImportSarifCommand.java New SARIF import command implementation for SAST scans.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/sast_scan/cli/cmd/FoDSastScanCommands.java Registers the new SARIF import subcommand.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/oss_scan/cli/cmd/FoDOssScanDownloadLatestCommand.java Adds --format option and appends the query parameter to the download request.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/oss_scan/cli/cmd/FoDOssScanDownloadCommand.java Adds --format option and appends the query parameter to the download request.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/util/FoDEnums.java Adds SBOMFormat enum used by the new download options.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/scan/helper/FoDScanDescriptor.java Adds attributes and an attributesAsMap() convenience method.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/rest/FoDUrls.java Adds static scan SARIF import URL constant.
fcli-core/fcli-fod/src/main/java/com/fortify/cli/fod/_common/output/cli/mixin/FoDOutputHelperMixins.java Adds ImportSarif output helper mixin/command name.

You can also share your feedback on Copilot code review. Take the survey.

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.

3 participants