vipyrsec / dragonfly-mainframe

The mainframe for Dragonfly
https://docs.vipyrsec.com/dragonfly-mainframe/
MIT License
4 stars 2 forks source link

Modify database schema to store rule match locations #227

Open jonathan-d-zhang opened 3 months ago

jonathan-d-zhang commented 3 months ago

Why?

This will be more helpful for debugging rules as well as providing more information for readers of our reports.

Also, the POST /package endpoint should be modified to use this new column, and the Pydantic model should be updated too.

What/How?

Add an array column to the package_rules table containing tuples of filename, start location, and length of the match.