Skip to content

fix: handle fuzzy context boundary condition in aviator apply-remediations#1021

Open
kireetivar wants to merge 2 commits into
fortify:dev/v3.xfrom
kireetivar:p/kireetivar/eof_rem
Open

fix: handle fuzzy context boundary condition in aviator apply-remediations#1021
kireetivar wants to merge 2 commits into
fortify:dev/v3.xfrom
kireetivar:p/kireetivar/eof_rem

Conversation

@kireetivar
Copy link
Copy Markdown
Contributor

This PR fixes an IndexOutOfBoundsException during aviator remediation processing when fuzzy context matching reaches edge boundary positions. The command now completes remediation mapping without failing on this boundary case.

Root cause

The fuzzy context search path could access a list index equal to list size while mapping remediation changes to original code context, which triggered IndexOutOfBoundsException and stopped processing.

What changed

  • Added boundary-safe index handling in fuzzy context matching logic used by remediation processing.
  • Preserved existing matching behavior for normal paths while preventing out-of-range access on edge inputs.
  • Ensured remediation flow continues and applies valid changes instead of terminating on this exception.

@kireetivar kireetivar self-assigned this Jun 2, 2026
@kireetivar kireetivar requested a review from rsenden June 2, 2026 07:50
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