Skip to content

Conversation

@Y4nnikH
Copy link
Contributor

@Y4nnikH Y4nnikH commented Jul 15, 2025

  • add try/catch block around js interop calls

fixes #3349

@Y4nnikH Y4nnikH requested a review from tpurschke July 15, 2025 17:51
@Y4nnikH Y4nnikH self-assigned this Jul 15, 2025
Copilot AI review requested due to automatic review settings July 15, 2025 17:51
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 addresses error handling in JavaScript interop calls and fixes negation logic in database tenant visibility functions. The changes improve robustness by preventing JavaScript exceptions from crashing the UI and correct the logic for matching negated rules in app reports.

  • Adds try/catch blocks around JavaScript interop calls to handle JSException gracefully
  • Fixes negation matching logic in SQL functions by removing incorrect rule-level negation checks
  • Simplifies database queries by removing unnecessary JOIN operations with the rule table

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
AnchorNavToRSB.razor Adds exception handling around JavaScript interop calls to prevent crashes
fworch-api-funcs.sql Fixes negation logic and removes unnecessary JOINs in tenant visibility functions

Copy link
Contributor

@tpurschke tpurschke left a comment

Choose a reason for hiding this comment

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

  • rules report still working correctly

  • AppRule report still shows rules with negated parts incorrectly:

    eg. a rule containing "not rfc1918_netze" (containing 10.0.0.0/8) in destination is shown for an application that only has addresses starting with 10.x

@tpurschke tpurschke marked this pull request as draft July 24, 2025 14:01
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
7 New issues

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@tpurschke
Copy link
Contributor

@dependabot recreate

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