Syslifters / reptor

Other
11 stars 3 forks source link

Pwndoc importer #58

Closed noraj closed 1 year ago

noraj commented 1 year ago

I was planning to create a ruby script to convert Pwndoc finding export file into Sysreptor finding import file in the same spirit as for those on https://github.com/noraj/Pentest-collab-convert.

But before those, I saw there was an importers command on reptor. It seems that's for now it has 0 importer available (2 planned: #6 #7) and the new importer command is just a mock:

https://github.com/Syslifters/reptor/blob/0184ea3ed87de4eda864ff3edabade8b4fd1336b/reptor/plugins/core/Importers.py#L65-L66

So for now I plan just going to the ruby script way unless you have some advices to give me.

aronmolnar commented 1 year ago

Thanks for your tickets.

The import functionalities should almost be usable. I'm about to create a documentation page for you how to write an importer plugin.

aronmolnar commented 1 year ago

I have created a guide how to write an importer. Feel free to ask (or update the docs file yourself), if something is unclear.

https://github.com/Syslifters/reptor/blob/main/docs/docs/importers/write-importers.md

noraj commented 1 year ago

Feel free to ask (or update the docs file yourself),

I can't PR with my current role

image

aronmolnar commented 1 year ago

I gave you write permissions.

aronmolnar commented 1 year ago

Though you might want to import multilanguage finding templates.

So I proceeded in a new branch to support this.

https://github.com/Syslifters/reptor/tree/support-multilangual-imports

Also updated the docs slightly in this branch.

https://github.com/Syslifters/reptor/blob/support-multilangual-imports/docs/docs/importers/write-importers.md

Not yet fully tested, so I have not merged it yet.

noraj commented 1 year ago

I have not tried the importer tool yet but I have made a script to convert the pwndoc export file to multiples sysreport finding files. Right now I have a folder with 53 .json files. The import button on the finding template page takes only tar.gz version, so I could compress them all but I can import a finding only one by one and I definitely don't want to import 53 manually. Is there a bulk import method?

aronmolnar commented 1 year ago

You can pack all data into one tar.gz and upload this one.

noraj commented 1 year ago

Neat, made a change to export a global archive as well https://github.com/noraj/Pentest-collab-convert/commit/560c3c62c884d205a039c948631fedf0ce2b902d and I was able to import it successfully.

aronmolnar commented 1 year ago

Closing, as currently not prioritized and the convert tool is ruby.