Skip to content

Preserve partial SAST results and recover DAST and correlation streams - #1169

Open
kireetivar wants to merge 5 commits into
fortify:dev/v3.xfrom
kireetivar:p/kireetivar/failed-scan-partial-results
Open

kireetivar wants to merge 5 commits into
fortify:dev/v3.xfrom
kireetivar:p/kireetivar/failed-scan-partial-results

Conversation

@kireetivar

@kireetivar kireetivar commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Transient SAST, DAST, or correlation stream failure
  → reconnect within one 150-second recovery budget
  → retry temporary application-lock rejection
  → resume unresolved work after accepted initialization

Terminal SAST stream failure
  → retain usable received results
  → warn and finalize partial output

Changelog

fix: preserve partial SAST audit results after terminal stream failures
fix: bound Aviator SAST recovery to 150 seconds per outage
fix: recover DAST and correlation streams after disconnect

Changes and reasons

  1. Preserve usable results after terminal stream failures.
    Previously, exceptional completion could prevent received results from reaching FPR output.
    Explicit completed/failed outcomes now carry the received responses.
    A failed stream with usable successful results follows the existing partial-FPR path.
    Failure without usable successful results remains an error.

  2. Allow 150 seconds for each connection-recovery episode.
    Earlier retry limits could stop recovery before the existing 120-second application lease expired.
    Reconnect delays, recovery-time initialization waits, and temporary APPLICATION_BUSY responses share one budget.
    Accepted initialization ends recovery immediately. A later disconnect starts a new episode.
    This does not impose a 150-second model-processing timeout.

  3. Isolate failed attempts and preserve request accounting.
    Failed attempts abort without flushing queued sends. Old callbacks cannot change a replacement attempt.
    Normal completion still closes gracefully. Reconnect quota filtering accounts for previously completed work.

Quota and cost impact

  • Preserving results can reduce repeated audits caused by lost local output.
  • Recovery gives temporary outages and existing application leases time to resolve.
  • fcli does not change server charges, issue refunds, or bypass application locks.
  • Production cost savings have not been measured.

Compatibility and limits

  • No matching server deployment is required.
  • No new protocol fields, server statuses, CLI flags, or dependencies.
  • The server lease remains 120 seconds.
  • Permanent errors, interruption, and user cancellation remain terminal.
  • Durable replay, process-crash recovery, and SSC upload-failure recovery remain outside scope.

Evidence

  • Before: Terminal failures could discard received results. Recovery could stop before lease expiry.
  • After: 394 module tests passed. Spotless and downstream Aviator compilation passed.
  • Tests cover partial-FPR persistence, exact recovery expiry, recovery beyond 120 seconds, stale callbacks, and reconnect accounting.
  • Live restart, load-balancer, and complete SSC upload scenarios remain unverified.

Squash message

fix: `fcli aviator ssc audit-sast`: Preserve usable results after terminal stream failures

fix: `fcli aviator ssc audit-sast`: Keep reconnecting for up to 150 seconds after a connection loss

fix: `fcli aviator ssc audit-dast`: Resume unresolved findings after transient stream failures

fix: `fcli aviator ssc correlate-sast-dast`: Resume unresolved correlation requests after transient stream failures

Retain received results on terminal stream failure without using exceptions as partial-result containers. Keep unexpected local failures exceptional, release completed stream waits, and cover partial FPR persistence.

ValueEdge: 2501018 (Feature 2491057)
Use one recovery budget across reconnect delays, initialization waits, and temporary APPLICATION_BUSY responses. End recovery when initialization succeeds; keep permanent failures and cancellation terminal.

Fence stale attempts, preserve received results and request accounting, and abort failed sends without flushing. Keep normal completion graceful and leave server lease settings unchanged.

Add deterministic coverage for lease-length recovery, exact deadline expiry, reconnect quota filtering, stale callbacks, and stream cleanup.

Related: ValueEdge feature 2491057
Report retry delay and attempt without exposing the full recovery budget in each warning. Close active processors before shutting down the scheduler so callers cannot remain blocked in retry backoff.

Clarify partial-result warning counts and add regression coverage for output and client shutdown.
@kireetivar kireetivar self-assigned this Nov 18, 2026
@kireetivar
kireetivar marked this pull request as ready for review November 18, 2026 09:44
@anishkumarnagaraj-design anishkumarnagaraj-design changed the title Preserve partial SAST results and add bounded connection recovery fix: preserve partial SAST results and bound connection recovery Nov 20, 2026
Bound connection recovery and replay only unresolved requests so transient outages do not discard completed work. Preserve terminal error behavior and report quota metadata from the latest accepted DAST stream.
@kireetivar kireetivar changed the title fix: preserve partial SAST results and bound connection recovery Preserve partial SAST results and recover DAST and correlation streams Nov 26, 2026

This branch has not been deployed

No deployments
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