redcanaryco / surveyor

A cross-platform baselining, threat hunting, and attack surface analysis tool for security teams.
MIT License
166 stars 62 forks source link

Feature Enhancement - Class-Based Structure and argparse Integration #149

Closed TreWilkinsRC closed 4 months ago

TreWilkinsRC commented 10 months ago

Summary

Enabling Surveyor usage from both the command line and environments such as Jupyter notebooks with in-script arguments offers greater flexibility and convenience. This pull request aims to refactor Surveyor by introducing a class-based structure and replacing the click library with argparse. This enhancement enhances Surveyor's versatility, empowering users to perform efficient security assessments and promote collaborative, automated analysis workflows.

Benefits

Changes Made

Checklist

Could use some help rewriting the unit tests

Related Issues

Closes #127

jholtmann commented 7 months ago

This looks great! With these changes it would also be fairly simple to restructure the project into a package that could be published to PyPi. That'd make it easier to use the project in notebooks and other contexts that natively support loading packages from the package index. We'd need to leave surveyor.py in place to avoid breaking compatibility for users that currently check out the repository manually.