microsoft / ApplicationInspector

A source code analyzer built for surfacing features of interest and other characteristics to answer the question 'What's in the code?' quickly using static analysis with a json based rules engine. Ideal for scanning components before use or detecting feature level changes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Expand Condition Functionality

gfs opened this issue · comments

Currently you can add conditions on a rule, and rules can contain multiple patterns. However, individual patterns may have different conditions. To match them properly now this means necessitating creating multiple rules, each with fewer patterns so that the appropriate conditions can apply.

It would be convenient to be able to also add conditions on individual patterns, to allow for larger more comprehensive rules for a single detection.

One limitation currently is that conditions are all ANDed, all conditions must pass. However, there are some rules like AI040600 where the broad search can apply widely, but conditions to narrow down more specifically are more closely tied to a specific language. It would be nice to have a way to specify what languages a condition does - or does not - apply to.