Skip to content

fix(aviator): 2509035 reject DAST-only versions in SAST audit when nothing to audit - #1152

Merged
rsenden merged 2 commits into
fortify:dev/v3.xfrom
anishkumarnagaraj-design:fix/v3.x/aviator/2509035-sast-audit-dast-fpr
Oct 29, 2026
Merged

rsenden merged 2 commits into
fortify:dev/v3.xfrom
anishkumarnagaraj-design:fix/v3.x/aviator/2509035-sast-audit-dast-fpr

Conversation

@anishkumarnagaraj-design

@anishkumarnagaraj-design anishkumarnagaraj-design commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Story

Defect 2509035 - Inconsistency in error handling of mismatched audit types (ValueEdge)

Why

fcli aviator ssc audit-sast on an application version without SAST results behaved inconsistently depending on the version's audit state:

  • Version with issues to audit (the FPR is downloaded and validated): error Invalid FPR: ... DAST (WebInspect) scan, but this operation requires SAST scan results.
  • Version with nothing to audit (for example an already audited DAST version): silently reported "No issues to audit".

Cause: when the SSC preflight issue count is 0, the command returns SKIPPED before the FPR is downloaded, so FPR validation never runs.

What changed

  • AviatorSSCAuditHelper.failIfNoSastResults: when nothing is auditable, page the version's artifacts (embed=scans) and throw if none contains an SCA (SAST) scan. Only the presence of the expected scan type is checked, so scan types added through SSC parser plugins need no special handling.
  • AbstractAviatorSSCSastAuditCommand: call it in the zero-issue branch, before the skip message.
  • SSCArtifactHelper.hasEmbeddedScanType: made public for reuse.

New error (only on the zero-issue path): Application version does not contain SAST (Fortify SCA) scan results, which are required by this operation.

Behaviour

Scenario Before After
Version has issues to audit FPR downloaded and validated (existing errors for wrong FPR types) unchanged
Nothing to audit, version has SAST results skipped unchanged (skipped)
Nothing to audit, no SAST results (e.g. audited DAST-only, other scan types, no artifacts) silently "No issues to audit" error: no SAST results
audit-dast always downloads and validates the FPR unchanged

Tests

  • AviatorSSCAuditCommandTest: new cases for DAST-only, other scan types, SAST-only, SAST+DAST (one or separate artifacts), artifact without scan info, and no artifacts. All pass.
  • Not related: StreamInitializationTimeoutTest (3 tests, fcli-aviator-common) fails identically on dev/v3.x without this change.

Out of scope / decisions

  • Validating on every run (extra REST call each time) and downloading the FPR on the skip path were rejected as costlier.
  • The message for the zero-issue path is generic and differs from the FPR validation message used after download.
  • Not verified against a live SSC server: assumes SAST artifacts expose _embed.scans[].type = SCA, as SSCArtifactHelper already assumes.

…thing to audit

The SSC preflight returned SKIPPED for audited DAST versions before the FPR was downloaded and validated, so the DAST-FPR error was only raised for unaudited versions. When the preflight finds no issues, check version artifacts and fail with the same error if only DAST scans exist.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@anishkumarnagaraj-design
anishkumarnagaraj-design changed the base branch from dev/v3.x to feat/v3.x/aviator/27.1 October 29, 2026 05:51
@anishkumarnagaraj-design
anishkumarnagaraj-design changed the base branch from feat/v3.x/aviator/27.1 to dev/v3.x October 29, 2026 05:51

@rsenden rsenden left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I haven't reviewed the code in detail, but have some doubts about explicitly checking for DAST when SAST results are expected (or vice versa for DAST audit); SSC also supports many other scan types through parser plugins, and given that this is dynamic (depending on what parser plugins are installed on SSC), it may not be viable to explicitly check for each 'unexpected' engine type. Wouldn't it be better to just check whether the the expected results are present, throwing a generic exception message if not?

…T specifically

SSC supports further scan types through parser plugins, so verify that the expected SAST (SCA) results are present and otherwise fail with a generic message. Drop the shared FprHandle message change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@anishkumarnagaraj-design

Copy link
Copy Markdown
Contributor Author

@rsenden Good point, thanks. Reworked in fe92c94: the explicit DAST check is gone. The SAST audit now checks that the version has at least one artifact with an SCA (SAST) scan, and otherwise fails with a generic message: 'Application version does not contain SAST (Fortify SCA) scan results, which are required by this operation.' This doesn't depend on which parser plugins are installed on SSC. Unit tests cover WEBINSPECT, SECURITYSCOPE, an unknown plugin type, SCA, SCA+WEBINSPECT, no scan info and no artifacts. The DAST audit already always downloads and validates the FPR, so it needed no change.

@rsenden
rsenden merged commit 2bbd049 into fortify:dev/v3.x Oct 29, 2026
14 of 15 checks passed
rsenden pushed a commit that referenced this pull request Oct 30, 2026
…o audit (#1152)

fix: `fcli aviator ssc audit-sast`: Fix inconsistency in error handling of mismatched audit types
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