vscode-yara icon indicating copy to clipboard operation
vscode-yara copied to clipboard

Invalid regex in grammar: lookbehind assertion is not fixed length

Open lildude opened this issue 1 year ago • 0 comments

👋 I'm the lead maintainer of the https://github.com/github/linguist library which is used for language detection and providing the syntax highlighting for languages on GitHub.com, and we use this grammar.

Our grammar compiler has found a problem with your grammar which I thought I'd let you know about.

This regex is invalid as the lookbehind assertion is not a fixed length (offset 25):

https://github.com/infosec-intern/vscode-yara/blob/abd7b6497a3361240cc0e5c7f5d3f2cfb65d0e7e/yara/syntaxes/yara.tmLanguage.json#L375

https://regex101.com/r/v6bHBI/1

This is the error our compiler reported:

Invalid regex in grammar: source.yara (in yara/syntaxes/yara.tmLanguage.json) contains a malformed regex (regex "(?<=(^|[\)]|\b(?:them)\b))(?:\s*...": lookbehind assertion is not fixed length (at offset 25))

lildude avatar Feb 21 '23 13:02 lildude