Skip to content

Clean up the initial matches if some don't pass later conditions. - #423

Merged
Giulia Stocco (gfs) merged 8 commits into
mainfrom
gfs/#422
Jan 21, 2022
Merged

Clean up the initial matches if some don't pass later conditions.#423
Giulia Stocco (gfs) merged 8 commits into
mainfrom
gfs/#422

Conversation

@gfs

@gfsGiulia Stocco (gfs) commented Jan 20, 2022

Copy link
Copy Markdown
Contributor

Fix#422

When a finding condition is used Application Inspector uses a WithinClause to parse the existing captures and see if any of them are valid given the conditon. This worked fine when there was a single match with a condition. When there are multiple matches if any of them passed the condition they were all being returned because we were extracting the results from the initial match not the within clause and we neglected to remove the matches that did not match the condition. This PR changes the WithinClause to remove any matches which don't pass its condition from the original list of captures which is later processed (if any of them pass the withinclause).

Also bumps some dependencies and refactors some tests.

@gfsGiulia Stocco (gfs) mentioned this pull request Jan 21, 2022
If you try to install a tool that is already installed you get a failure. It appears that the pipelines now include this by default, but I don't know if we can rely on that, so just changing this to update which should work either way.
Sign up for freeto 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.

Wrong matching number with custom rule's "search_in" property in "conditions"

1 participant

@gfs