Open Ana06 opened 3 years ago
this seems useful.
it make take a bit of work to enable this without affecting performance too much. but perhaps performance tuning is needed anyways.
i wonder if there are any edge cases with a crazy number of loops that we'd need to handle. and how does the following behave? can it be done efficiently?
loop:
and:
loop:
offset: 10
@williballenthin
loop: and: loop: offset: 10
I understand this as a loop which contains the offset 10. Something like this would for example match:
while(condition){
var += 10
}
Do you mean that this may be too common and match too often or do we understand different things? 🤔
I think Willi's referring to nested loops like
while(condition1) {
while(condition2){
var += 10
}
}
Introducing a new
loop
scope could be useful in some rules. For example:From https://github.com/fireeye/capa-rules/pull/308#discussion_r600715392