Skip to content
This repository has been archived by the owner on Jan 21, 2019. It is now read-only.

Module functions that take regex parameters fail #18

Open
Northern-Lights opened this issue Oct 17, 2017 · 1 comment
Open

Module functions that take regex parameters fail #18

Northern-Lights opened this issue Oct 17, 2017 · 1 comment
Assignees

Comments

@Northern-Lights
Copy link
Contributor

I have a rule that looks like this:

import "cuckoo"
rule domain {
  condition:
    cuckoo.network.dns_lookup(/example.com/)
}

yago fails with this error: {"lexical":"error","line":"4","msg":"Line 4: illegal regex modifier ())"}exit status 1

The method processCondition makes accommodations for module.variable, but it does not consider the following:

module.variable.<anything>
module.function(<anything

In this particular case, it believes that ) is being used as a modifier, when in fact it is used to end the function.

In the fix, functions with multiple parameters should be taken into consideration, e.g. if there is a , between parameters within the parentheses.

@Xumeiquer
Copy link
Member

I'll review as soon as possible.

@Xumeiquer Xumeiquer self-assigned this Oct 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants