praetorian-inc/gato

JSON Output For Enumeration Module

AdnaneKhan opened this issue · 2 comments

The enumeration module currently writes all output to the console.

It would be helpful if the tool provided the option to save the enumeration output to JSON. The JSON output should contain all of the output from the console. This feature should be implemented as an --output-json or -oJ flag.

From a design perspective, the JSON object should be created when the enumeration object is made and then updated as the enumeration process executes. The JSON's structure should be the same whether the self, org, or repo enumeration types are utilized.

The JSON should have the following high-level schema:

{
    "user": {
        .... USER INFO HERE
    },
    "organizations": [
        "org_info": {
            "runners": [ ... If org level runners ]
        },
        "repositories": [
            "repo1": {
                "runners": [ ...IF REPO RUNNERS ... ]
            },
            "repo2": {
                "runners": []
            }   
        ]
    ]
}

We've started working on this feature! It is currently in an 80% done state as a PR to dev the branch as part of a large refactor effort.

The feature has been merged into the dev branch in preparation for the 1.5 release.