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

Access the value passed into compiler.add_source(_, origin=<filename>)

Open xorhex opened this issue 3 months ago • 1 comments

When iterating through the scan results, how does one access the origin field set when adding the rule to the compiler.source? I also looked in the Rules object, but didn't see where that was exposed.

compiler = yara_x.Compiler()
compiler.add_source("rule test_2 { condition: false }", origin="test.yar")
rules = compiler.build()

xorhex avatar Sep 20 '25 20:09 xorhex

That information is not currently exposed in the API.

plusvic avatar Sep 22 '25 07:09 plusvic